feat(protocol): give every build one typed identity #83
No reviewers
Labels
No labels
priority/P0
priority/P1
priority/P2
release/v0.1.0
status/blocked
status/planned
type/bug
type/design
type/test-gap
type/tracker
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
natsukium/felis!83
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/build-identity-17"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #17.
Gives every felis build one typed identity and splits the self-report
from the cross-process comparison.
BuildIdentity { version, revision, dirty }lands infelis-protocol(it crosses the wire, and its canonical
<version> (<revision>[-dirty])rendering is the one form every process writes and reads), riding
Welcome.identityon wire minor 9 beside thebuild_idstring itsupersedes, so a daemon below that minor still answers something.
git rev-parse HEADplus a porcelain check(
crates/build-common.rs), re-stamped when.git/indexmoves; therevision is now full 40 hex with a fixed 12-char abbreviation, so two
machines no longer render one build two ways. The flake passes
self.rev/self.dirtyRevin full.felis --versionis now this binary's own build alone, rendered from aconst — no subprocess, no tokio runtime, no dial, so it answers offline;
a verb or a post-
--argv beside it is a usage error (exit 2).felis version, which gains--format jsonand reads the client's identity by parsing its canonical--versionline throughBuildIdentity'sFromStr.Doc cascade:
docs/reference/ipc.md(minor ledger row 9,ConnWelcome),docs/explanation/architecture/ipc.md,docs/reference/cli.md,docs/reference/spec.md(REQ-104),docs/reference/workspace.md,docs/reference/testing.md,docs/explanation/terminal-identity.md,CHANGELOG.md,crates/felis-protocol/proto/felis.protoand itsgenerated mirror,
skills/felis/SKILL.md,flake.nix,nix/package.nix,scripts/bench/envinfo.py.Rebased onto the current
main, which had already taken minor 8 for theatomic-create / operation-id additions, so build identity is minor 9.
Verified: just check green (fmt, clippy, nextest, deny); reviewed by
plan/correctness/docs lenses and pi sol.
Deferred
BuildIdentity identityonOpsStatusReply, and typed rendering incli_daemon.rs(felis daemon statushuman +--format json) — noacceptance criterion needs it; criterion 3 is satisfied by
Welcome.identity, which bothfelis versionanddoctorread. Theextra proto field, convert arm, fixtures and CLI rendering did not fit
the size budget.
daemon statusstill reports its untyped<semver> (<revision>[-dirty])string, which is now the canonical formanyway.
(unknown)Nix stamping paths — the overlay(
flake.nixoverlays.default) andnix/hm-module.nix's defaultpackage, which call
nix/package.nixwith nogitHash. Not required byany acceptance criterion, and verifying it needs a
nix eval/nix buildround the size budget did not leave room for. It is theplan's own named risk (3), so it should become a follow-up before the
release that introduces the concept.
tag workflow; #17 only has to make
dirtyobservable, which it nowdoes. Recorded in
docs/reference/workspace.md.scripts/bench/crossterm_test.pyfixture update to the new--versionline shape — its mocked
cli (b27da75)output still parses throughthe widened
paren_hashregex, so the test passes unchanged; rewritingthe fixture is cosmetic.
docs/explanation/architecture/control-surfaces.mdwording touch namedin the plan's cascade — its line about version surfaces is still
accurate after the split (
--versionremains a local, non-dialingsurface); the grep sweep found nothing that contradicts the change.
unknown— the same overlay + hm-modulegitHashthreading as above;no acceptance criterion requires the Nix install paths specifically.
harness still scrapes text — the
OpsStatusReplyhalf is the firstdeferred item; the
crossterm_test.pyhalf is cosmetic. AC3 issatisfied for the required surfaces via
Welcome.identity, and theenvinfo.pyrevision_driftwrinkle is bench-harness behavior noacceptance criterion covers.
rebuild every invocation — a build-performance annoyance in worktree
builds, not a correctness bug or a failure of any numbered criterion,
and it does not fail CI.
FromStraccepts noncanonical lines it documents as refused —non-blocking; the only current producer is felis's own clap line, so no
real consumer is affected. Tightening validation is hardening.
unavailable, notunrecognized— a diagnostic-granularity edge case (spawn failure vs.nonzero exit); no criterion requires distinguishing the two.
daemon_status"untyped") is neverexercised — AC4's deterministic-tests requirement is about clean/dirty
build identities, not this compatibility path, so it is extra hardening.
measured against a clean checkout reports no drift — bench-harness
behavior outside #17's criteria; worth a follow-up to correct the
testing.mdwording and the drift derivation.total_bytesreference in theMAX_IMAGE_BYTESdoc comment —belongs to the unrelated image-transfer rework this branch was stacked
on, not to #17's criteria.
9f6f7473d48ee45f7605