Repository navigation
T103 — Match min box audit on the box id spelling the proxy writes - #2793
norrietaylor merged 1 commit into
Conversation
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.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Approved: no findings at 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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Reviewed at e284634 against T103's plan block.
- Matching on the proxy's id form:
resolve()now keeps theSessionId. The single-box filter,children()and the--parentpath all matchsubjectagainstbep::listener::box_id_text, 32 lowercase hex digits. The proxy writes that form in its decisions (proxy.rs).minwrites it in mint records (mint.rsbox_id_hex). So every record kind matches. - Display:
rendershows the hyphenated id frommin ls.Uuid::parse_straccepts 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_idwrites the subject through a realDeliveryround trip, reads it by hyphenated id and by name, and pins theShowing web (box <hyphenated>).line.
No findings. #2773's e2e case relies on the hyphenated Showing line staying as it is, and it does.
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>andmin box audit <name>list the records the proxy wrote for that box; the line "Showing (box )." keeps the hyphenated id a person sees inmin ls, pinned by box_audit_reads_a_record_the_proxy_wrote_for_a_minted_idobservability: 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()andchildren()match a record'ssubjectagainst 8000 the box id in the proxy's one text form,bep::listener::box_id_text(32 lowercase hex digits), not the hyphenatedSessionIddisplay form, somin box auditshows 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, asbep servedoestest: 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 auditmatches the audit recordsubjectagainst the box id in its hyphenatedboxes::SessionIdDisplayspelling:resolve()andrender()incrates/minimal/src/cmd/box_audit.rscompare that string. A name resolves to the live box, else the most recent creation, bymax_by_keyon 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 hyphenatedDisplayspelling 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
SessionIdDisplayspelling and UUIDv7 ordering, with a test thatmin box audit <id>finds a record the proxy wrote for a freshly minted id, or updatesresolve()andrender()and the name rule in the same change.Generated by Claude Code
Proof
On this branch,
min box audit <id>andmin 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 thatmin lsshows.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 pathbep serveuses. 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
cargo nextest run -p minimal box_audit_filters_to_one_boxcargo nextest run -p minimal box_audit_name_reads_live_else_latest_creationcargo nextest run -p minimal box_audit_reads_a_record_the_proxy_wrote_for_a_minted_idVerify
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.Closes #2462