Skip to content

note_upstream has no production caller: the audit schema's upstream block is a dead field #118

Description

@plusky

Summary

AuditCell::note_upstream (crates/bugwarden/src/audit.rs:1285) is called only from #[cfg(test)] code — its sole caller sits inside audit.rs's test module — so take_upstream at the server call site (crates/bugwarden/src/server.rs:3458) always yields None and no real record ever carries the upstream block (requests/status/latency_ms, audit.rs:605). It exists only in hand-built schema goldens. #113 records this in DESIGN.md's Testing list (docs/DESIGN.md:1980). Found during #94's sweep.

Why it matters

The schema advertises upstream observability — how many Bugzilla REST requests a call made, the final status, time spent waiting — that no deployment can ever see. Every schema test over the block validates a value only tests can produce: the same blind-spot shape #94 closed for redacted_fields, a field never asserted through a real tool call.

Suggested direction

Either wire client-side request/latency instrumentation in bugwarden-core so real calls populate the block, or remove it rather than freezing a field nothing writes. The removal alternative should land with #34's SCHEMA_VERSION 2 bump instead of spending a schema revision of its own; the populate alternative is independent of #34 and actionable now, so this issue is coupled to #34 on one of its two exits but not blocked by it.

Acceptance criteria

Metadata

Metadata

Assignees

No one assigned

    Labels

    auditAudit log subsystemenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions