8000 T103 — Match min box audit on the box id spelling the proxy writes by minimal-foundry[bot] · Pull Request #2793 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content
{"props":{"contextRegion":{"crumbs":[{"crumb_type":"organization","label":"gominimal","is_root":false,"href":"/gominimal"},{"crumb_type":"repository","label":"minimal","is_root":false,"href":"/gominimal/minimal"}],"localNavigation":[{"id":"code","icon":"code","label":"Code","href":"/gominimal/minimal","selectedLinks":["repo_source","repo_downloads","repo_commits","repo_releases","repo_tags","repo_branches","repo_packages","repo_deployments","repo_attestations"],"popoverTarget":false,"commandId":"repositories:go-to-code","reactNav":{"appTarget":"code-view","anchor":"code-view-repo-link"},"turboNav":{"frame":"repo-content-turbo-frame"}},{"id":"issues","icon":"issue-opened","label":"Issues","href":"/gominimal/minimal/issues","selectedLinks":["repo_issues","repo_labels","repo_milestones"],"count":240,"popoverTarget":false,"commandId":"repositories:go-to-issues","reactNav":{"appTarget":"repo","anchor":null},"turboNav":{"frame":"repo-content-turbo-frame"}},{"id":"pull-requests","icon":"git-pull-request","label":"Pull requests","href":"/gominimal/minimal/pulls","selectedLinks":["repo_pulls","checks"],"count":31,"popoverTarget":false,"commandId":"repositories:go-to-pull-requests","reactNav":{"appTarget":null,"anchor":null},"turboNav":{"frame":"repo-content-turbo-frame"}},{"id":"discussions","icon":"comment-discussion","label":"Discussions","href":"/gominimal/minimal/discussions","selectedLinks":["repo_discussions"],"popoverTarget":false,"commandId":"repositories:go-to-discussions","reactNav":{"appTarget":null,"anchor":null},"turboNav":{"frame":"repo-content-turbo-frame"}},{"id":"actions","icon":"play","label":"Actions","href":"/gominimal/minimal/actions","selectedLinks":["repo_actions"],"popoverTarget":false,"commandId":"repositories:go-to-actions","reactNav":{"appTarget":"repo","anchor":null},"turboNav":{"frame":"repo-content-turbo-frame"}},{"id":"security-and-quality","icon":"shield","label":"Security and quality","href":"/gominimal/minimal/security","selectedLinks":["security","overview","alerts","policy","token_scanning","code_scanning"],"count":0,"popoverTarget":false,"commandId":"repositories:go-to-security","reactNav":{"appTarget":null,"anchor":null},"turboNav":{"frame":"repo-content-turbo-frame"}},{"id":"insights","icon":"graph","label":"Insights","href":"/gominimal/minimal/pulse","selectedLinks":["repo_graphs","repo_contributors","dependency_graph","dependabot_updates","pulse","people","community"],"popoverTarget":false,"commandId":"repositories:go-to-insights","reactNav":{"appTarget":null,"anchor":null},"turboNav":{"frame":"repo-content-turbo-frame"}}],"localNavigationUpdateChannel":null,"selectedLink":"repo_pulls"},"owner":null,"headerLogo":{"href":"/","aria-label":"Homepage "},"notifications":{"indicatorMode":"disabled","websocketChannel":null,"fetchIndicatorSrc":"/notifications/indicator","fetchIndicatorEnabled":false},"issues":{"href":"/issues"},"pulls":{"href":"/pulls"},"contributedRepos":{"href":"/repos"},"copilot":{"show":false,"showAgentsButton":false,"showRelaunchAnnouncement":false,"copilotChatUrl":null,"copilotApiUrl":"https://api.githubcopilot.com"},"search":{"show":true,"showCommandPalette":false,"isSearchPage":false,"isJumpToSearch":false,"searchContext":{"scope":"repo:gominimal/minimal","current_repo_name":"minimal","current_repo_nwo":"gominimal/minimal","current_repo_org":"gominimal","user_id":"gominimal"}},"commandPalette":null,"enterpriseBar":{"show":false},"globalTransactionalMessage":[],"payloadsUrl":"/_global-navigation/payloads.json?can_toggle_site_admin_and_employee_status=0\u0026is_admin_mode_on=0\u0026is_ui_opted_out=0\u0026show_ui_opt_out=0\u0026v=8","contextRegionUrl":"/_global-navigation/context-region.json"}}

T103 — Match min box audit on the box id spelling the proxy writes - #2793

Merged
norrietaylor merged 1 commit into
mainfrom
agent/2462-match-min-box-audit-on-the-box-id-spelling-the-p
Oct 31, 2026
Merged

norrietaylor merged 1 commit into
mainfrom
agent/2462-match-min-box-audit-on-the-box-id-spelling-the-p

Conversation

@minimal-foundry
Copy link
Copy Markdown
Contributor

T103 — Match min box audit on the box id spelling the proxy writes

slice: S15
kind: task
covers: BEP-042
size: M
est: 60 code, 180 tests
executor: agent
difficulty: needs care
model: standard
diagnostics: min box audit <id> and min box audit <name> list the records the proxy wrote for that box; the line "Showing (box )." keeps the hyphenated id a person sees in min ls, pinned by box_audit_reads_a_record_the_proxy_wrote_for_a_minted_id
observability: the existing debug line of each read names the box ids it matched in the proxy's spelling, 32 lowercase hex digits
layers:
- audit:
- crates/minimal/src/cmd/box_audit.rs: resolve(), render() and children() match a record's subject against 8000 the box id in the proxy's one text form, bep::listener::box_id_text (32 lowercase hex digits), not the hyphenated SessionId display form, so min box audit shows the records the proxy writes (#2462); the name rule keeps choosing the live box, else the newest creation by UUIDv7 order; the test fixtures write subjects in the proxy's form, as bep serve does
test: cargo nextest run -p minimal box_audit_filters_to_one_box
test: cargo nextest run -p minimal box_audit_name_reads_live_else_latest_creation
test: cargo nextest run -p minimal box_audit_reads_a_record_the_proxy_wrote_for_a_minted_id
produces: none
consumes: none
proof: min box audit <box> lists the decisions the running proxy recorded for a box created on this host, by id and by name.
depends on:
- blocked by #2269
- blocked by #2286

Original issue text

Residual of #2457 (T17, epic #1501). Named by minimal-arch condition C3(2) on 7c3c46a.

min box audit matches the audit record subject against the box id in its hyphenated boxes::SessionId Display spelling: resolve() and render() in crates/minimal/src/cmd/box_audit.rs compare that string. A name resolves to the live box, else the most recent creation, by max_by_key on the id, which is creation order only while the id is a UUIDv7.

BEP-070 (spec 24) gives every un-enrolled box a UUIDv7 id minted by the host-side creator. The task that mints it (#2386, T1 of spec 29, create_assigns_uuidv7_id_type_and_parent; proved end to end by #2286, T22 of spec 24) must keep the hyphenated Display spelling the reader matches on and the v7 time ordering the name rule relies on, or change the reader in the same change.

Done when: the BEP-070 minting task either keeps the hyphenated SessionId Display spelling and UUIDv7 ordering, with a test that min box audit <id> finds a record the proxy wrote for a freshly minted id, or updates resolve() and render() and the name rule in the same change.


Generated by Claude Code

Proof

On this branch, min box audit <id> and min box audit <name> list the records the proxy writes for a box created on this host. The proxy writes the subject as 32 hex digits, and the command now matches that form. The line "Showing (box )." and the other messages keep the hyphenated id that min ls shows.

Notes from the agent: Resolved now carries a boxes::SessionId. id() gives the hyphenated display form and subject() gives bep::listener::box_id_text. children() compares parent ids as values and returns subjects in the proxy form. In --parent text output, render() prints the hyphenated id at the start of each line, not the raw hex subject, so the id matches min ls. The debug line of each read already logs the subject set, which is now in the proxy form. The new test sends a minted id through Delivery::emit and Delivery::parse, the same path bep serve uses. All 10 box_audit tests pass. I did not run the whole crate suite or clippy-strict. cargo clippy -p minimal --all-targets reported no warnings.

Tests

line exit tail
cargo nextest run -p minimal box_audit_filters_to_one_box 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-83c4... 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 client-config v0.0.1 (/wo
cargo nextest run -p minimal box_audit_name_reads_live_else_latest_creation 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-f5f5... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) Compiling decode v0.0.1 (/workbench/crates/decode) Compiling mlog v0.
cargo nextest run -p minimal box_audit_reads_a_record_the_proxy_wrote_for_a_minted_id 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-cacd... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) Compiling decode v0.0.1 (/workbench/crates/decode) Compiling mlog v0.

Verify

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

            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "1e7ffbcd836cd8fc",
                "span_id": "6592ff002b1b1814",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetNetSwitch",
                "parent_span_id": "1e7ffbcd836cd8fc",
                "span_id": "7d78cab6a3f27e13",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetDenyAllOptOut",
                "parent_span_id": "1e7ffbcd836cd8fc",
                "span_id": "4fbcd4f6b03852bf",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetPaths",
                "parent_span_id": "1e7ffbcd836cd8fc",
                "span_id": "14607b709e5670a9",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "1e7ffbcd836cd8fc",
                "queued_behind": "0",
                "span_id": "4e70e502bffb8e4a",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "1e7ffbcd836cd8fc",
                "queued_behind": "0",
                "span_id": "bc68815a94aff971",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "bc68815a94aff971",
                "span_id": "c592b468c834093a",
                "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 [  39.085s] 812 tests run: 811 passed, 1 failed, 1 skipped
        FAIL [   2.765s] (812/812) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

Closes #2462

The proxy writes a record's subject as 32 lowercase hex digits
(bep::listener::box_id_text). min box audit matched the hyphenated id,
so it showed no records for a real box. resolve(), children() and
render() now match the proxy's form. Messages keep the hyphenated id
that min ls shows. Test fixtures write subjects as bep serve does.
@coderabbitai
coderabbitai Bot commented Oct 31, 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: 5bce84c8-3d0a-423f-8f5f-52115bc62b6e

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 Oct 31, 2026 •
Copy link
Copy Markdown
Contributor Author

Approved: no findings at e28463407ee3.

Nothing to do.

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-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 architecture.md line 505. Before this change, min box audit compared the hyphenated id with a subject that the proxy writes as 32 hex digits. It did not find any record. Now the reader gets the subject from bep::listener::box_id_text, the function that the proxy also uses. The name rule (live box, else newest UUIDv7 creation) is unchanged. There are no conditions.

Ruled at e284634 against gominimal/arch@8640f85e193d 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 — approved

Verdict APPROVE — No findings.

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

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 31, 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.

Reviewed at e284634 against T103's plan block.

  • Matching on the proxy's id form: resolve() now keeps the SessionId. The single-box filter, children() and the --parent path all match subject against bep::listener::box_id_text, 32 lowercase hex digits. The proxy writes that form in its decisions (proxy.rs). min writes it in mint records (mint.rs box_id_hex). So every record kind matches.
  • Display: render shows the hyphenated id from min ls. Uuid::parse_str accepts the 32-hex form, and a subject that does not parse prints escaped.
  • Name rule: unchanged.
  • Tests: the fixtures now write subjects in the proxy's form. box_audit_reads_a_record_the_proxy_wrote_for_a_minted_id writes the subject through a real Delivery round trip, reads it by hyphenated id and by name, and pins the Showing web (box <hyphenated>). line.

No findings. #2773's e2e case relies on the hyphenated Showing line staying as it is, and it does.

@norrietaylor
norrietaylor added this pull request to the merge queue Oct 31, 2026
Merged via the queue into main with commit 907e13b Oct 31, 2026
36 checks passed
@norrietaylor
norrietaylor deleted the agent/2462-match-min-box-audit-on-the-box-id-spelling-the-p branch October 31, 2026 07:15
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.

T103 — Match min box audit on the box id spelling the proxy writes

1 participant

0