8000 feat(minvmd): check a minted box id against retained revocations with no proxy (T89) by minimal-foundry[bot] · Pull Request #2643 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

feat(minvmd): check a minted box id against retained revocations with no proxy (T89) - #2643

Merged
norrietaylor merged 4 commits into
mainfrom
agent/2616-check-a-minted-box-id-against-retained-revocatio
Oct 27, 2026
Merged

norrietaylor merged 4 commits into
mainfrom
agent/2616-check-a-minted-box-id-against-retained-revocatio

Conversation

@minimal-foundry
Copy link
Copy Markdown
Contributor

T89 — Check a minted box id against retained revocations when no proxy runs

slice: S12
kind: task
covers: BEP-070
size: M
est: 100 code, 100 tests
executor: agent
difficulty: unknown ground
model: strongest
diagnostics: a refused id names the revocation record that holds it
observability: one warn line per colliding mint
layers:
- collide:
- crates/minvmd/src/box_registry.rs: when no proxy answers, holds_box_id reads the box ids that the retained audit segments' revocation records hold, or refuses creation; the choice is the implementer's and the arch review's (#2616)
- docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md: the BEP-070 limit comment states the no-proxy case as the code does it
test: cargo nextest run -p minvmd a_minted_id_a_revocation_holds_is_refused_with_no_proxy
produces: none
consumes: none
proof: A minted box id that a retained revocation record holds is refused with no proxy running.
depends on:
- blocked by #2585


Generated by Claude Code

Proof

With no Box Egress Proxy running, minvmd refuses a box creation whose minted id a revocation record in the proxy's audit log names. The refusal is CollidingBoxId, and its single warn line names the record line and the audit directory.

Notes from the agent: Design choice (#2616): with no proxy, holds_box_id reads the revocation records and does not refuse every creation. It reads the audit directory beside the control socket (<socket dir>/audit). For the home socket that minvmd uses, this is ~/.minimal/bep/audit, the directory bep serve writes (bep::audit::default_dir). I derived the path from the socket so that run.rs, which is outside the layers, needs no change, and so that tests stay hermetic. A bep serve --control at a custom path still writes ~/.minimal/bep/audit, but minvmd always uses the home socket, so the two paths agree in practice. The check fails closed when the log is not read whole: an I/O error other than a missing directory, or a complete line that does not parse. In that case it returns the new AllocationError::AuditUnread, and the printed text names the audit directory and the segment. IdHolder lost Copy because it now carries the record's line. The spec edit adds a verify: line for the new test and replaces the limit comm 8000 ent. just lint-prose did not run because vale is not installed on this box.

Tests

line exit tail
cargo nextest run -p minvmd a_minted_id_a_revocation_holds_is_refused_with_no_proxy 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-0460... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling version v0.8.0 (/workbenc

Verify

min task run agent-verify exited 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.

re/compose.rs:402:8
    |
402 | pub fn deferring_env() -> StoredEnv {
    |        ^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#must_use_candidate
help: add the attribute
    |
402 + #[must_use]
403 | pub fn deferring_env() -> StoredEnv {
    |

error: this method could have a `#[must_use]` attribute
    --> crates/boxes/src/core/compose.rs:1019:12
     |
1019 |     pub fn lifecycle_hooks_teardown(&self) -> impl DoubleEndedIterator<Item = &ProvenancedHook> {
     |            ^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#must_use_candidate
help: add the attribute
     |
1019 ~     #[must_use]
1020 ~     pub fn lifecycle_hooks_teardown(&self) -> impl DoubleEndedIterator<Item = &ProvenancedHook> {
     |

error: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]`
    --> crates/boxes/src/core/primitives.rs:1085:5
     |
1085 |     pub fn as_sandbox_path(&self) -> &SandboxRelPath {
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
help: remove `must_use`
    --> crates/boxes/src/core/primitives.rs:1084:5
     |
1084 |     #[must_use]
     |     ^^^^^^^^^^^
     = note: alternatively, you may add an explicit reason to the `must_use` attribute
     = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#double_must_use
     = note: `-D clippy::double-must-use` implied by `-D warnings`
     = help: to override `-D warnings` add `#[allow(clippy::double_must_use)]`

error: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]`
    --> crates/boxes/src/core/primitives.rs:1302:5
     |
1302 |     pub fn host_path(&self) -> &HostAbsPath {
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
help: remove `must_use`
    --> crates/boxes/src/core/primitives.rs:1301:5
     |
1301 |     #[must_use]
     |     ^^^^^^^^^^^
     = note: alternatively, you may add an explicit reason to the `must_use` attribute
     = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#double_must_use

error: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]`
    --> crates/boxes/src/core/primitives.rs:1309:5
     |
1309 |     pub fn destination(&self) -> &SandboxRelPath {
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
help: remove `must_use`
    --> crates/boxes/src/core/primitives.rs:1308:5
     |
1308 |     #[must_use]
     |     ^^^^^^^^^^^
     = note: alternatively, you may add an explicit reason to the `must_use` attribute
     = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#double_must_use

error: could not compile `boxes` (lib) due to 6 previous errors

Closes #2616

…xy (T89)

When no Box Egress Proxy answers its control socket, holds_box_id reads the
revocation records in the proxy's audit log beside the socket. A record that
names the minted id refuses the creation, and the warn line names the record.
A log that is not read whole refuses the creation too.
@coderabbitai
coderabbitai Bot commented Oct 26, 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: a66bac24-f846-4f99-bac1-35bf6e0d4e25

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.

@github-actions
Copy link
Copy Markdown
Contributor

Spec lint

docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md — 9 finding(s)

docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md:113: P004 BEP-003 names test 'bep_second_box_needs_no_sign_in', which was not found in the repository
docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md:170: P004 BEP-007 names test 'bep_box_env_holds_sealed_value_only', which was not found in the repository
docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md:214: P004 BEP-011 names test 'bep_root_ca_present_in_box_trust_store', which was not found in the repository
docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md:230: P004 BEP-012 names test 'bep_proxy_env_and_no_proxy_are_set', which was not found in the repository
docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md:284: P004 BEP-015 names test 'bep_git_and_gh_against_private_repo', which was not found in the repository
docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md:625: P004 BEP-043 names test 'bep_destroyed_box_values_refused_within_60s', which was not found in the repository
docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md:634: P004 BEP-044 names test 'bep_logout_refuses_every_reference_at_next_request', which was not found in the repository
docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md:680: P004 BEP-047 names test 'bep_and_gvproxy_are_separate_processes_and_users', which was not found in the repository
docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md:689: P004 BEP-049 names test 'prop_audit_chain_detects_unrecomputed_edit', which was not found in the repository

Advisory. None of this blocks the merge; the review decides.

Advisory, and never a merge gate. Linter: gominimal/foundry@fb5932b8, spec format: How Minimal Writes Specs.

@minimal-foundry
minimal-foundry Bot commented Oct 26, 2026 •
Copy link
Copy Markdown
Contributor Author

Approved: every review thread resolved at 16f78b3edc03.

@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/minvmd/src/box_registry.rs Resolved
Comment thread crates/minvmd/src/box_registry.rs Resolved
8000
@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 no-proxy collision check conforms to Gatehouse §6.10 line 839. It reads every retained audit segment with the same reader that a proxy start uses. It also refuses when the log is not read whole. One stale comment in holds_box_id still says that no revocation is in force with no proxy. That text contradicts line 839 and the code under it. Delete it as C1 says.

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

Comment thread crates/minvmd/src/box_registry.rs Resolved
Drop the stale no-proxy comment in holds_box_id. The AuditUnread refusal
now names bep serve --quarantine-unreadable and the quarantine directory,
and the spec comment for BEP-070 says so.
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on the runtime's review findings, pushed as 16f78b3edc03.

line exit tail
cargo nextest run -p minvmd a_minted_id_a_revocation_holds_is_refused_with_no_proxy 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-fb03... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling version v0.8.0 (/workbenc

Verify min task run agent-verify exited 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.

toredEnv {
    |        ^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#must_use_candidate
help: add the attribute
    |
402 + #[must_use]
403 | pub fn deferring_env() -> StoredEnv {
    |

error: this method could have a `#[must_use]` attribute
    --> crates/boxes/src/core/compose.rs:1019:12
     |
1019 |     pub fn lifecycle_hooks_teardown(&self) -> impl DoubleEndedIterator<Item = &ProvenancedHook> {
     |            ^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#must_use_candidate
help: add the attribute
     |
1019 ~     #[must_use]
1020 ~     pub fn lifecycle_hooks_teardown(&self) -> impl DoubleEndedIterator<Item = &ProvenancedHook> {
     |

error: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]`
    --> crates/boxes/src/core/primitives.rs:1085:5
     |
1085 |     pub fn as_sandbox_path(&self) -> &SandboxRelPath {
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
help: remove `must_use`
    --> crates/boxes/src/core/primitives.rs:1084:5
     |
1084 |     #[must_use]
     |     ^^^^^^^^^^^
     = note: alternatively, you may add an explicit reason to the `must_use` attribute
     = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#double_must_use
     = note: `-D clippy::double-must-use` implied by `-D warnings`
     = help: to override `-D warnings` add `#[allow(clippy::double_must_use)]`

error: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]`
    --> crates/boxes/src/core/primitives.rs:1302:5
     |
1302 |     pub fn host_path(&self) -> &HostAbsPath {
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
help: remove `must_use`
    --> crates/boxes/src/core/primitives.rs:1301:5
     |
1301 |     #[must_use]
     |     ^^^^^^^^^^^
     = note: alternatively, you may add an explicit reason to the `must_use` attribute
     = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#double_must_use

error: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]`
    --> crates/boxes/src/core/primitives.rs:1309:5
     |
1309 |     pub fn destination(&self) -> &SandboxRelPath {
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
help: remove `must_use`
    --> crates/boxes/src/core/primitives.rs:1308:5
     |
1308 |     #[must_use]
     |     ^^^^^^^^^^^
     = note: alternatively, you may add an explicit reason to the `must_use` attribute
     = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#double_must_use

error: could not compile `boxes` (lib) due to 6 previous errors
warning: build failed, waiting for other jobs to finish...

Review threads the coder judged:

  • 👍 valid — crates/minvmd/src/box_registry.rs: Deleted the stale two-line 'no revocation is in force' comment above the no-proxy arm in holds_box_id.
  • 👍 valid — crates/minvmd/src/box_registry.rs:3135: Part one holds: the AuditUnread refusal now names bep serve --quarantine-unreadable and /quarantine. Failing closed stays on purpose, as bep serve does. Part two does not hold: minvmd only wires home_proxy_control (cmd/run.rs), so the dir it reads is ~/.minimal/bep/audit, which is where bep

With no Box Egress Proxy running, a minted box id that a revocation record in the retained audit log holds is refused. The refusal names that record. An audit log with an unreadable line refuses the creation and names bep serve --quarantine-unreadable as the way out.

Notes from the agent: Revise round 1. I deleted the stale comment in holds_box_id. The AuditUnread refusal now names bep serve --quarantine-unreadable and the quarantine directory, and the test pins that. The fail-closed choice stays, because an unreadable line can be a revocation. bep serve fails closed the same way. A bep serve run by hand needs --listener <PATH> and a token on standard input, so the remedy names the flag the same way bep's own refusal does.

@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 · the full ruling

The change conforms to Gatehouse §6.10 line 839. With no proxy, the collision check reads the revocation records that the next bep serve start restores. The check refuses the creation when it cannot read the log whole, so it fails closed. This push removes the stale comment and names bep serve --quarantine-unreadable as the way out. That closes the points from the ruling on 69a9533e. No conditions remain.

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

@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: 3 unresolved threads — minimal-foundry[bot] crates/minvmd/src/box_registry.rs, minimal-foundry[bot] crates/minvmd/src/box_registry.rs:3135, minimal-arch[bot] crates/minvmd/src/box_registry.rs. 1 finding, 1 inline.

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

Comment thread crates/minvmd/src/box_registry.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 — approved

Verdict APPROVE — every review thread is resolved; @norrietaylor closed the last one. The review of 16f78b3edc03 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< 8 /tool-ti 10BC8 p> label Oct 27, 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.

Own review at 16f78b3. With no proxy on the control socket, holds_box_id now reads the revocation records in the proxy's audit log (audit_revocation_holding). Those are the records a bep serve start puts back in force, so a minted id that one of them holds is refused. A log that is not read whole fails closed with AuditUnread, which names --quarantine-unreadable, as a bep serve start does. a_minted_id_a_revocation_holds_is_refused_with_no_proxy writes the revocation through Records and checks the refusal.


Generated by Claude Code

@norrietaylor norrietaylor changed the title T89 — Check a minted box id against retained revocations when no proxy runs feat(minvmd): check a minted box id against retained revocations with no proxy (T89) Oct 27, 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 at 16f78b3: every merge gate passes at this head (arch PASS at 16f78b3, zero open threads, every lane aggregator green). Squash title feat(minvmd): check a minted box id against retained revocations with no proxy (T89) and the squashed message pass commitlint. Queued for squash merge.


Generated by Claude Code

@norrietaylor
norrietaylor added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 8c5d45a Oct 27, 2026
38 checks passed
@norrietaylor
norrietaylor deleted the agent/2616-check-a-minted-box-id-against-retained-revocatio branch October 27, 2026 01:24
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.

T89 — Check a minted box id against retained revocations when no proxy runs

1 participant

0