Repository navigation
T106 — Audit a refused ambiguous request head on the live path and show it in min box audit - #2809
Conversation
A test reads the live path's framing_ambiguous record for the box from the audit log that min box audit reads. The AuditSink doc says the live path writes through Flow::record.
The record carries the box id in the hex spelling bep serve writes, and renders as a refuse line with the framing_ambiguous marker.
…fused-ambiguous-request-head-on-the-li # Conflicts: # crates/minimal/src/cmd/box_audit.rs
|
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. The proxy already writes an audited close for an ambiguous head, as §5.7 line 216 requires. This PR proves that record in the audit log and in min box audit, with the field set that architecture.md line 505 gives. The framing rule goes to the info log line because the record has no field for it. The doc on CloseReason::rule still says "debug log line". Update it when you next edit that file.
Ruled at 168c027 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. |
There was a problem hiding this comment.
Approving at 168c027. forward_requests logs one info line for a refused head, naming the box, the marker and the framing rule, with no request content. live_path_audits_a_framing_ambiguous_head drives a CL+TE head through the live request half. It asserts that no byte goes upstream, that exactly one framing_ambiguous refuse record is written for the box, and the log line. box_audit_lists_a_refused_ambiguous_head pins the min box audit line for the record under the hex box id. The AuditSink doc now says the live path does not use it. BEP-039.
T106 — Audit a refused ambiguous request head on the live path and show it in min box audit
slice: S15
kind: task
covers: BEP-039
size: S
est: 30 code, 120 tests
executor: agent
difficulty: routine
model: light
diagnostics:
min box audit <box>lists a request head the proxy refused for ambiguous framing as arefuseline with the markerframing_ambiguous, pinned by box_audit_lists_a_refused_ambiguous_headobservability: the proxy's log line for the refused head names the box and the framing rule; the audit record carries the marker, since BEP-039's record has no field for the rule
layers:
- proxy:
- crates/bep/src/forward.rs: a test sends an ambiguous head through
forward::forward_requestsand reads oneframing_ambiguousrecord for the box from the audit log; the refusal's log line names the rule (#2435)- crates/bep/src/http.rs: the
AuditSinkdoc says the live path writes throughFlow::record, and that the trait serves this module's own teststest: cargo nextest run -p bep live_path_audits_a_framing_ambiguous_head
- audit:
- crates/minimal/src/cmd/box_audit.rs: a test renders a
framing_ambiguousrecord thatbep servewrote, in the proxy's id spellingtest: cargo nextest run -p minimal box_audit_lists_a_refused_ambiguous_head
produces: none
consumes: none
proof: After the proxy refuses a box's request head for ambiguous framing,
min box audit <box>lists the refusal with the marker framing_ambiguous.depends on:
- blocked by #2462
- blocked by #2782
Original issue text
Residual of #2362 (T8, epic #1501). Named by minimal-arch condition C1 on 08ed473.
crates/bep/src/http.rsrecords aframing_ambiguousaudit event through theAuditSinktrait when the proxy refuses a request head for ambiguous framing (BEP-077). Today the onlyAuditSinkis the testVec<AuditEvent>. The production sink has to append that record to the min/v1 audit log so thatmin box audit <box>shows it (BEP-039).Blocked on #2361 (T9), which builds the audit record writer this sink appends through.
Done when: a production
AuditSinkin the proxy's connection loop appends theframing_ambiguousrecord with the box id and the rule name, andmin box audit <box>lists it after a refused head.Generated by Claude Code
Proof
When the proxy refuses a box's request head for ambiguous framing, the live path writes one refuse record with the marker framing_ambiguous for that box to the audit log.
min box audit <box>then lists it asdecision refuse github.com:443 none module_unmapped module_unmapped framing_ambiguous. The proxy log has an info line for the refusal that names box_id, marker and rule.Notes from the agent: The live path already wrote the framing_ambiguous record through Flow::record. The new bep test pins that against a real AuditLog read back with LogReader. The code change in forward.rs moves the log line for a refused head from debug to info, so that it shows at the default
bep servelog level. That line is now 'a request head was refused' and has box_id, marker and rule. Other closes stay at debug. The minimal test writes the record in the same field shape that Flow::record uses, because Validated::unchecked is test-only in bep and minimal cannot build a Flow. No file outside the layers was touched. I did not run clippy-strict.Tests
cargo nextest run -p bep live_path_audits_a_framing_ambiguous_headcargo nextest run -p minimal box_audit_lists_a_refused_ambiguous_headVerify
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.Base
The base branch moved while the coder worked and was merged in before the tests ran. These files changed on BOTH sides since the branch point — read them first, because a rewrite from a stale reading can undo a merge without a conflict:
crates/minimal/src/cmd/box_audit.rsCloses #2435