Repository navigation
T104 — Read each box's parent so min box audit --parent merges its children - #2800
Conversation
known_boxes reads each listed box's parent from its record, which the daemon stamps at creation. The interim refusal of --parent on a host without parents, and its LISTING_RECORDS_PARENTS gate, are removed. The tests drive run with the boxes known_box builds from a listing entry and a record.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The change conforms to the design. min box audit --parent now reads each box's parent from the daemon-stamped Box Record, as architecture.md lines 503 and 505 require. The interim refusal is removed, and its flip condition (#2386) is met. The code stays in box_audit.rs, and the tests use the production known_box mapping. No condition is necessary.
Ruled at b914a9b against gominimal/arch@8640f85e193d by claude-opus-5-5.
|
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. |
norrietaylor
left a comment
There was a problem hiding this comment.
Reviewed at b914a9b against T104's plan block.
known_boxesnow reads each box's parent from its record (GetSessionRecord), and only when--parentis given. A record that is missing gives no parent rather than an error.LISTING_RECORDS_PARENTS,refuse_parent_before_listingand the "cannot run here" refusal are gone. No doc or script quotes that text.- The tests drive
runwith the parentsknown_boxbuilds from records, not a hard-coded flag.box_audit_parent_merges_childrenandbox_audit_parent_reads_parents_from_the_box_recordscover a stamped child, a box whose record was not read, and a parent with no children.
No findings.
T104 — Read each box's parent so min box audit --parent merges its children
slice: S15
kind: task
covers: BEP-042
size: M
est: 80 code, 120 tests
executor: agent
difficulty: routine
model: standard
diagnostics:
min box audit --parent <box>lists each child box's records with the child's id at the start of each line; a box with no child prints "Box has no child boxes." on stderr; the refusal "min box audit --parentcannot run here: this host does not record which boxes are children of box . Runmin box audit <box>for each child box." goes, pinned by box_audit_parent_reads_parents_from_the_box_recordsobservability: the existing debug line of each read names the child box ids it merged
layers:
- audit:
- crates/minimal/src/cmd/box_audit.rs:
known_boxesreads each listed box's parent from its record (boxes::Record::parent, which the daemon stamps at creation since #2386),LISTING_RECORDS_PARENTS,refuse_parent_before_listingand the refusal text go, and the tests driverunwith the parentsknown_boxesgives, the pathmin box audittakes, not with a hard-codedparents_recorded = true(BEP-042--parent)test: cargo nextest run -p minimal box_audit_parent_merges_children
test: cargo nextest run -p minimal box_audit_parent_reads_parents_from_the_box_records
produces: none
consumes: none
proof:
min box audit --parent <box>merges the records of every child of that box, each line naming its child, on a host whose boxes carry a parent.depends on:
- blocked by #2462
Proof
On a host whose boxes carry a parent,
min box audit --parent <box>now merges the records of every child of that box onto one stream, and each line starts with the child's id. A box with no child prints "Box has no child boxes." on stderr. The refusal "min box audit --parentcannot run here ..." is gone.Notes from the agent: The daemon listing (ListSessionsEntry) carries no parent field. So known_boxes sends one GetSessionRecord by id for each listed box and reads Record::parent. It does this only when --parent is given, so
min box audit <name>still makes one listing call. A box whose record lookup returns no record has no known parent. A failed GetSessionRecord RPC fails the command. The new pure fn known_box(entry, record) does the mapping, and the test helperknownbuilds every test box through it. The observability line already exists: the debug line in read_and_render logsbox_ids(the merged child subjects), so it needed no change. The clippy::too_many_arguments expectation onrunis removed, becauserunlost the parents_recorded argument and the lint no longer fires. I rancargo nextest run -p minimal box_auditas one extra check: 11 passed. I did not runjust clippy-strict.Tests
cargo nextest run -p minimal box_audit_parent_merges_childrencargo nextest run -p minimal box_audit_parent_reads_parents_from_the_box_recordsVerify
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 #2781