Repository navigation
test(minimald): T29 — One digest both sides, end to end - #3460
minimal-foundry[bot] wants to merge 1 commit into
Conversation
Each expanded spec in crates/mfile/tests/golden/vectors.json goes through the client's projection and a daemon create. The record stores both digests, equal to the vector's, and a create that carries another vector's digest is refused with no record left behind.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Approved: no findings at Nothing to do. Verdict APPROVE, posted as a comment: the App cannot review its own pull request; the check and the label carry it. Clobber: none, the diff is additive. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The change adds one test and no production code. The test proves Gatehouse §6.3 check 5 and architecture.md line 1291 over the golden vectors. The client and the daemon compute the same digest, the record stores both, and a differing digest is refused with no record. The test asserts the existing gate and does not relax it. The full verify run timed out in an unrelated module, so CI must still pass before merge.
Ruled at 85ffbf1 against gominimal/arch@327e1b57d16b by claude-opus-5-5.
T29 — One digest both sides, end to end
slice: S6
kind: integration
covers: none
size: S
est: 40 code, 120 tests
executor: agent
difficulty: routine
model: light
diagnostics: daemon log names both digests
observability: one span covers digest path
layers:
- slice:
- crates/minimald/src/box_manager/tests.rs: tests
test: cargo nextest run -p minimald client_and_daemon_digests_match_vectors_and_mismatch_refused
produces: none
consumes: none
proof: create a box and see the client's and the daemon's projection digests stored side by side, equal to the golden vectors, and a mismatch refused.
depends on:
- blocked by #2430
- blocked by #2431
- blocked by #2432
- blocked by #3387
Proof
A person can run the test and see this. For each expanded spec in crates/mfile/tests/golden/vectors.json (example/dev, example/render-diagrams, defaults_session_only/default), the client's projection digest and the daemon's recomputed digest are stored side by side in the created box's record. Both equal the pinned golden digest. A create whose client digest is another vector's digest is refused with the projection digest mismatch error and leaves no record. The daemon log names both digests.
Notes from the agent: The test reads the golden vectors from crates/mfile/tests/golden/vectors.json and uses no new fixture. The client side copies the projection path in crates/minimal/src/cmd/boxes/create.rs (stamp_client_projection_digest): it parses a TOML table and runs TypeFacts::of_spec, then project().digest(). minimald has no toml dependency, and Cargo.toml is outside the layers. So the test parses the table with str::parse, and of_spec fixes its type by inference. The test cannot call the minimal crate's function directly, because minimald does not depend on that crate. Finding: the golden expanded specs carry no
v, and the daemon refuses a spec without one ('box spec without a version'). The test addsv = BOX_SPEC_VERSIONto the JSON that it sends, as the typed BoxSpec that min sends today does. The daemon's digest still equals the vector, which shows thatvis outside the projection. A later task that sends the expanded spec in place of the typed one (#2410) must addvto the expansion. Otherwise the daemon refuses every create. The verb type for each vector comes from the projection's type.root, so the session vectors are created under the session verb and the task vector under the task verb. diagnostics and observability: the existing create span and log line already name both digests. The test asserts the log line on each refusal. I did not run the whole crate's suite or just ci.Tests
cargo nextest run -p minimald client_and_daemon_digests_match_vectors_and_mismatch_refusedVerify
min task run agent-verifytimed out after 1800s, so this PR is a draft.Closes #2434