Repository navigation
feat(minvmd): refuse a minted box id that a retained revocation record holds (T74) - #2611
Conversation
The proxy control socket lists the box ids its revocations in force name (revoked_box_ids). The host's box id check now reads that list beside the live rows, kept creations and attachments, and the CollidingBoxId refusal names all four sources.
…inted-box-id-that-a-retained-revocatio
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Reviewed: 1 finding, none blocking at Address the comments on the diff. Clobber: none seen. |
There was a problem hiding this comment.
arch-review: CONDITIONS · 2 conditions · the full ruling
The new check refuses a minted id that a restored revocation record names, and the check is in the right owner. One arm fails open. When the proxy answers with a timeout, a refusal, or a reply that does not parse, holds_box_id returns None and the box is created with the records unread. Gatehouse §6.10 line 839 says that creation refuses an id colliding with any retained record. C1 makes that arm refuse the registration. C2 updates the BEP-070 Limit: comment in spec 24, which still names #2585 as an open gap.
Ruled at 7eecfb9 against gominimal/arch@109541a48c31 by claude-opus-5-5.
A proxy that answers its control socket but times out, refuses the revoked_box_ids op or sends a malformed reply left the id check unfinished, and the registration went on. It is now refused with AllocationError::RevocationsUnread. A socket that is absent or refuses the connect still reads as no proxy (BEP-070).
|
Round 1 of 10 on the runtime's review findings, pushed as
Verify Review threads the coder judged:
A minted box id that only a retained revocation record of the Box Egress Proxy holds is refused as a collision (CollidingBoxId). A proxy that answers but does not list its revocation records also refuses the registration, so the check never lets an id through unread. Notes from the agent: Revise round 1. holds_box_id now returns Result. A timeout, a proxy refusal or a malformed reply gives the new AllocationError::RevocationsUnread, with one warn line. Only NotFound and ConnectionRefused read as no proxy. Consequence: a proxy of an older version that does not know the revoked_box_ids op refuses every box creation until it is upgraded. Its printed text: 'the box was not created. The Box Egress Proxy did not list its revocation records, so box id was not checked against them: '. It states the situation and gives no command, because no command restarts the proxy that the code can prove. I also ran the box_registry tests in minvmd (78 passed) and clippy -p minvmd --all-targets, which showed no warnings in minvmd. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The compare closes the open point from the ruling on 7eecfb9a. A proxy that answers but does not list its revocation records now refuses the mint with RevocationsUnread. The refusal comes before an address is spent. Gatehouse §6.10 line 839 requires creation to refuse an id that a retained record holds. Line 836 puts the read behind the helper's local socket, and the change reads the list there. An absent socket still reads as no proxy, as on the earlier head. The change conforms.
Ruled at 1a5a5e7 against gominimal/arch@109541a48c31 by claude-opus-5-5.
|
Round 2 of 10 on the runtime's review findings: the coder changed nothing. Revise round 2: no code change. Each thread is judged invalid, for the reason in its note. C2 asks for an edit to the BEP-070 Limit comment in spec 24 and a new filed issue. That spec file is outside this task's layers, and I cannot file an issue. The Limit comment in spec 24 still says that a collision with a revocation record alone is not refused, and it links #2585. That text is now stale. A follow-up must rewrite it to name the gap that remains: while no proxy answers, the records stay on disk and the check reads none of them. Review threads the coder judged:
|
norrietaylor
left a comment
There was a problem hiding this comment.
Own review at 1a5a5e7. A new owner-only bep control op lists the box ids that restored revocations hold. holds_box_id refuses a minted id that one of them holds, and refuses with RevocationsUnread when the proxy answers but cannot list them, before an address is spent. The case where no proxy answers is residual #2616.
Generated by Claude Code
norrietaylor
left a comment
There was a problem hiding this comment.
Babysitter approval at 1a5a5e7: every merge gate passes at this head (arch PASS at 1a5a5e7, zero open threads, every lane aggregator green). Squash title feat(minvmd): refuse a minted box id that a retained revocation record holds (T74) and the squashed message pass commitlint. Queued for squash merge.
Generated by Claude Code
T74 — Refuse a minted box id that a retained revocation record holds
slice: S10
kind: task
covers: BEP-070
size: M
est: 100 code, 100 tests
executor: agent
difficulty: unknown ground
model: strongest
diagnostics: the
CollidingBoxIdrefusal names every source the check readsobservability: one warn line per colliding mint
layers:
- collide:
- crates/bep/src/control.rs: an owner-only control op returns the box ids the proxy's restored revocations hold
- crates/minvmd/src/box_registry.rs:
holds_box_idalso refuses an id that op returns, and theAllocationError::CollidingBoxIdtext names live rows, kept creations, attachments and revocation recordstest: cargo nextest run -p minvmd a_minted_id_a_revocation_holds_is_refused
produces: none
consumes: none
proof: A minted box id that only a retained revocation record holds is refused as a collision.
depends on:
- blocked by #2286
Proof
A box registration whose minted id only a revocation record holds is now refused with CollidingBoxId. The record is one the Box Egress Proxy restored from its audit log at start. The test a_minted_id_a_revocation_holds_is_refused shows it end to end: revoke_box writes the record, restore reads it back, a real bep control socket serves it, and the minvmd registry refuses the id. No row is published, and a fresh mint still registers.
Notes from the agent: Design: the proxy control socket gets a new op, {"op":"revoked_box_ids"} -> {"ok":true,"box_ids":[...]}. It is a separate request type (RevocationsRequest, RevokedBoxIdsReply), dispatched in serve() the same way as rotate_signing. I did not add a Request variant or a Reply field because crates/minimal/src/tests.rs matches every Request variant and builds Reply literals, and that file is outside this task's layers. holds_box_id now returns the source that holds the id (live row, kept creation, attachment, revocation record). It asks the proxy only when with_proxy_control set a socket. The warn line names that source in held_by. Failure policy (a judgement call): when no proxy listens (NotFound or ConnectionRefused), the check logs at debug and continues, because no proxy means no revocation is in force. Any other failure, for example a timeout of up to 2 s or a refusal, logs one warn line and lets the registration continue. It is not refused. A reviewer can want fail-closed instead. Printed text: the CollidingBoxId message is now 'box id is already in use. A running box, a stopped box that can resume, a Box Egress Proxy attachment, or a revocation record of the Box Egress Proxy holds it'. 'attachment' is close to a design term, but the task asks the text to name attachments. The message gives no next step, because I did not check which command a person reruns. Test changes inside box_registry.rs: expired_credentialed_box_sends_no_revocation_and_stays_resumable now answers the one revoked_box_ids quer…[truncated]
Tests
cargo nextest run -p minvmd a_minted_id_a_revocation_holds_is_refusedVerify
min task run agent-verifyexited 101 under rustc 1.98.1, which the repository does not pin (1.99.0 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; it was merged in before the tests ran.
Residuals
Closes #2585
Generated by Claude Code