buzz
buzz copied to clipboard
test(relay): pin req/search tracer gate coverage
What
Adds causal regression coverage for the tracer enabled() gates around conformance row-community lookup in the REQ handler.
- Extracts shared helper paths for read-seam emission in
crates/buzz-relay/src/handlers/req.rs:maybe_emit_read_message_rows_with_lookup(historical REQ lane)maybe_emit_read_by_id_rows_with_lookup(NIP-50 search hydration lane)
- Keeps behavior identical while making the gates directly testable.
- Defers row-channel projection work until after
tracer.enabled()so disabled tracers skip all read-seam prep work. - Adds tests that pin both call sites and multi-filter behavior.
Why
Issue #4758 identified that removing a call-site gate could still pass existing tests, leaving the regression unpinned.
Repro + Mutation Proof
Local repro before this change:
cargo test -p buzz-relay counting_tracer_delegates_enabled_to_innerpassed- deleting a call-site
enabled()gate inreq.rsstill passed
With this change:
- deleting the historical helper gate causes
historical_req_multi_filter_disabled_tracer_skips_lookupto fail - deleting the search helper gate causes
search_hydration_disabled_tracer_skips_lookupto fail
Tests
cargo test -p buzz-relay historical_req_multi_filtercargo test -p buzz-relay search_hydration_cargo test -p buzz-relay
Closes #4758.
@claude review
To use Codex here, create a Codex account and connect to github.