altimate-code icon indicating copy to clipboard operation
altimate-code copied to clipboard

feat(review): structured audit event when --force-tier bypasses the classifier

Open sahrizvi opened this issue 4 months ago • 0 comments

Deferred from the v0.9.3 pre-release review.

Current behavior

altimate review --force-tier=<tier> writes a warning to stderr and stamps tierForced: true + tierClassified (the classifier's original decision) into the signed verdict envelope. format.ts also renders "forced (was )" in the PR-comment headline.

Gap

Pipelines that don't archive the full JSON envelope have no durable trail of the bypass. Stderr is easily lost to CI log rotation, and a compliance auditor months later cannot confirm whether a governance bypass occurred without the archived JSON.

Proposal

Emit a structured audit event when --force-tier is applied. Delivery-surface options to weigh:

  • Webhook — configurable target, JSON payload including tier, classifier tier, actor, commit SHA, envelope signature.
  • OTEL span — piggybacks on existing tracing, but only useful when a collector is running.
  • Local append to .altimate/audit.log — always-on, but relies on the runner preserving the file.

Requires product input on which surfaces to support and precedence.

Why deferred

Delivery-surface decision required before the code change makes sense; the in-envelope signal is already durable for consumers that archive envelopes.

sahrizvi avatar Jul 23 '26 20:07 sahrizvi