Skip to content

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

Description

@sahrizvi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions