Repository navigation
T98 — Seal a store handle per accepted store rule at box creation - #2803
norrietaylor merged 6 commits into
Conversation
Box creation mints a store handle for each store reference that a [secret-store-rules] rule accepts, seals it as a store member, and puts it on the create request under the grant's variable. A box with store references only registers with the proxy with no GitHub sign-in.
The test seals store members over a proxy control socket it serves, so the connect-site inventory lists it as ungated. The test now checks the sealed deliveries without building a create request.
…re-handle-per-accepted-store-rule-at-b
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Approved: every review thread resolved at @norrietaylor resolved the last thread, which releases the approval this review had withheld. Nothing to do. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The change conforms to Gatehouse §6.10 line 842 and architecture D6. Each accepted store reference gets one sealed value with one store member. The handle is signed under the registered client key and carries the rule's upstream set and injection form. Creation refuses a reference with no accepted rule, and a failed store mint forgets the box at the proxy. The mint_grants branch for a store-only box has no test of its own, but no design line requires one.
Ruled at 64165d1 against gominimal/arch@8640f85e193d by claude-opus-5-5.
norrietaylor
left a comment
There was a problem hiding this comment.
Requesting changes at 64165d1.
The mint, rollback and revoke logic are correct. The one defect is user-facing text.
Store-only boxes are told they declare a GitHub grant. With this PR, a box whose only secrets are source = "store" references reaches the mint for the first time. This PR changed only the two bail! sites in mint_grants. Every other refusal on this path still says "GitHub grant":
crates/boxes/src/core/bep.rs:733:UnenrolledNodeprints "it declares the GitHub grant {grants}".create.rs:758and:1594now passproxy_grant_names(&github_grants, &store_grants)intogrant_box_facts. On a native Linux host, a box with onlyOPENAI_KEY = { source = "store", ... }is refused with "it declares the GitHub grant OPENAI_KEY".crates/minimal/src/mint.rs:195,:202,:207,:231: theMintErrortexts say "it declares a GitHub grant".require_proxychecks onlyis_github()grants. So when the proxy is not running, the most common store-box failure reads "it declares a GitHub grant, and the Box Egress Proxy has not published its keys".crates/minimal/src/cmd/boxes/create.rs:694:no_root_certificate()says "it declares a GitHub grant".create.rs:786reaches it for store-only boxes too.
Carry the declares distinction from mint_grants into each of these messages, and pin the store-only wording in a test for at least the not-running case. AGENTS.md "User-facing text": say only what the code can prove, and use one name for one thing.
Minor: the doc comment on hand_grants (create.rs:714) says "A box with no GitHub grant gets neither". That is no longer true for store-only boxes.
Checked and correct:
- One sealed
Storemember per accepted reference. - Store rules run before any mint. The legacy broker spelling is refused earlier.
ProxyRegistrationforgets the box on a partial mint.- Destroy revokes.
- No secret is logged.
- The
tests.rs"ungated" entry is test-only.
No test exercises the rollback through mint_grants, because the new test calls mint_store_members directly.
Arch (local build:arch-review at arch 8640f85e): PASS_WITH_CONDITIONS. BEP-063 and BEP-032 conform. C1: run proof_bep_store_reference_end_to_end steps 3-5 live before #2525 closes. This PR closes #2525 on merge, so that residual needs another home first.
|
Round 1 of 10 on the runtime's review findings: the coder changed nothing. every commit this round put on the branch above 64165d1 is a merge of the base branch, so it carries no work of its own Review threads the coder judged:
|
|
/revise Fix the store-only refusal text. A box whose only secrets are
Pin the store-only wording of the proxy-not-running refusal in a test. Keep the GitHub wording unchanged for GitHub-only boxes. If a GitHub-pinned test changes, say why in the PR body. In the PR body, name #2806 as the residual for the live e2e of Do not change the mint, rollback or revoke logic. They are correct. |
…re-handle-per-accepted-store-rule-at-b
A box whose only proxy-served secrets are source = "store" references was told it declares a GitHub grant. The unenrolled-node refusal, the proxy mint errors and the missing root certificate refusal now carry the distinction that mint_grants already made. GitHub boxes keep their text.
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The ruling on 64165d14 stands. The merge of main is clean. The new commit changes only the refusal text for a box that has only store references. The refusal code stays gatehouse_unenrolled_node, as Gatehouse §6.2 line 580 requires. The store-member mint stays as §6.10 line 842 describes it.
Ruled at 148818a against gominimal/arch@8640f85e193d by claude-opus-5-5.
|
Round 2 of 10 on a /revise note, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. Review threads the coder judged:
A box created with an accepted store rule carries its store handle sealed as a store member, and the proxy redeems it into the store value that the rule admits. A box whose only secrets are source = "store" references now gets refusals that name its secrets and do not call them a GitHub grant. These are the unenrolled-node refusal, the proxy-not-running and unpublished-keys refusals, the no-random-bytes refusal and the no-root-certificate refusal. GitHub-only boxes keep the same text as before. Notes from the agent: Revise round 2. The /revise note required one change in crates/boxes/src/core/bep.rs, which the layers do not name: BepRefusal::UnenrolledNode gains a |
norrietaylor
left a comment
There was a problem hiding this comment.
Approving at 148818a. The refusals on the store-only path now name store secrets instead of a GitHub grant:
UnenrolledNode- the
MintErrortexts, throughStoreOnlyMintError no_root_certificate
GitHub-only boxes keep their text. a_store_only_box_is_refused_without_naming_a_github_grant pins it for the not-running, random and missing-root cases. The crates/minimal/src/main.rs change is the one new field in a struct literal. The mint, rollback and revoke code is unchanged from the head I reviewed earlier. One loose end from the /revise: the PR body does not yet name #2806 as the residual for the live e2e of steps 3-5.
There was a problem hiding this comment.
minimal-review — approved
Verdict APPROVE — every review thread is resolved; @norrietaylor closed the last one. The review of 148818a96b47 withheld this approval on the threads open then. Posted as a comment: the App cannot approve its own pull request; the check and the label carry it.
T98 — Seal a store handle per accepted store rule at box creation
slice: S13
kind: task
covers: BEP-063, BEP-032
size: M
est: 160 code, 200 tests
executor: agent
difficulty: needs care
model: standard
diagnostics:
min box specandmin box audit <box>show each store member the box carries, as T60 and T85 print them today, now with a callerobservability: none new: each redemption of the sealed member writes the BEP-039 audit record T85 writes, with the handle's jti
layers:
- mint:
- crates/minimal/src/mint.rs:
mint_store_handleandstore_claimsgain their caller, and thedead_codeexpectations that name #2525 go, and so do the module doc's sentences that saymint_store_handlehas no caller and that #2526 owns themin box specstore references- crates/minimal/src/cmd/boxes/create.rs: box creation mints a store handle for each accepted store rule and seals it as a
storemember (#2525), in place of_accepted_store_rulestest: cargo nextest run -p minimal box_creation_seals_a_store_member_per_accepted_rule
- audit:
- crates/minimal/src/cmd/box_audit.rs: a test renders a refused store-handle record and pins
store_handle_invalid, the item as<store>:<id>andjti=<jti>on its line, with the subject in the spelling the reader matches (moved here 2026-10-31, owner, from #2468)test: cargo nextest run -p minimal box_audit_shows_a_refused_store_handle_with_its_item_and_jti
produces: none
consumes: none
proof: A box created with an accepted store rule carries its store handle sealed as a store member, and the proxy redeems it into the store value that the rule admits. Its tasks re-cover requirements whose origin tasks merged with an arch condition held on a filed residual; the owner accepted that double coverage on 2026-10-26 so the residuals dispatch as slices.
depends on:
- blocked by #2288
- blocked by #2540
- blocked by #2656
- blocked by #2257
- assumes OQ3 (the mint reads the root certificate's own expiry, and the root is generated with a fixed default validity in one constant that gominimal/arch#85's ruling replaces)
Generated by Claude Code
Proof
A box created with a store reference that a [secret-store-rules] rule accepts now gets one sealed value for each such reference, on the create request under the grant's variable. Each value is a store member that holds a store handle for the rule. The test opens each value with the proxy's key and reads its handle under the rule that admitted it. The handle is valid, carries the rule's injection form and has its own jti. That is the handle the proxy redeems into the store value.
min box auditshows a refused store handle on one line, with store_handle_invalid, the item as keychain:openai-key and jti=.Notes from the agent: Out of layers: crates/minimal/src/tests.rs got one line in the every_daemon_connection_is_classified inventory. The new create.rs test connects ControlClient to a proxy control socket that it serves itself. The inventory lists every such connect site, the same as the mint.rs tests, so the test failed without the line. Design: mint.rs gains StoreGrant and mint_store_members. mint_store_members calls mint_store_handle for each grant, then seals the handle as a MemberKind::Store member under the GITHUB module context, which is the one module bep serve opens values under. It also writes a mint audit record with the identifier :. In create.rs, mint_grants now also runs for a box that has store references and no GitHub grant. That box registers its egress and stance with the proxy directly, with no sign-in. A ProxyRegistration guard forgets the box if a store mint fails. The grant_box_facts refusal (unenrolled node) now names the store grants too. Printed text changed: (1) GrantNotDelivered::NotSealed said 'its GitHub grant '. A store grant can now hit it, so it says 'the secret '. Its test in create.rs is updated. (2) The two mint_grants bails ('no home directory', 'clock before 1970') say 'a secret from the host's secret store' for a store-only box. Not changed: no_root_certificate() still says 'it declares a…[truncated]
Tests
cargo nextest run -p minimal box_creation_seals_a_store_member_per_accepted_rulecargo nextest run -p minimal box_audit_shows_a_refused_store_handle_with_its_item_and_jtiVerify
min task run agent-verifyexited 100 under rustc 1.99.0, which the repository does not pin (1.99.1 in rust-toolchain.toml); the PR is not a draft on that alone — CI, which honours the pin, is the gate.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/cmd/boxes/create.rscrates/minimal/src/tests.rsOut of scope
These files are outside the task's
layers:, so this PR is a draft:crates/minimal/src/tests.rsResidual: the live e2e of
proof_bep_store_reference_end_to_endsteps 3-5 (arch C1) is not run on this head. #2806 carries it, so #2525 can close on merge.Closes #2525