8000 feat(minimal): T128 — A real create sends the client's projection digest and store rules by minimal-foundry[bot] · Pull Request #3441 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

feat(minimal): T128 — A real create sends the client's projection digest and store rules - #3441

Merged
agent-137 merged 15 commits into
mainfrom
agent/3387-a-real-create-sends-the-client-s-projection-dige
Nov 16, 2026
Merged

agent-137 merged 15 commits into
mainfrom
agent/3387-a-real-create-sends-the-client-s-projection-dige

Conversation

@minimal-foundry
@minimal-foundry minimal-foundry Bot commented Nov 14, 2026 •
Copy link
Copy Markdown
Contributor

T128 — A real create sends the client's projection digest and store rules

slice: S6
kind: integration
covers: none
size: M
est: 160 code, 220 tests
executor: agent
difficulty: needs care
model: strongest
diagnostics: the daemon log names both digests at creation
observability: the record holds the client and daemon digests side by side
layers:
- client:
- crates/minimal/src/cmd/boxes/create.rs: send the expanded spec; fill store_rules; set the client projection digest
- crates/minimal/src/cmd/box_spec.rs: fill store_rules for the render
- crates/minimal/src/tests.rs: tests
test: cargo nextest run -p minimal create_stores_client_digest_equal_to_daemon_digest
test: 8000 cargo nextest run -p minimal box_spec_render_carries_client_store_rules
produces: none
consumes:
- crates/mfile/src/projection.rs
proof: create a box with min and see the client's projection digest stored beside the daemon's, equal to it.
depends on:
- blocked by #2430

Residuals

Proof

A box created through min's create path (a session start and a task run) now carries the client's projection digest. The box's record holds it under projection_digest.client beside the daemon's projection_digest.daemon, and the two are equal. The test creates both box kinds against an in-process minimald and reads the record back. min box spec now shows each store reference's upstream and inject from the client's [secret-store-rules].

Notes from the agent: Partly done: the create does NOT send the full expanded spec. The request still carries the typed mfile::spec::BoxSpec. The daemon parses that JSON through SpecDoc, which has deny_unknown_fields. Sending the expanded spec in its place needs changes in crates/mfile/src/spec.rs and minimald, and both are outside this task's layers. So the client digest is computed over the BoxSpec JSON that is sent, with mfile::projection::spec_digest and the creating verb's type, the same call the daemon makes. The digests are equal by construction. Because BoxSpec carries no [secrets], the projection's secret_grants is empty on both sides, and the store rules do not reach the sent spec. For the same reason, create.rs does not fill store_rules in box_entry's expansion. That expansion only feeds the packages, hooks, vars and patches lists. The global args it needs would also change session_box_entry and task_box_entry, and task.rs calls both (outside the layers). The digest is stamped in put_spec and again in add_vpn_network_names, so the task path in task.rs gets it without a change to task.rs. The dash create path (dash/rpc.rs) is not changed. A spec that does not project is sent with no client digest, and a warning goes to the log. In box_spec.rs, the grants now parse with a store reference's upstream and inject removed, because SecretGrant does not take those keys. SECRET_REFERENCE_KEYS now keeps upstream and inject, and this also affects the stored-box render (BCLI-022). New printed text: the source comment…[truncated]

Tests

line exit tail
cargo nextest run -p minimal create_stores_client_digest_equal_to_daemon_digest 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-0 in box runtime-implement-test-0-2... Compiling paths v0.0.1 (/workbe
cargo nextest run -p minimal box_spec_render_carries_client_store_rules 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-1 in box runtime-implement-test-1-2... Compiling version v0.8.0 (/work

Verify

min task run agent-verify exited 100, so this PR is a draft.

 {
                "parent_span_id": "9933c4b1a0126557",
                "rpc": "minimald-v1-GetSessionRecord",
                "span_id": "13ada631bb075588",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "13ada631bb075588",
                "queued_behind": "0",
                "span_id": "4022b98de4a3c985",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "rpc",
            fields: {
                "parent_span_id": "9933c4b1a0126557",
                "rpc": "minimald-v1-DestroySession",
                "span_id": "506338680acc9ae8",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "506338680acc9ae8",
                "queued_behind": "0",
                "span_id": "01ba6952d768a051",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "506338680acc9ae8",
                "queued_behind": "0",
                "span_id": "6a0a83b74509dbc9",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "6a0a83b74509dbc9",
                "span_id": "2522eb741ee391e9",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "6a0a83b74509dbc9",
                "queued_behind": "0",
                "span_id": "d52f03d83a99f163",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
     Summary [  63.739s] 1135 tests run: 1134 passed, 1 failed, 2 skipped
        FAIL [   2.757s] (1135/1135) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

Base

The base branch moved while the coder worked and was merged in before the tests ran. These files changed on BOTH sides since the branch point — read them first, because a rewrite from a stale reading can undo a merge without a conflict:

  • crates/minimal/src/tests.rs

Closes #3387

put_spec and add_vpn_network_names set the client's projection digest
of the spec JSON the create request sends, read as the daemon reads it.
The daemon recomputes its digest from the same spec, so the box's record
holds the two digests side by side, equal (BOX-071).

min box spec <entry> fills the client's [secret-store-rules] into the
expansion, so each store reference shows its upstream and inject, with
[secret-store-rules] as their source.
@coderabbitai
coderabbitai Bot commented Nov 14, 2026 •
Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2cb879a4-6cad-4cde-94f6-5a1a79569f32

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@minimal-foundry
minimal-foundry Bot commented Nov 14, 2026 •
Copy link
8000
Copy Markdown
Contributor Author

Reviewed: no findings; approval withheld, 11 threads unresolved at ee56cbdcc5b6.

APPROVE withheld: 11 unresolved threads — minimal-foundry[bot] crates/minimal/src/cmd/boxes/create.rs, minimal-arch[bot] crates/minimal/src/cmd/boxes/create.rs:3222, minimal-arch[bot] crates/minimal/src/cmd/boxes/create.rs, minimal-foundry[bot] crates/minimal/src/cmd/boxes/create.rs:3279, minimal-arch[bot] crates/minimal/src/cmd/boxes/create.rs:3227, …. Resolving the last thread releases the approval on this head.

Resolve the open threads. Resolving the last one releases the approval on this head; no new review is required.

Verdict APPROVE, posted as a comment: the App cannot review its own pull request; the check and the label carry it.

Clobber: none seen.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — advisory review

Verdict COMMENT — 3 findings, 3 inline.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

Comment thread crates/minimal/src/cmd/boxes/create.rs Outdated
Comment on lines +3012 to +3043
/// reads it, so the daemon recomputes the same digest and stores it beside
/// this one. A spec that names no type is of the creating verb's type, as
/// the daemon reads it.
///
/// A request with no spec, or a spec that does not project, carries no
/// client digest. The daemon then stores none.
pub(crate) fn stamp_client_projection_digest(request: &mut minimald_rpc::CreateSessionRequest) {
request
.config
.attrs
.remove(minimald_rpc::CLIENT_PROJECTION_DIGEST_ATTR);
let Some(spec) = request.spec.as_ref() else {
return;
};
let verb_type = match request.config.creating_verb {
minimald_rpc::CreatingVerb::Session => boxes::SESSION_BOX_TYPE,
minimald_rpc::CreatingVerb::Task => boxes::TASK_BOX_TYPE,
};
match mfile::projection::spec_digest(spec, verb_type) {
Ok(digest) => {
tracing::info!(
client_projection_digest = %digest,
"computed the box spec's projection digest"
);
request.config.set_client_projection_digest(digest);
}
Err(error) => tracing::warn!(
%error,
"computed no projection digest for the box spec; the create carries none"
),
}
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MEDIUM · correctness · confidence 0.60 · in stamp_client_projection_digest

The client digest is computed from the same JSON the daemon receives, with the same function. The two digests are equal by construction. They cannot show a client and daemon disagreement, which is what the stored pair is for. The expanded spec and the store rules never reach the digest, so the stored client digest does not describe the client's view.

What the reviewer checked

mfile::projection::spec_digest(spec, verb_type) over request.spec, the value sent on the wire; PR notes: 'The digests are equal by construction.'

Hand this to an agent
Act on a code-review finding.

File:       crates/minimal/src/cmd/boxes/create.rs
Lines:      3012-3043
Category:   correctness
Severity:   medium (reviewer confidence 0.60)

Finding:
The client digest is computed from the same JSON the daemon receives, with the same function. The two digests are equal by construction. They cannot show a client and daemon disagreement, which is what the stored pair is for. The expanded spec and the store rules never reach the digest, so the stored client digest does not describe the client's view.

First verify this against the code yourself. It is model output and
may be wrong. If it is wrong, or the tradeoff was deliberate, say so
and change nothing.

👍 useful · 👎 noise — react to tell the reviewer. Replying works too, and says more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 6bbc56e05b33: The client digest is now over the client's typed BoxSpec as a TOML table, not the wire JSON, so a spec changed on the way gives different digests. Store rules still cannot reach the digest: the v0 wire spec refuses a [secrets] key, and that fix is in crates/mfile/src/spec.rs, outside this task (#2410).

Comment thread crates/minimal/src/tests.rs Resolved
Comment thread crates/minimal/src/cmd/box_spec.rs Resolved
@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arch-review: PASS_WITH_CONDITIONS · 2 conditions · the full ruling

The digest and the min box spec render conform to the design. The create still sends the typed BoxSpec without [secrets]. Line 129 of architecture.md says min writes the store rules into the expanded spec that the host receives. The fix is outside this task's layers, but no issue tracks it. File that issue and link it, and correct the PR title (C1). Then name the gap and the issue at stamp_client_projection_digest (C2).

Ruled at 2cf7222 against gominimal/arch@15b603e6afb8 by claude-opus-5-5.

@@ -3003,9 +3003,45 @@ pub(crate) fn put_spec(
spec: &mfile::spec::BoxSpec,
) -> Result<(), anyhow::Error> {
request.spec = Some(serde_json_lenient::to_value(spec).context("Cannot encode the box spec")?);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C1 · This sends the typed BoxSpec, which has no [secrets]. Line 129 says min writes the [secret-store-rules] authorities into the expanded spec that the host receives. Open the issue for the work in C1, and link it in the PR body. Change the title so that it does not say the create sends the store rules.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 0af190cf2ce9: The typed BoxSpec has no [secrets], so the create sends no store rules. The doc comment and the notes now say so and name #2410. I have no gh credential, so a person must retitle the PR and open the issue.

Comment thread crates/minimal/src/cmd/boxes/create.rs Outdated
///
/// A request with no spec, or a spec that does not project, carries no
/// client digest. The daemon then stores none.
pub(crate) fn stamp_client_projection_digest(request: &mut minimald_rpc::CreateSessionRequest) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C2 · This digest binds no secret grants, because the sent spec has no [secrets]. Line 1272 says the projection holds the requested secret scopes. State this gap in the doc comment, and name the issue from C1 as the flip condition.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 0af190cf2ce9: The doc comment on stamp_client_projection_digest now states that the digest binds no secret grants, and names #2410 as the flip condition.

The client's projection digest is now over the typed BoxSpec, read as a
TOML table, not over the JSON the create sends. A spec that changes on
the way now shows as two different digests in the record, and the test
proves it. --vpn-network-names does not restamp, because the list is
outside the projection.

min box spec reads [secret-store-rules] once and gives the proxy rows
the same read. A comment records that the v0 wire spec does not carry
[secrets] yet.
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on the runtime's review findings, pushed as 6bbc56e05b33.

line exit tail
cargo nextest run -p minimal create_stores_client_digest_equal_to_daemon_digest 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-0 in box runtime-implement-test-0-1... Compiling paths v0.0.1 (/workbe
cargo nextest run -p minimal box_spec_render_carries_client_store_rules 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-1 in box runtime-implement-test-1-1... Compiling version v0.8.0 (/work

Verify min task run agent-verify exited 100.

 {
                "parent_span_id": "603ce8f49d86f795",
                "rpc": "minimald-v1-GetSessionRecord",
                "span_id": "1863c712fc0db485",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "1863c712fc0db485",
                "queued_behind": "0",
                "span_id": "03f27f8f7cf91975",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "rpc",
            fields: {
                "parent_span_id": "603ce8f49d86f795",
                "rpc": "minimald-v1-DestroySession",
                "span_id": "29244f4d55201097",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "29244f4d55201097",
                "queued_behind": "0",
                "span_id": "42991015dbc1deb4",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "29244f4d55201097",
                "queued_behind": "0",
                "span_id": "eed6af5c724e4ea1",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "eed6af5c724e4ea1",
                "span_id": "101371f4854053f5",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "eed6af5c724e4ea1",
                "queued_behind": "0",
                "span_id": "f50133dd7fdf6e13",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
     Summary [  84.350s] 1136 tests run: 1135 passed, 1 failed, 2 skipped
        FAIL [   3.603s] (1136/1136) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

Converted to a draft: something above needs a person before review.

Review threads the coder judged:

  • 👍 valid — crates/minimal/src/cmd/boxes/create.rs:3043: The client digest is now over the client's typed BoxSpec as a TOML table, not the wire JSON, so a spec changed on the way gives different digests. Store rules still cannot reach the digest: the v0 wire spec refuses a [secrets] key, and that fix is in crates/mfile/src/spec.rs, outside this task ([refactor:rust] 42 files regressing toward refactor threshold #241
  • 👍 valid — crates/minimal/src/tests.rs:20215: The test now changes a projected value in the wire spec after put_spec, and asserts that the record stores the client's and the daemon's digests and that they differ. Store rules stay uncovered, because the wire spec does not carry them yet.
  • 👍 valid — crates/minimal/src/cmd/box_spec.rs:706: The render reads [secret-store-rules] once and gives the proxy rows the same read. The comment no longer says that a create sends the values, and it records the v0 wire gap. The render still shows upstream and inject, because BOX-071 writes them into the expanded spec.

Create a box with min, and its record holds the client's projection digest beside the daemon's, equal. The client computes its digest from its own spec, so a spec that changes on the way to the daemon gives two different digests in the record.

Notes from the agent: Not delivered: the create does not send store rules or the expanded [secrets] table yet. The wire spec is the v0 BoxSpec, and its SpecDoc in crates/mfile/src/spec.rs refuses unknown keys (deny_unknown_fields). An added secrets key fails the daemon's BoxSpec read. To send the expanded spec, a change to crates/mfile/src/spec.rs is necessary, and that file is outside this task's layers (#2410). So the 'send the expanded spec; fill store_rules' part of the create.rs note stays undone. The store rules reach only the min box spec render. Other checks: clippy -p minimal --all-targets is clean, cargo fmt --check is clean, and 30 related minimal tests (box_spec, spec, vpn, digest filters) pass.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 14, 2026 16:58
@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — advisory review

Verdict COMMENT — 1 finding, 1 inline.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

Comment on lines +3022 to +3054
) {
request
.config
.attrs
.remove(minimald_rpc::CLIENT_PROJECTION_DIGEST_ATTR);
let verb_type = match request.config.creating_verb {
minimald_rpc::CreatingVerb::Session => boxes::SESSION_BOX_TYPE,
minimald_rpc::CreatingVerb::Task => boxes::TASK_BOX_TYPE,
};
let table = match toml::Table::try_from(spec) {
Ok(table) => table,
Err(error) => {
tracing::warn!(
%error,
"computed no projection digest for the box spec; the create carries none"
);
return;
}
};
let Some(facts) = mfile::projection::TypeFacts::of_spec(&table, verb_type) else {
tracing::warn!(
"computed no projection digest for the box spec: it does not name its type's \
built-in root; the create carries none"
);
return;
};
let digest = mfile::projection::project(&table, &facts).digest();
tracing::info!(
client_projection_digest = %digest,
"computed the box spec's projection digest"
);
request.config.set_client_projection_digest(digest);
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOW · correctness · confidence 0.50 · in stamp_client_projection_digest

The client digest is computed from toml::Table::try_from(spec). The daemon computes its digest from the received JSON through spec_digest and Loose. These are two conversions of the same spec. A value that one path keeps and the other drops or retypes (a null, a large integer) gives two different digests for an unchanged spec. The PR notes say the digests are equal by construction. This code does not give that. Use mfile::projection::spec_digest(&request.spec, verb_type) on the JSON that the request sends, so both sides run the same conversion. Then the doc comment that says the digest is 'not over the JSON the request sends' must change too.

What the reviewer checked

create.rs: let table = match toml::Table::try_from(spec) then project(&table, &facts).digest(); projection.rs:500 spec_digest deserializes via Loose from JSON.

Hand this to an agent
Act on a code-review finding.

File:       crates/minimal/src/cmd/boxes/create.rs
Lines:      3022-3054
Category:   correctness
Severity:   low (reviewer confidence 0.50)

Finding:
The client digest is computed from `toml::Table::try_from(spec)`. The daemon computes its digest from the received JSON through `spec_digest` and `Loose`. These are two conversions of the same spec. A value that one path keeps and the other drops or retypes (a null, a large integer) gives two different digests for an unchanged spec. The PR notes say the digests are equal by construction. This code does not give that. Use `mfile::projection::spec_digest(&request.spec, verb_type)` on the JSON that the request sends, so both sides run the same conversion. Then the doc comment that says the digest is 'not over the JSON the request sends' must change too.

First verify this against the code yourself. It is model output and
may be wrong. If it is wrong, or the tradeoff was deliberate, say so
and change nothing.

👍 useful · 👎 noise 10BC8 — react to tell the reviewer. Replying works too, and says more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disputed — not addressed: Using spec_digest on request.spec makes both digests equal by construction, which the earlier valid finding (comment 4574613862) rejected. The two conversions agree on the cases named: toml skips a None field and Loose drops a null, and both refuse an integer above i64::MAX, which gives no client digest, not a false mismatch. The doc comment now says this, and the notes no longer say equal by construction.

@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arch-review: PASS_WITH_CONDITIONS · 1 condition · the full ruling

The client digest is now computed from the client's own spec, and the daemon recomputes its own digest from the spec it receives. Line 1272 of architecture.md requires this. The new test shows that a spec changed on the wire gives two different digests. The create still sends the v0 spec without [secrets]. That is a residual against #2410, as on the earlier head. C1 asks you to update the PR body. It still says the digests are equal by construction and that add_vpn_network_names restamps, and it does not name #2410.

Ruled at 6bbc56e against gominimal/arch@15b603e6afb8 by claude-opus-5-5.

Ok(())
}

/// Sets the client's projection digest of `spec` on `request` (BOX-071).
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C1 · This function now computes the digest from the client's own BoxSpec, not from the JSON on the wire. The PR body still says the opposite. Update the Notes from the agent paragraph as C1 says, and name #2410 there as the residual for the expanded-spec wire.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 0af190cf2ce9: The notes now say the digest comes from the client's own BoxSpec, not the JSON on the wire, and name #2410 as the residual for the expanded-spec wire.

The typed spec the create sends has no [secrets], so the client digest
binds no secret grants. Name #2410 as the change that closes the gap, and
say how the two sides convert the spec.
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 2 of 10 on the runtime's review findings, pushed as 0af190cf2ce9.

line exit tail
cargo nextest run -p minimal create_stores_client_digest_equal_to_daemon_digest 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-0 in box runtime-implement-test-0-1... Compiling paths v0.0.1 (/workbe
cargo nextest run -p minimal box_spec_render_carries_client_store_rules 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-1 in box runtime-implement-test-1-1... Compiling version v0.8.0 (/work

Verify min task run agent-verify exited 100.

 {
                "parent_span_id": "02de30916273b5ac",
                "rpc": "minimald-v1-GetSessionRecord",
                "span_id": "e390bdc9bd23910e",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "e390bdc9bd23910e",
                "queued_behind": "0",
                "span_id": "17efdf97244c91cb",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "rpc",
            fields: {
                "parent_span_id": "02de30916273b5ac",
                "rpc": "minimald-v1-DestroySession",
                "span_id": "339f6c4c5ee337df",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "339f6c4c5ee337df",
                "queued_behind": "0",
                "span_id": "ac7e1779beac35be",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "339f6c4c5ee337df",
                "queued_behind": "0",
                "span_id": "cd752da1c9e1f323",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "cd752da1c9e1f323",
                "span_id": "bf7c496909f31a98",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "cd752da1c9e1f323",
                "queued_behind": "0",
                "span_id": "3779eaccf7b05864",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
     Summary [  68.512s] 1136 tests run: 1135 passed, 1 failed, 2 skipped
        FAIL [   2.917s] (1136/1136) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

Converted to a draft: something above needs a person before review.

Review threads the coder judged:

  • 👍 valid — crates/minimal/src/cmd/boxes/create.rs:3005: The typed BoxSpec has no [secrets], so the create sends no store rules. The doc comment and the notes now say so and name T16 — Fold the layers into one expanded spec, the same bytes every run #2410. I have no gh credential, so a person must retitle the PR and open the issue.
  • 👍 valid — crates/minimal/src/cmd/boxes/create.rs: The doc comment on stamp_client_projection_digest now states that the digest binds no secret grants, and names T16 — Fold the layers into one expanded spec, the same bytes every run #2410 as the flip condition.
  • 👎 invalid — crates/minimal/src/cmd/boxes/create.rs:3063: Using spec_digest on request.spec makes both digests equal by construction, which the earlier valid finding (comment 4574613862) rejected. The two conversions agree on the cases named: toml skips a None field and Loose drops a null, and both refuse an integer above i64::MAX, which gives no client di
  • 👍 valid — crates/minimal/src/cmd/boxes/create.rs:3010: The notes now say the digest comes from the client's own BoxSpec, not the JSON on the wire, and name T16 — Fold the layers into one expanded spec, the same bytes every run #2410 as the residual for the expanded-spec wire.

A person creates a box with min and sees two digests on its record: the client's projection digest beside the daemon's, and the two are equal. The client computes its digest from its own typed spec. The daemon computes its digest from the JSON it receives.

Notes from the agent: Notes from the agent: the client digest is computed from the client's own BoxSpec, read as a TOML table. It is not computed from the JSON on the wire, so it is not equal to the daemon digest by construction. The daemon computes its digest from the received JSON through mfile::projection::spec_digest. The two digests differ when the spec changes on the way. Residual: the create sends the typed BoxSpec, which has no [secrets] table. So the create does not send the [secret-store-rules] authorities, and the digest binds no secret grants. Sending the expanded spec in place of the typed spec is #2410. The PR title says the create sends the store rules. Only the box spec render carries them, so a person must change the title. I have no gh credential, so I did not open an issue or edit the title. A person must open the issue C1 asks for if #2410 does not cover it. This round changed only a doc comment in create.rs.

@agent-137
agent-137 marked this pull request as ready for review November 14, 2026 17:51
@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arch-review: PASS_WITH_CONDITIONS · 1 condition · the full ruling

The compare from 6bbc56e0 adds one doc comment, and that comment is correct. It says that the client digest binds no secret scopes, because the typed spec has no [secrets]. It also names #2410 as the fix. Line 1272 of architecture.md says the projection covers the expanded spec, secret scopes included. That gap stays open as C1, filed on #2410. The change can merge with C1 open.

Ruled at 0af190c against gominimal/arch@15b603e6afb8 by claude-opus-5-5.

/// `toml::Table::try_from`, the daemon through `spec_digest`. Both drop a
/// null, and both refuse an integer that TOML cannot hold.
///
/// Gap: the typed spec has no `[secrets]` table, so this digest binds no
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C1 · This gap is correct and #2410 owns it. Line 1272 of architecture.md says the projection covers the expanded spec, with requested secret scopes. When #2410 sends the expanded spec, compute this digest over it. Then remove this paragraph.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disputed — not addressed: No change this round. The finding agrees with the paragraph, and its action depends on #2410. put_spec still sends the typed BoxSpec, so the gap paragraph stays until #2410 sends the expanded spec. Then the digest moves to that spec and the paragraph goes.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — approval withheld

Verdict COMMENT — APPROVE withheld: 6 unresolved threads — minimal-foundry[bot] crates/minimal/src/cmd/boxes/create.rs, minimal-arch[bot] crates/minimal/src/cmd/boxes/create.rs:3005, minimal-arch[bot] crates/minimal/src/cmd/boxes/create.rs, minimal-foundry[bot] crates/minimal/src/cmd/boxes/create.rs:3063, minimal-arch[bot] crates/minimal/src/cmd/boxes/create.rs:3010, …. No findings.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

…ate-sends-the-client-s-projection-dige

# Conflicts:
#	crates/minimal/src/tests.rs
The base now refuses a create whose client and daemon projection
digests differ, so the changed-spec step checks that refusal.
@agent-137
Copy link
Copy Markdown
Member

/revise Merge origin/main into this branch and resolve the conflicts. #3442 (T28) merged to main at 00:20Z on 2026-11-15, and this PR is now CONFLICTING against main. Keep both sides' behaviour: T28's changes from #3442 and this PR's client-digest changes. Do not rewrite history and do not force-push; add a merge commit. After the merge, the tests this task names must still pass.

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

That /revise is held, not dropped. A coder is already running on #3387. Your note is kept and goes into the next round here, which starts when that coder finishes.

Nothing to type again: the command gets a rocket when its round starts, or a refusal that names the reason. No round was counted for it yet.

box_spec_box_renders_stored_copy adds a secrets table to a copied request
and kept the old client digest, so the daemon refused the create.
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

A merge of main before round 3, not counted against the cap (1 of 3), pushed as 747309f94ffb.

Resolved conflicts in: crates/minimal/src/tests.rs

line exit tail
cargo nextest run -p minimal create_stores_client_digest_equal_to_daemon_digest 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-0 in box runtime-implement-test-0-2... Compiling paths v0.0.1 (/workbe
cargo nextest run -p minimal box_spec_render_carries_client_store_rules 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-1 in box runtime-implement-test-1-2... Compiling version v0.8.0 (/work

Verify min task run agent-verify exited 100.

 {
                "parent_span_id": "b7f432437dabbf98",
                "rpc": "minimald-v1-GetSessionRecord",
                "span_id": "c55f54f20e93727a",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "c55f54f20e93727a",
                "queued_behind": "0",
                "span_id": "3e907f2a79e04d17",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "rpc",
            fields: {
                "parent_span_id": "b7f432437dabbf98",
                "rpc": "minimald-v1-DestroySession",
                "span_id": "2b51630600b45687",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "2b51630600b45687",
                "queued_behind": "0",
                "span_id": "3ff6d6b43e8631ae",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "2b51630600b45687",
                "queued_behind": "0",
                "span_id": "cb1ce508704d4987",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "cb1ce508704d4987",
                "span_id": "6e10e8a35b727f51",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "cb1ce508704d4987",
                "queued_behind": "0",
                "span_id": "60b18abd7cee44ec",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
     Summary [  69.984s] 1135 tests run: 1134 passed, 1 failed, 2 skipped
        FAIL [   2.908s] (1135/1135) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

Converted to a draft: something above needs a person before review.

Review threads the coder judged:

Create a box with min, and its record holds the client's projection digest beside the daemon's, and the two are equal. A create whose spec changes after min computed its digest is now refused by the daemon.

Notes from the agent: The conflict in crates/minimal/src/tests.rs came from two tests appended at the end of the file. The merge commit keeps both. After the merge, main refuses a create whose client and daemon digests differ (BOX-072, ProjectionDigestRefusal in minimald box_manager.rs). So the last step of create_stores_client_digest_equal_to_daemon_digest now expects that refusal, not a record with two different digests. The stamp_client_projection_digest doc comment now says the daemon refuses that create. expander_skew_reports_and_continues from main also passes. just clippy-strict was not run.

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 4 of 10 on a failed check suite, pushed as ee0fa1b510ba.

line exit tail
cargo nextest run -p minimal create_stores_client_digest_equal_to_daemon_digest 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-0 in box runtime-implement-test-0-2... Compiling paths v0.0.1 (/workbe
cargo nextest run -p minimal box_spec_render_carries_client_store_rules 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-1 in box runtime-implement-test-1-2... Compiling version v0.8.0 (/work

Verify min task run agent-verify exited 100.

 {
                "parent_span_id": "81cc570a3c51ca59",
                "rpc": "minimald-v1-GetSessionRecord",
                "span_id": "9ba2f2d4f58b4f0e",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "9ba2f2d4f58b4f0e",
                "queued_behind": "0",
                "span_id": "8f19156a6075afbf",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "rpc",
            fields: {
                "parent_span_id": "81cc570a3c51ca59",
                "rpc": "minimald-v1-DestroySession",
                "span_id": "4c15e71df44b95e3",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "4c15e71df44b95e3",
                "queued_behind": "0",
                "span_id": "3d2a21388e9bb591",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "4c15e71df44b95e3",
                "queued_behind": "0",
                "span_id": "6f49a52b1e960904",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "6f49a52b1e960904",
                "span_id": "c445d0f266f46ec5",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "6f49a52b1e960904",
                "queued_behind": "0",
                "span_id": "f63cc7fad04d0a42",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
     Summary [ 103.049s] 1136 tests run: 1135 passed, 1 failed, 2 skipped
        FAIL [   3.831s] (1136/1136) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

Converted to a draft: something above needs a person before review.

Review threads the coder judged:

  • 👎 invalid — crates/minimal/src/cmd/boxes/create.rs:3021: The paragraph at line 3021 is correct for this branch: the create sends the typed spec, which has no [secrets]. To send the expanded spec with upstream and inject resolved is the work of T16 — Fold the layers into one expanded spec, the same bytes every run #2410, as this comment says. The paragraph goes when T16 — Fold the layers into one expanded spec, the same bytes every run #2410 lands. Nothing to change in this PR.
  • 👍 valid — crates/minimal/src/cmd/boxes/create.rs:3063: Added vpn_network_names_keep_the_client_digest_equal_to_the_daemon_digest, so a test (not only a comment) checks that the --vpn-network-names edit keeps the client digest equal to spec_digest of the sent JSON. I did not move the digest to spec_digest of the sent JSON. An accepted earlier finding (PR

A box created with min stores the client's projection digest beside the daemon's digest, and the two are equal. A create that adds --vpn-network-names keeps the two digests equal, and a test now checks this.

Notes from the agent: Revise round 4. commitlint: commit 2cf7222, which is already on the branch, has a body line longer than 100 characters. The rules forbid me to rewrite commits on the branch, so that check stays red until a squash merge or a person rewords that commit. native-daemon-e2e: the job failed at 'min session activate --network own_ip' with 'ssh connect: Connection reset by peer'. That failure is at the SSH connection to minimald, before the create request, and the diff does not touch that path. I did not reproduce it, because this box cannot run the daemon e2e. ci-linux-native-success is the aggregator, and it failed because native-daemon-e2e failed. clippy -p minimal --all-targets and cargo fmt --check are clean. I did not run just clippy-strict.

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 5 of 10 on a failed check suite: the coder changed nothing. This round changes no code. The failed checks need nothing inside this task's layers. (1) commitlint: the failing message is on commit 2cf7222 ('test(minimal): list the digest test's create in the site inventory'), which an earlier round wrote. A body line is longer than 100 characters. The fix needs a rewrite of that commit, and my instructions forbid a rewrite or a force-push. A person can reword it at squash-merge, or a maintainer can rebase the branch. (2) unit (macOS) and ci-macos-success: on macOS, just test runs only -p minvmd -p boxes -p bep. This branch changes only crates/minimal, which is not in that scope. The log excerpt does not name the failed test, and this box cannot run the macOS lane. ci-macos-success is the aggregator, and it failed because unit failed. I recommend a re-run of the macOS lane. Both test lines pass at the branch head. The local branch also holds a merge of origin/main (99383f5b) that has no conflicts.

@agent-137
agent-137 marked this pull request as ready for review November 15, 2026 22:10
@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — advisory review

Verdict COMMENT — 1 finding, 1 inline.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

Comment thread crates/minimal/src/cmd/boxes/create.rs Outdated
Comment on lines +3011 to +3016
/// The digest is over the client's own spec, read as a TOML table. It is
/// not over the JSON the request sends. The daemon computes its digest from
/// the JSON it receives, so the two digests differ when the spec changes on
/// the way, and the daemon then refuses the create. A spec that names no type is of the creating verb's type, as
/// the daemon reads it.
///
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOW · correctness · confidence 0.60 · in stamp_client_projection_digest

The doc comment is garbled and contradicts itself. It says the digest is over the client's own spec and not over the JSON the request sends. The code computes the digest from toml::Table::try_from(spec) of the typed spec that put_spec also sends as JSON. The test asserts equality with spec_digest of the sent JSON. The comment also has a broken, overlong line. A later reader will misjudge when the daemon refuses a create. Rewrite it to say what the code does.

What the reviewer checked

The digest is over the client's own spec, read as a TOML table. It is not over the JSON the request sends.

Hand this to an agent
Act on a code-review finding.

File:       crates/minimal/src/cmd/boxes/create.rs
Lines:      3011-3016
Category:   correctness
Severity:   low (reviewer confidence 0.60)

Finding:
The doc comment is garbled and contradicts itself. It says the digest is over the client's own spec and not over the JSON the request sends. The code computes the digest from `toml::Table::try_from(spec)` of the typed spec that `put_spec` also sends as JSON. The test asserts equality with `spec_digest` of the sent JSON. The comment also has a broken, overlong line. A later reader will misjudge when the daemon refuses a create. Rewrite it to say what the code does.

First verify this against the code yourself. It is model output and
may be wrong. If it is wrong, or the tradeoff was deliberate, say so
and change nothing.

👍 useful · 👎 noise — react to tell the reviewer. Replying works too, and says more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in ee56cbdcc5b6: Rewrote the doc comment: the digest projects the same typed spec that put_spec sends as JSON, and the two digests differ only when the sent JSON no longer matches it. Fixed the overlong line.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in ee56cbdc: the doc comment on stamp_client_projection_digest now says the client projects the typed spec that put_spec sends as JSON, and the daemon projects the received JSON through spec_digest. The Gap: paragraph naming #2410 stays.

@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8

arch-review: PASS_WITH_CONDITIONS · 1 condition · the full ruling

The new test pins the vpn edit as outside the projection, and it changes nothing that the last ruling decided. The secrets gap stays open. The create sends the typed v0 spec, so the digests bind no secret scopes, and the store rules do not reach the daemon (architecture.md line 1291, lines 1029-1031). Issue #2410 tracks that gap. C1 asks you to name #2410 as a residual in the PR body. C1 also asks you to correct the note about add_vpn_network_names, because it no longer restamps the digest.

Ruled at ee0fa1b against gominimal/arch@327e1b57d16b by claude-opus-5-5.

/// `toml::Table::try_from`, the daemon through `spec_digest`. Both drop a
/// null, and both refuse an integer that TOML cannot hold.
///
/// Gap: the typed spec has no `[secrets]` table, so this digest binds no
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C1 · This gap is the open item against architecture.md line 1291: the digest binds no secret scopes. The comment names #2410, and that is correct. Name the same gap and #2410 in the residuals of the PR body.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in the PR body: a new Residuals section names the gap. The digest binds no secret scopes, the open item against architecture.md line 1291, tracked in #2410.

The doc comment on stamp_client_projection_digest now says that the
digest projects the same typed spec that put_spec sends as JSON, and
that the two digests differ only when the sent JSON no longer matches.
@agent-137
Copy link
Copy Markdown
Member

/revise Two review threads on ee0fa1b need a change.

  1. Arch ruling (PASS_WITH_CONDITIONS), C1 in full: "This gap is the open item against architecture.md line 1291: the digest binds no secret scopes. The comment names T16 — Fold the layers into one expanded spec, the same bytes every run #2410, and that is correct. Name the same gap and T16 — Fold the layers into one expanded spec, the same bytes every run #2410 in the residuals of the PR body." Add a Residuals list to the PR body with that line. Do not use a closing keyword for T16 — Fold the layers into one expanded spec, the same bytes every run #2410.

  2. Code-review finding (low, crates/minimal/src/cmd/boxes/create.rs lines 3011-3016, stamp_client_projection_digest): "The doc comment is garbled and contradicts itself. It says the digest is over the client's own spec and not over the JSON the request sends. The code computes the digest from toml::Table::try_from(spec) of the typed spec that put_spec also sends as JSON. The test asserts equality with spec_digest of the sent JSON. The comment also has a broken, overlong line. A later reader will misjudge when the daemon refuses a create. Rewrite it to say what the code does." First check the finding against the code. If it is right, rewrite the doc comment to say what the code does, and keep the Gap: paragraph that names T16 — Fold the layers into one expanded spec, the same bytes every run #2410. If it is wrong, change nothing and reply on the thread with the reason.

After the change, the two tests this task names must still pass. Do not rewrite history and do not force-push.

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

That /revise is held, not dropped. A coder is already running on #3387. Your note is kept and goes into the next round here, which starts when that coder finishes.

Nothing to type again: the command gets a rocket when its round starts, or a refusal that names the reason. No round was counted for it yet.

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 6 of 10 on the runtime's review findings, pushed as ee56cbdcc5b6.

line exit tail
cargo nextest run -p minimal create_stores_client_digest_equal_to_daemon_digest 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-0 in box runtime-implement-test-0-1... Compiling paths v0.0.1 (/workbe
cargo nextest run -p minimal box_spec_render_carries_client_store_rules 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-1 in box runtime-implement-test-1-1... Compiling version v0.8.0 (/work

Verify min task run agent-verify exited 100.

 {
                "parent_span_id": "188babe73bfd11a8",
                "rpc": "minimald-v1-GetSessionRecord",
                "span_id": "17f577532b9d466f",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "17f577532b9d466f",
                "queued_behind": "0",
                "span_id": "a41439288310ea5b",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "rpc",
            fields: {
                "parent_span_id": "188babe73bfd11a8",
                "rpc": "minimald-v1-DestroySession",
                "span_id": "9c2f17aed4595b67",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "9c2f17aed4595b67",
                "queued_behind": "0",
                "span_id": "3d466b645fc0bf34",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "9c2f17aed4595b67",
                "queued_behind": "0",
                "span_id": "0ffef45b7e9432d3",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "0ffef45b7e9432d3",
                "span_id": "8ec5900af2120d14",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "0ffef45b7e9432d3",
                "queued_behind": "0",
                "span_id": "22498ec6959c5d16",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
     Summary [ 107.774s] 1145 tests run: 1144 passed, 1 failed, 2 skipped
        FAIL [   4.231s] (1145/1145) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

Converted to a draft: something above needs a person before review.

Review threads the coder judged:

  • 👍 valid — crates/minimal/src/cmd/boxes/create.rs:3016: Rewrote the doc comment: the digest projects the same typed spec that put_spec sends as JSON, and the two digests differ only when the sent JSON no longer matches it. Fixed the overlong line.

When a person creates a box with min, the box record stores the client's projection digest beside the daemon's digest, and the two are equal.

Notes from the agent: Revise round 6: this round changes only the doc comment on stamp_client_projection_digest. The secret-grants gap paragraph stays, and #2410 tracks it.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 15, 2026 22:54
@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arch-review: PASS_WITH_CONDITIONS · 1 condition · the full ruling

The compare since ee0fa1b5 is a clean merge of main and one doc-comment fix. The doc comment now matches the code, so the baseline ruling stands. One gap stays open. The create sends the typed spec, so the digest binds no secret scopes (architecture.md line 1291, box.toml lines 203-207). C1 keeps that as a residual under #2410.

Ruled at ee56cbd against gominimal/arch@327e1b57d16b by claude-opus-5-5.

/// the daemon then refuses the create. A spec that names no type is of the
/// creating verb's type, as the daemon reads it.
///
/// Gap: the typed spec has no `[secrets]` table, so this digest binds no
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C1 · This gap stays open under #2410. Line 1291 of architecture.md says the projection includes the requested secret scopes. Send the expanded spec in put_spec, with upstream and inject from [secret-store-rules]. Then remove this paragraph.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tracked in #2410: sending the expanded spec in put_spec, with upstream and inject from [secret-store-rules], and removing this Gap: paragraph are that issue's work. The PR body lists it under Residuals.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — approval withheld

Verdict COMMENT — APPROVE withheld: 11 unresolved threads — minimal-foundry[bot] crates/minimal/src/cmd/boxes/create.rs, minimal-arch[bot] crates/minimal/src/cmd/boxes/create.rs:3222, minimal-arch[bot] crates/minimal/src/cmd/boxes/create.rs, minimal-foundry[bot] crates/minimal/src/cmd/boxes/create.rs:3279, minimal-arch[bot] crates/minimal/src/cmd/boxes/create.rs:3227, …. No findings.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 7 of 10 on a /revise note: the coder changed nothing. This round adds no commit. Note item 2 is already done at the branch head: commit ee56cbd rewrote the stamp_client_projection_digest doc comment. The comment now says that the client projects the typed spec that put_spec sends as JSON, and that the daemon projects the received JSON through spec_digest. It keeps the Gap paragraph that names #2410. I checked its claim that a differing digest refuses the create against crates/minimald/src/box_manager.rs (ProjectionDigests::mismatch, the refusal near line 4563). The claim is correct. Note item 1, for the PR body:

Residuals:

@agent-137
agent-137 marked this pull request as ready for review November 15, 2026 23:50
@mitodrummer mitodrummer left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

@mitodrummer
mitodrummer added this pull request to the merge queue Nov 16, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 16, 2026
@agent-137
agent-137 added this pull request to the merge queue Nov 16, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 16, 2026
@agent-137
agent-137 added this pull request to the merge queue Nov 16, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 16, 2026
@agent-137
agent-137 added this pull request to the merge queue Nov 16, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 16, 2026
@agent-137
agent-137 added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit da45d08 Nov 16, 2026
39 of 40 checks passed
@agent-137
agent-137 deleted the agent/3387-a-real-create-sends-the-client-s-projection-dige branch November 16, 2026 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

T128 — A real create sends the client's projection digest and store rules

2 participants

0