Skip to content

feat(bep): wire the redemption decision and each box's declared egress into bep serve - #2486

Merged
norrietaylor merged 9 commits into
mainfrom
agent/2483-wire-the-redemption-decision-and-each-box-s-decl
Oct 22, 2026
Merged

norrietaylor merged 9 commits into
mainfrom
agent/2483-wire-the-redemption-decision-and-each-box-s-decl

Conversation

@minimal-foundry

Copy link
Copy Markdown
Contributor

T41 — Wire the redemption decision and each box's declared egress into bep serve

slice: S0
kind: task
covers: BEP-019, BEP-020, BEP-022, BEP-025
size: L
est: 400 code, 400 tests
executor: agent
difficulty: needs care
model: strongest
diagnostics: min box audit <box> shows each redemption's admit with the member identifier and each refusal with its check marker (undecryptable, cross_box, outside_declared_egress, host_mismatch), never the credential; a box whose declared egress the proxy has not registered is refused outside_declared_egress
observability: one info log line when bep serve installs the redeemer naming the registry path, and one debug line per registered box naming its id and the count of its declared authorities, never a credential
layers:
- registry:
- crates/bep/src/boxes.rs (new): per box id, the declared egress authorities and the own_ip or host_ip stance, registered over the control socket at creation and removed at destroy
- crates/bep/src/control.rs: a RegisterBox request carrying the box id, its declared egress and its stance, and a ForgetBox request
- crates/bep/src/lib.rs: module line
test: cargo nextest run -p bep registered_box_egress_is_read_per_request
test: cargo nextest run -p bep forgotten_box_is_refused_no_live_box
- decide:
- crates/bep/src/redeemer.rs (new): the forward::Redeemer over redeem::decide: opens the sealed value under the proxy key, verifies the handle against the registered client keys, resolves a sign-in reference to the member's credential from the Keychain item, takes attribution and the declared egress from the registry, and passes the revocations in force
- crates/bep/src/forward.rs: Unwired stays the test default; the serving proxy installs the real redeemer
test: cargo nextest run -p bep sealed_member_is_redeemed_within_declared_egress
test: cargo nextest run -p bep cross_box_value_is_refused_cross_box
test: cargo nextest run -p bep prop_serve_redeems_iff_decide_admits
- serve:
- crates/bep/src/main.rs: bep serve installs the redeemer through Proxy::with_redeemer and gives the proxy the control registry; the NoSigningKey doc and the startup warn! say that #2440 alone gates leaf signing now that the decision is wired
test: cargo nextest run -p bep serve_installs_the_redeemer_and_registry
produces: none
consumes:
- crates/bep/src/redeem.rs
- crates/bep/src/forward.rs
- crates/bep/src/handle.rs
- crates/bep/src/signin.rs
- crates/bep/src/seal.rs
- crates/bep/src/control.rs
proof: A request carrying a sealed member from a registered box inside its declared egress reaches the upstream with the credential in place, and the same request from another box, or to a host the box did not declare, is refused before anything goes upstream.
depends on:
- blocked by T1
- blocked by T4
- blocked by T7
- blocked by T10
- blocked by T11
- blocked by T12
- blocked by T14


Generated by Claude Code

Proof

In the redeemer tests, a request goes through forward_requests with a value sealed for a registered box, to an authority in that box's declared egress. The bytes that reach the upstream carry Bearer <sign-in token> and not the sealed value. The audit record is an admit that names github:<instance> and does not contain the token. The same value sent from another registered own_ip box is refused cross_box. Sent to a host the box did not declare, it is refused outside_declared_egress. In both refusals, zero bytes reach the upstream. bep serve now installs this redeemer, and its control socket accepts register_box and forget_box.

Notes from the agent: Decisions the next tasks need to know:

  • Box Host identity: nothing in the tree defined the host/node_id string that a sealed value and its handle bind. bep serve uses the sealing key fingerprint (ProxyPublicKey::kid), which the published identity already carries. The minting client must use the same value. serve_installs_the_redeemer_and_registry pins this.
  • Revocations in force: no revocation store exists yet. BoxRedeemer::with_revocations takes a shared list, and bep serve passes an empty one. Restoring revocations from the audit log (BEP-067 and the restore-on-start sub-requirement) is still open. forget_box does not record a revocation.
  • A sign-in reference that decide admits, but whose item is gone, names another instance, or has an expired token, is refused github_sign_in_required (redeemer::SIGN_IN_REQUIRED). The redeemer does no token renewal. A token in the renews-at-proxy standing is refused the same way for now.
  • Open errors that no Check names (host or module mismatch, malformed, unsupported, bad members, a keychain key failure) are refused undecryptable, with the reason in a debug line.
  • Only one host-set version is known for each module. A value sealed under another version gets an empty bound set, so it is refused outside_bound_set.
  • For a host_ip …[truncated]

Tests

line exit tail
cargo nextest run -p bep registered_box_egress_is_read_per_request 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-e5b8... Compiling bep v0.0.1 (/workbench/crates/bep) Finished 'test' profile [unoptimized] target(s) in 13.95s ──────────── Nextest run ID 4bbe7c2d-8263-4b11-831d-212f676942e4 with nexte
cargo nextest run -p bep forgotten_box_is_refused_no_live_box 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-8dee... Finished 'test' profile [unoptimized] target(s) in 0.32s ──────────── Nextest run ID b2648b1d-5c45-4d02-925a-658d96211f68 with nextest profile: default Starting 1 test across 2
cargo nextest run -p bep sealed_member_is_redeemed_within_declared_egress 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-27a5... Finished 'test' profile [unoptimized] target(s) in 0.33s ──────────── Nextest run ID 6088681d-8871-4537-a842-e1d097296485 with nextest profile: default Starting 1 test across 2
cargo nextest run -p bep cross_box_value_is_refused_cross_box 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-352c... Finished 'test' profile [unoptimized] target(s) in 0.34s ──────────── Nextest run ID f78a290e-51ff-4023-93cb-70188fac8480 with nextest profile: default Starting 1 test across 2
cargo nextest run -p bep prop_serve_redeems_iff_decide_admits 0 Applying loadouts: default Running task runtime-implement-test-4 in session task-runtime-implement-test-4-86b2... Finished 'test' profile [unoptimized] target(s) in 0.34s ──────────── Nextest run ID 861228a9-c717-406d-a2b9-1c37c03775cb with nextest profile: default Starting 1 test across 2
cargo nextest run -p bep serve_installs_the_redeemer_and_registry 0 Applying loadouts: default Running task runtime-implement-test-5 in session task-runtime-implement-test-5-12fa... Finished 'test' profile [unoptimized] target(s) in 0.32s ──────────── Nextest run ID 66f33805-2bb1-4553-b222-ea57ad8844aa with nextest profile: default Starting 1 test across 2

Verify

min task run agent-verify passed ([tasks.verify]).

Closes #2483

A register_box request records a box's egress authorities and its own_ip
or host_ip stance, and forget_box removes the box at destroy. The
registry answers egress and attribution per box id, and an unregistered
box is attributed to no live box.
BoxRedeemer opens a sealed value under the proxy key, verifies its
handle under the registered client keys, reads attribution and egress
from the box registry, and gives them with the revocations in force to
redeem::decide. Only on an admit does it read the sign-in item for the
credential. Unwired stays the test default.
bep serve keeps the loaded sealing key, wires it with the host keychain
into the redeemer, and gives the control socket the same registries. The
NoSigningKey doc and the startup warning now say that a signing key
(#2440) alone gates leaf signing.
@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

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

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fcc9f9d1-7695-408b-99ac-8ce9b70b2720

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

Comment @coderabbitai help to get the list of available commands.

@minimal-foundry

minimal-foundry Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Approved: every review thread resolved at ca37e46bbc69.

@norrietaylor resolved the last thread, which releases the approval this review had withheld.

Nothing to do.

@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 — 2 findings, 2 inline.

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

Comment thread crates/bep/src/redeemer.rs Resolved
Comment thread crates/bep/src/main.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 four covered requirements conform to Gatehouse §6.10. The redeemer fails closed, reads the sender's declared egress, and resolves the credential only after an admit. Two interims are in the code with no label and no issue. The redeemer refuses a token that BEP-069 says the proxy must renew, and bep serve passes an empty revocation list. Line 839 requires both. Label each interim and link its issue, as C1 and C2 say. Both stay dormant until #2440, so the change can merge with them open.

Ruled at 669cd4e against gominimal/arch@109541a48c31 by claude-opus-5-5.

Comment thread crates/bep/src/redeemer.rs Resolved
Comment thread crates/bep/src/main.rs Resolved

@norrietaylor norrietaylor 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.

Babysitter review of T41 at 669cd4e (round 0). Not an approval yet.

Verified line by line against spec 24: the box registry is read at each request, so a registration or a forget decides the next request, and a box that is not registered has no declared egress and is no live box; the control socket's register_box fails closed on an authority that does not parse; the redeemer opens the value bound to the attributed own_ip box, or to each live host_ip box in turn, verifies the handle under the registered client keys, and gives decide the revocations, the bound and current host sets and the declared egress; the credential is resolved only after an admit, from the Keychain item whose instance the reference names and whose token is live (BEP-019, BEP-020, BEP-022, BEP-025); the property test proves the serving shell admits exactly when the pure decision admits. bep serve shares the client keys and the boxes between the control socket and the redeemer, and the Box Host identity is the sealing key fingerprint, which the minting client must bind to as well. All three commits lint.

The arch ruling's two conditions and the runtime's two findings go to one round, all documentation: label the RenewsAtProxy refusal as an interim with BEP-069 as its flip and #2279 as its issue; state at the bep serve wiring that no revocation is in force until #2290 restores them at start and #2277 records them; say that store rules are empty until #2280, so a store-handle member is never admitted here; and make the startup warning and the NoSigningKey doc say what still stands between a signing key and a serving proxy.

One finding for the plan, not this PR: nothing in the epic sends register_box at a box's creation or forget_box at its destroy, so until a creator does, every box is refused outside_declared_egress. That goes to the person with the T14 split.


Generated by Claude Code

Copy link
Copy Markdown
Member

/revise

Carry the two arch-review conditions at 669cd4e (ruling 5607526616) and the two review findings. Every item is documentation of an interim; change no behaviour.

C1 (arch, thread 4343076444). In redeemer.rs, the check that refuses a RenewsAtProxy token as github_sign_in_required is an interim. Say so on it: BEP-069 renews the token at the proxy before substituting, and T24 (#2279) wires that renewal; until then the refusal stands and min auth status tells the user the token renews at the proxy.

C2 (arch, thread 4343076446). At the bep serve wiring in main.rs, state that BoxRedeemer::new starts with no revocation in force: T20 (#2277) records revocations over the control socket, and T33 (#2290) restores them from every retained segment at start, the BEP-068 restore-on-start sub-requirement. Name both as the flip. Make the BoxRedeemer::new and facts docs say the same instead of "passes the revocations in force".

Review MEDIUM (thread 4343067999). Beside the revocations note, say that read_opened gets no store rules until T25 (#2280) reads [secret-store-rules], so a store-handle member is never admitted by this redeemer yet. Reply on the thread with the commit.

Review LOW (thread 4343068006). Rewrite the startup warn! to say what still stands between a signing key and a serving proxy: no CA key signs a leaf (#2440), no creator registers a box's declared egress yet, and no revocation is in force until #2277 and #2290. Make the NoSigningKey doc describe the code, not the change. Reply on the thread with the commit.

Reply on each arch thread with the commit that carries it.


Generated by Claude Code

@minimal-foundry

Copy link
Copy Markdown
Contributor Author

That /revise was refused. T41 is blocked by still-open #2273. The plan's order is the point of having one..

Round 1 of 10 was not counted; #2483 carries the same sentence.

Copy link
Copy Markdown
Member

/revise

Carry the two arch-review conditions at 669cd4e (ruling 5607526616) and the two review findings. Every item is documentation of an interim; change no behaviour.

C1 (arch, thread 4343076444). In redeemer.rs, the check that refuses a RenewsAtProxy token as github_sign_in_required is an interim. Say so on it: BEP-069 renews the token at the proxy before substituting, and T24 (#2279) wires that renewal; until then the refusal stands and min auth status tells the user the token renews at the proxy.

C2 (arch, thread 4343076446). At the bep serve wiring in main.rs, state that BoxRedeemer::new starts with no revocation in force: T20 (#2277) records revocations over the control socket, and T33 (#2290) restores them from every retained segment at start, the BEP-068 restore-on-start sub-requirement. Name both as the flip. Make the BoxRedeemer::new and facts docs say the same instead of "passes the revocations in force".

Review MEDIUM (thread 4343067999). Beside the revocations note, say that read_opened gets no store rules until T25 (#2280) reads [secret-store-rules], so a store-handle member is never admitted by this redeemer yet. Reply on the thread with the commit.

Review LOW (thread 4343068006). Rewrite the startup warn! to say what still stands between a signing key and a serving proxy: no CA key signs a leaf (#2440), no creator registers a box's declared egress yet, and no revocation is in force until #2277 and #2290. Make the NoSigningKey doc describe the code, not the change. Reply on the thread with the commit.

Reply on each arch thread with the commit that carries it.


Generated by Claude Code

State that the redeemer starts with no revocation in force (T20 #2277,
T33 #2290, BEP-068 restore-on-start), reads no store rules until T25
(#2280), and refuses a RenewsAtProxy token until T24 (#2279) wires the
BEP-069 renewal. Rewrite the startup warning to list what still stands
between a signing key and a serving proxy. No behaviour changes.

@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/bep/src/control.rs Resolved
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on a /revise note, pushed as c2d181c27a8b.

line exit tail
cargo nextest run -p bep registered_box_egress_is_read_per_request 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-e3f6... Compiling bep v0.0.1 (/workbench/crates/bep) Finished 'test' profile [unoptimized] target(s) in 14.09s ──────────── Nextest run ID 38502fde-28da-4dc1-8185-b4023ef51a99 with nexte
cargo nextest run -p bep forgotten_box_is_refused_no_live_box 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-1a6f... Finished 'test' profile [unoptimized] target(s) in 0.34s ──────────── Nextest run ID 978857e9-76e2-4d67-8281-87326d781609 with nextest profile: default Starting 1 test across 2
cargo nextest run -p bep sealed_member_is_redeemed_within_declared_egress 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-4310... Finished 'test' profile [unoptimized] target(s) in 0.34s ──────────── Nextest run ID b51412a6-b47f-4932-888b-460b01de37f8 with nextest profile: default Starting 1 test across 2
cargo nextest run -p bep cross_box_value_is_refused_cross_box 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-3fba... Finished 'test' profile [unoptimized] target(s) in 0.33s ──────────── Nextest run ID 3fa503ce-bb20-4c4e-bb52-28066d70bf2e with nextest profile: default Starting 1 test across 2
cargo nextest run -p bep prop_serve_redeems_iff_decide_admits 0 Applying loadouts: default Running task runtime-implement-test-4 in session task-runtime-implement-test-4-f4e3... Finished 'test' profile [unoptimized] target(s) in 0.37s ──────────── Nextest run ID 43780278-8402-47b4-be9c-6ee5424d55de with nextest profile: default Starting 1 test across 2
cargo nextest run -p bep serve_installs_the_redeemer_and_registry 0 Applying loadouts: default Running task runtime-implement-test-5 in session task-runtime-implement-test-5-3053... Finished 'test' profile [unoptimized] target(s) in 0.36s ──────────── Nextest run ID befa3a70-c810-41ce-b0ee-8c20d5bff8e8 with nextest profile: default Starting 1 test across 2

Verify min task run agent-verify passed.

Review threads the coder judged:

A request that carries a sealed member from a registered box, to a host inside the box's declared egress, reaches the upstream with the credential in place. The same request from another box, or to a host the box did not declare, is refused before anything goes upstream. This round adds no behaviour. The code now states its interims: no revocation is in force until #2277 and #2290, no store rules until #2280, and a RenewsAtProxy token is refused until #2279.

Notes from the agent: Revise round 1 changes only documentation, comments and the startup warn! log text, in commit c2d181c. The module doc, the BoxRedeemer::new doc and the facts doc no longer say that the redeemer passes the revocations in force. cargo clippy -p bep --all-targets is clean, and cargo fmt --check is clean. I did not run just clippy-strict.

@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 redemption decision conforms to Gatehouse §6.10 lines 823 and 839. The registry fails closed, and each interim refuses and names a flip issue. Two edits remain, both in the startup warn! in serve(). C1: name the issue that makes the host-side creator send register_box and forget_box. C2: state the renewal interim (#2279) and the store-rule interim (#2280) beside the revocation interim. The change can merge with these open.

Ruled at c2d181c against gominimal/arch@109541a48c31 by claude-opus-5-5.

Comment thread crates/bep/src/main.rs Resolved
Comment thread crates/bep/src/main.rs Resolved
RegisterBox trimmed a trailing dot from the whole host:port text, so
github.com.:8443 kept the dot in the stored host and never matched a
request. Strip it from the host part after parsing, and refuse a host
that is only dots.
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 2 of 10 on the runtime's review findings, pushed as 2376ce1dbe98.

line exit tail
cargo nextest run -p bep registered_box_egress_is_read_per_request 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-e2b5... Compiling bep v0.0.1 (/workbench/crates/bep) Finished 'test' profile [unoptimized] target(s) in 12.16s ──────────── Nextest run ID d91ce16b-9688-43c7-9377-9060df35f4a2 with nexte
cargo nextest run -p bep forgotten_box_is_refused_no_live_box 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-da2d... Finished 'test' profile [unoptimized] target(s) in 0.31s ──────────── Nextest run ID 8696993e-0188-4acd-b928-125f3379c98c with nextest profile: default Starting 1 test across 2
cargo nextest run -p bep sealed_member_is_redeemed_within_declared_egress 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-53a9... Finished 'test' profile [unoptimized] target(s) in 0.34s ──────────── Nextest run ID 4d00a0fa-537d-42a0-b24b-a5025dc34baf with nextest profile: default Starting 1 test across 2
cargo nextest run -p bep cross_box_value_is_refused_cross_box 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-fbda... Finished 'test' profile [unoptimized] target(s) in 0.32s ──────────── Nextest run ID 2a4d956c-ae53-495f-bb51-d4ef6cebc55d with nextest profile: default Starting 1 test across 2
cargo nextest run -p bep prop_serve_redeems_iff_decide_admits 0 Applying loadouts: default Running task runtime-implement-test-4 in session task-runtime-implement-test-4-6999... Finished 'test' profile [unoptimized] target(s) in 0.29s ──────────── Nextest run ID 2aed4620-94c5-4070-96bf-9664a6946f2c with nextest profile: default Starting 1 test across 2
cargo nextest run -p bep serve_installs_the_redeemer_and_registry 0 Applying loadouts: default Running task runtime-implement-test-5 in session task-runtime-implement-test-5-41ee... Finished 'test' profile [unoptimized] target(s) in 0.39s ──────────── Nextest run ID ebcb1183-00da-43dc-b970-e33229568f24 with nextest profile: default Starting 1 test across 2

Verify min task run agent-verify passed.

Review threads the coder judged:

A request with a sealed member from a registered box, sent to a host in that box's declared egress, reaches the upstream with the credential in place. The same request from another box, or to a host that the box did not declare, is refused before anything goes upstream. A declared authority such as github.com.:8443 now registers as github.com:8443, so it matches requests to that host.

Notes from the agent: Revise round 2. C1 and C2 were already addressed by commit c2d181c, which added the interim comments with their flip issues. This round changes only the control socket's RegisterBox parse. The new parse_egress strips the trailing dot from the host part after parse_authority, and refuses a host that is only dots. forward.rs:442 (request_authority) still trims the dot from the whole Host header text. I did not change it: the reviewer notes that it fails closed, and a change there alters request matching outside this finding. cargo clippy -p bep --all-targets and cargo fmt --check are clean. I did not run just clippy-strict.

@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/bep/src/control.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 · 1 condition · the full ruling

The compare fixes the declared egress parse. A host such as github.com.:8443 now registers without its trailing dot. That matches how the proxy compares the request host (Gatehouse §6.10 line 823). The fix fails closed, and BEP-022 conforms. One residual from the earlier head has no issue: no creator registers a box's declared egress yet. File that issue and name it in the startup warning and the PR body, as C1 says.

Ruled at 2376ce1 against gominimal/arch@109541a48c31 by claude-opus-5-5.

Comment thread crates/bep/src/main.rs Resolved
The control socket now lowers an uppercase id, drops a UUID's hyphens,
and refuses any id that is not 32 hex digits, on register and forget.
The test now uses a 32-hex box id, which the control socket requires.
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 3 of 10 on the runtime's review findings, pushed as d2ada70d351b.

line exit tail
cargo nextest run -p bep registered_box_egress_is_read_per_request 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-a0ed... Compiling bep v0.0.1 (/workbench/crates/bep) Finished 'test' profile [unoptimized] target(s) in 12.33s ──────────── Nextest run ID 25d8e71e-067a-4c27-ac8e-c0be609c9c9d with nexte
cargo nextest run -p bep forgotten_box_is_refused_no_live_box 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-b6a1... Finished 'test' profile [unoptimized] target(s) in 0.29s ──────────── Nextest run ID efda6e91-d159-42ab-9d79-e3394569bbe3 with nextest profile: default Starting 1 test across 2
cargo nextest run -p bep sealed_member_is_redeemed_within_declared_egress 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-890a... Finished 'test' profile [unoptimized] target(s) in 0.29s ──────────── Nextest run ID 89a46c75-fc41-4eb9-945a-2e55af54aeb4 with nextest profile: default Starting 1 test across 2
cargo nextest run -p bep cross_box_value_is_refused_cross_box 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-ef22... Finished 'test' profile [unoptimized] target(s) in 0.30s ──────────── Nextest run ID 9c123048-a72c-4615-acd0-12aa14b11ee3 with nextest profile: default Starting 1 test across 2
cargo nextest run -p bep prop_serve_redeems_iff_decide_admits 0 Applying loadouts: default Running task runtime-implement-test-4 in session task-runtime-implement-test-4-d539... Finished 'test' profile [unoptimized] target(s) in 0.29s ──────────── Nextest run ID 30c5a8e3-3cda-4df5-b6aa-7f7a75ddec88 with nextest profile: default Starting 1 test across 2
cargo nextest run -p bep serve_installs_the_redeemer_and_registry 0 Applying loadouts: default Running task runtime-implement-test-5 in session task-runtime-implement-test-5-4a1f... Finished 'test' profile [unoptimized] target(s) in 0.30s ──────────── Nextest run ID 3236c86a-cc3a-4633-8e9b-a0a9c9e192d9 with nextest profile: default Starting 1 test across 2

Verify min task run agent-verify passed.

Review threads the coder judged:

  • 👎 invalid — crates/bep/src/main.rs: No issue that owns the host-side creator's register_box/forget_box calls is named in the task, the spec excerpt (it cites only NET-133) or the tree, and this round has no access to look one up or file one. Writing an unverified (#NNNN) would state something the code cannot prove. A person needs to f
  • 👍 valid — crates/bep/src/main.rs:335: The bep serve warning now says a token that renews at the proxy is refused github_sign_in_required until T24 — Renew an expiring sign-in once at the proxy #2279, and a store-handle member is not admitted until T25 — Read client-owned store rules and refuse rules in the deny set #2280.
  • 👍 valid — crates/bep/src/control.rs: register_box and forget_box now lower the id to the listener's 32-lowercase-hex form (also accepting a hyphenated UUID) and refuse any other text. Tests pin uppercase, hyphenated and malformed ids.

A request with a sealed member from a registered box, inside the box's declared egress, reaches the upstream with the credential in place. The same request from another box, or to a host the box did not declare, is refused before anything goes upstream. A box id registered in uppercase or as a hyphenated UUID now matches the box the listener names. An id that is not 32 hex digits is refused at registration, so it does not get a false success.

Notes from the agent: Round 3. The control socket now stores a box id as 32 lowercase hex digits. It accepts uppercase digits and a hyphenated UUID, and refuses other text on register_box and forget_box. Because of this, the tests in boxes.rs and main.rs now use 32-hex ids in place of "b1". The bep serve warning now names the #2279 and #2280 interims. Thread C1 is not fixed: I found no issue number for the host-side creator registration in the task, the spec excerpt or the tree, and I cannot file or look up issues. just clippy-strict was not run.

@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 stores each registered box id in the form the listener uses, and refuses other text. This keeps one id per box, as architecture.md line 495 requires. The startup warning now names each interim. One interim sentence has no issue: no creator registers a box's declared egress. File that issue and name it in the warning and the PR body (C1). The other interims carry their issues as residuals.

Ruled at d2ada70 against gominimal/arch@109541a48c31 by claude-opus-5-5.

Comment thread crates/bep/src/main.rs Resolved

@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: 8 unresolved threads — minimal-arch[bot] crates/bep/src/redeemer.rs:288, minimal-arch[bot] crates/bep/src/main.rs:257, minimal-foundry[bot] crates/bep/src/control.rs, minimal-arch[bot] crates/bep/src/main.rs, minimal-arch[bot] crates/bep/src/main.rs:335, …. No findings.

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

Copy link
Copy Markdown
Member

/revise

Carry the one arch-review condition still open at d2ada70: C1 on the startup warn! in serve() in main.rs (threads 4343594407 and 4343632886). Change no behaviour.

The sentence "No creator registers a box's declared egress yet, so every box is refused outside_declared_egress" must name its owners. They exist now: T14 (#2273) sends register_box at create, in crates/minimal/src/cmd/boxes/create.rs, and T20 (#2277) sends forget_box at destroy, in crates/minvmd/src/box_registry.rs. Write the sentence as "No creator registers a box's declared egress yet (#2273 at create, #2277 at destroy), so every box is refused outside_declared_egress". Put the same two references on the wire comment in main.rs where the registry is created.

Reply on both arch threads with the commit that carries it. The C2 thread (4343594409) is already carried by d2ada70.


Generated by Claude Code

The startup warn! and the wire comment now name #2273 (register_box at
create) and #2277 (forget_box at destroy) as the owners of the interim.
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 4 of 10 on a /revise note, pushed as 15b67b9790b7.

line exit tail
cargo nextest run -p bep registered_box_egress_is_read_per_request 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-a70e... Compiling bep v0.0.1 (/workbench/crates/bep) Finished 'test' profile [unoptimized] target(s) in 13.96s ──────────── Nextest run ID 968383f2-6ad8-41e8-bcff-4c7b9e939e9a with nexte
cargo nextest run -p bep forgotten_box_is_refused_no_live_box 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-69a7... Finished 'test' profile [unoptimized] target(s) in 0.34s ──────────── Nextest run ID 22b9a582-9ad4-4b22-aec7-252f857ffc9f with nextest profile: default Starting 1 test across 2
cargo nextest run -p bep sealed_member_is_redeemed_within_declared_egress 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-cf20... Finished 'test' profile [unoptimized] target(s) in 0.34s ──────────── Nextest run ID 71199ae0-7357-47da-8999-1d09a481df1e with nextest profile: default Starting 1 test across 2
cargo nextest run -p bep cross_box_value_is_refused_cross_box 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-11ab... Finished 'test' profile [unoptimized] target(s) in 0.32s ──────────── Nextest run ID e77d4bd5-ffff-49e7-888c-0a6ffddc2e7e with nextest profile: default Starting 1 test across 2
cargo nextest run -p bep prop_serve_redeems_iff_decide_admits 0 Applying loadouts: default Running task runtime-implement-test-4 in session task-runtime-implement-test-4-6cf4... Finished 'test' profile [unoptimized] target(s) in 0.32s ──────────── Nextest run ID 7ea2bb11-ee35-447c-949b-30c18862836b with nextest profile: default Starting 1 test across 2
cargo nextest run -p bep serve_installs_the_redeemer_and_registry 0 Applying loadouts: default Running task runtime-implement-test-5 in session task-runtime-implement-test-5-00d4... Finished 'test' profile [unoptimized] target(s) in 0.34s ──────────── Nextest run ID e2b11cdb-0b0b-40b3-a3e1-83df4bbbf5d8 with nextest profile: default Starting 1 test across 2

Verify min task run agent-verify passed.

Review threads the coder judged:

A request that carries a sealed member from a registered box, inside the box's declared egress, reaches the upstream with the credential in place. The same request from another box, or to a host that the box did not declare, is refused before anything goes upstream. This round changes no behaviour. The startup warning and the wire comment now name #2273 and #2277 as the owners of the declared-egress interim.

Notes from the agent: Revise round 4 changes only text, in commit 15b67b9. The serve() startup warn! now reads "No creator registers a box's declared egress yet (#2273 at create, #2277 at destroy), so every box is refused outside_declared_egress". The wire() comment above BoxRegistry::default() names T14 #2273 (register_box at create, crates/minimal/src/cmd/boxes/create.rs) and T20 #2277 (forget_box at destroy, crates/minvmd/src/box_registry.rs) as the flip. List #2273 and #2277 as residuals in the PR body. The C2 thread 4343594409 is already carried by d2ada70. This round changes the verdict on thread 4343594407 from invalid to valid, because the note asks for a reply on it.

@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/bep/src/redeemer.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 · 1 condition · the full ruling

The compare adds the flip issues #2273 and #2277 to the box-egress interim, in wire() and in the startup warn!. The interim now has a flip condition and linked issues, and it fails closed. BEP-019, BEP-020, BEP-022 and BEP-025 conform to Gatehouse §6.10 line 823, as in the earlier ruling. C1 stays open under #2273 and #2277. The host-side creator must register each box before its first connection and forget it at its end (§14.5 line 2033). Then remove the interim comment and the warn sentence.

Ruled at 15b67b9 against gominimal/arch@109541a48c31 by claude-opus-5-5.

Comment thread crates/bep/src/main.rs Resolved
Comment thread crates/bep/src/main.rs Resolved
The cohort loop ran one key agreement per live host_ip box. The open now
reads the value's sub from its protected header and binds once to that
cohort box, or to the first cohort box when sub names none, which keeps
every refusal marker as before.
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 5 of 10 on the runtime's review findings, pushed as ca37e46bbc69.

line exit tail
cargo nextest run -p bep registered_box_egress_is_read_per_request 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-e9e6... Compiling bep v0.0.1 (/workbench/crates/bep) Finished 'test' profile [unoptimized] target(s) in 14.81s ──────────── Nextest run ID 3a6c163d-147e-49fe-b3e5-bdc4be9dd2bc with nexte
cargo nextest run -p bep forgotten_box_is_refused_no_live_box 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-f734... Finished 'test' profile [unoptimized] target(s) in 0.34s ──────────── Nextest run ID 68a188e0-cb8f-40f0-a568-b16cd2868683 with nextest profile: default Starting 1 test across 2
cargo nextest run -p bep sealed_member_is_redeemed_within_declared_egress 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-bbe0... Finished 'test' profile [unoptimized] target(s) in 0.37s ──────────── Nextest run ID e5253f07-bdb3-4b42-8664-865bd10b197d with nextest profile: default Starting 1 test across 2
cargo nextest run -p bep cross_box_value_is_refused_cross_box 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-1318... Finished 'test' profile [unoptimized] target(s) in 0.37s ──────────── Nextest run ID c1c2a5f6-0c54-44ac-bae8-f5c0dece0683 with nextest profile: default Starting 1 test across 2
cargo nextest run -p bep prop_serve_redeems_iff_decide_admits 0 Applying loadouts: default Running task runtime-implement-test-4 in session task-runtime-implement-test-4-5feb... Finished 'test' profile [unoptimized] target(s) in 0.36s ──────────── Nextest run ID 05f68c82-bfd4-4e08-9064-57cbe1945425 with nextest profile: default Starting 1 test across 2
cargo nextest run -p bep serve_installs_the_redeemer_and_registry 0 Applying loadouts: default Running task runtime-implement-test-5 in session task-runtime-implement-test-5-589b... Finished 'test' profile [unoptimized] target(s) in 0.39s ──────────── Nextest run ID 004c7821-37ea-48b7-84fd-da7e5a8475dd with nextest profile: default Starting 1 test across 2

Verify min task run agent-verify passed.

Review threads the coder judged:

  • 👍 valid — crates/bep/src/redeemer.rs: BoxRedeemer::facts now reads sub from the sealed value's protected header and runs one open bound to that cohort box, or to the first cohort box when sub names none. A request costs one key agreement, and host_ip_cohort_value_is_opened_once pins this.

A request that carries a sealed member from a registered box inside its declared egress reaches the upstream with the credential in place. The same request from another box, or to a host that the box did not declare, is refused before anything goes upstream. A host_ip cohort request now costs one key agreement, whatever the size of the cohort.

Notes from the agent: Round 5 changes only crates/bep/src/redeemer.rs. For a host_ip cohort, the redeemer reads the unauthenticated sub from the protected header and binds one open to that cohort box. When sub names no cohort box, or the header does not parse, it binds to the first cohort box. That one open gives the same classification as the old loop. The open authenticates the header, so a forged sub only gives other box. The new test host_ip_cohort_value_is_opened_once uses a counting HeldKey and asserts one agreement for an admit and one for a cross_box refusal in a cohort of five. To support it, the test helpers new_world and sealed_for now take a generic key. just clippy-strict was not run.

@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 compare conforms. The cohort open now binds once to the box that the header sub names. The open authenticates that header and refuses a different box, so Gatehouse §6.10 line 823 step 2 still holds and the path fails closed. The interims for revocations (C1) and box registration (C2) stay open as filed residuals. Each one is named in the startup warning with its flip issue.

Ruled at ca37e46 against gominimal/arch@109541a48c31 by claude-opus-5-5.

Comment thread crates/bep/src/main.rs Resolved
Comment thread crates/bep/src/main.rs Resolved

@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-arch[bot] crates/bep/src/redeemer.rs:319, minimal-arch[bot] crates/bep/src/main.rs:263, minimal-arch[bot] crates/bep/src/main.rs, minimal-arch[bot] crates/bep/src/main.rs:341, minimal-arch[bot] crates/bep/src/main.rs, …. No findings.

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

@norrietaylor norrietaylor changed the title T41 — Wire the redemption decision and each box's declared egress into bep serve feat(bep): wire the redemption decision and each box's declared egress into bep serve Oct 22, 2026

@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 — approved

Verdict APPROVE — every review thread is resolved; @norrietaylor closed the last one. The review of ca37e46bbc69 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.

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 22, 2026

@norrietaylor norrietaylor 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.

Babysitter approval of T41 at ca37e46.

Six rounds, each verified against its diff: the box registry is read at each request and a box that is not registered is refused and attributed to no live box; the redeemer opens a value bound to the attributed box, or once to the cohort box its header names, verifies the handle under the registered client keys, gives the pure decision the declared egress, the host sets and the revocations it holds, and resolves the credential only after an admit (BEP-019, BEP-020, BEP-022, BEP-025); the property test proves the serving shell admits exactly when the decision admits; a registered authority loses its trailing dot and a box id takes the listener's form. Every interim is named in the startup warning with its flip issue, and the tasks that flip them carry the removal: #2273 and #2277 for box registration, #2277 and #2290 for revocations, #2279 for renewal, #2280 for store rules. Arch-review passed at this head with those residuals filed, the runtime's review approved, every thread is resolved and each resolution re-verified, the four lane aggregators are green, and the squash subject lints.


Generated by Claude Code

@norrietaylor
norrietaylor added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit 47223e0 Oct 22, 2026
37 checks passed
@norrietaylor
norrietaylor deleted the agent/2483-wire-the-redemption-decision-and-each-box-s-decl branch October 22, 2026 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

T41 — Wire the redemption decision and each box's declared egress into bep serve

1 participant