Crate: vox-audit · Version: 0.6.0 · Target: Library (lib.rs)
Umbrella CR-L gate runner. Hosts the vox audit <thing> subcommand registry and implements the canonical JSON report shape defined in contracts/ci/vox-audit-contract.v1.yaml.
Umbrella crate hosting the [Subcommand] trait and the canonical
vox audit <thing> registry. One subcommand per CR-L gate
(CR-L0..CR-L8 / CR-L-retirement) from
docs/src/architecture/v1-release-criteria.md
§5, behaviorally conforming to
contracts/ci/vox-audit-contract.v1.yaml.
Council-ratified 2026-05-15 (D21 in
docs/src/architecture/v1-llm-target-implementation-plan-2026.md §8.1):
new top-level crate, NOT a submodule of vox-cli — vox-cli is at TOESTUB
sprawl limit and this concern deserves its own home.
- Library API (this file +
report.rs + subcommands/): callable from
tests, vox-cli, and the vox-gui audit panel.
- CLI binary (
src/main.rs): the user-facing vox-audit executable.
- Single planning anchor (
contracts/ci/vox-audit-contract.v1.yaml)
declares: CLI flag set, exit-code convention, telemetry namespace,
per-subcommand gate / corpus / block_ga / cost_metered fields.
| Feature | Default / Enables |
|---|
ci-gates | — |
default | — |
| Module | Description |
|---|
aggregator | — |
core_gates | — |
ga | — |
recorder | — |
report | — |
subcommands | — |
| Struct | Description |
|---|
CommonArgs | Common arguments shared by every subcommand. |
RunOutcome | One run outcome: the report and the exit code the binary should return. |
| Enum | Description |
|---|
Tier | Release-criteria tier. Declaration order IS the GA evaluation order: foundation gates are evaluated and reported before any downstream gate (see CR-F0 in docs/src/architecture/v1-release-criteria.md and the --gate all --strict-block-ga roll-up). |
CrlGate | CR-L gate identifier — one variant per row in contracts/ci/vox-audit-contract.v1.yaml §subcommands. |
| Trait | Description |
|---|
Subcommand | Trait every vox audit <thing> subcommand implements. The umbrella runner (vox audit all) iterates over registered subcommands in CrlGate::all() order and aggregates their outcomes into a combined report at contracts/reports/audit-all/<date>.json. |
| Function | Description |
|---|
as_str | Stable lowercase tier name used in the GA snapshot rows. |
thing_name | Stable name as used by vox audit <thing> and the report thing field. |
block_ga | Per-contract: does failure of this gate block GA? Tooling gates (non-CR-L) always return false — they exist to keep the corpus healthy during development, not to gate release. |
cost_metered | Per-contract: does this gate meter LLM cost during measurement? |
tier | Which release-criteria tier this gate belongs to. The CR-L gates are §3.5 Product; the stdlib-coverage gate is Tooling. Foundation / Distribution / GUI variants enter as their gates land (Phase 0+). |
all | Iterator over every registered gate, in display order. |
workspace_root | Workspace-root locator: walks up from CARGO_MANIFEST_DIR looking for the top-level Cargo.toml that contains [workspace]. Used by subcommands to resolve contract paths. |
registry | Build the canonical registry of subcommands (2 CR-F foundation gates + 9 CR-L gates + 1 tooling gate). Order matches CrlGate::all() and contracts/ci/vox-audit-contract.v1.yaml §subcommands. Tooling gates appear after the CR-L block. |
gate_from_name | Resolve a [CrlGate] from a stable thing-name string. |
run_gate | Run a single subcommand by gate, returning its outcome. Emits a vox.audit.run telemetry event for every invocation per contracts/ci/vox-audit-contract.v1.yaml §telemetry (A11, ratified 2026-05-15). record_event! is a no-op when no recorder is registered, so the emission adds zero cost to non-instrumented runs. |
run_all | Run every registered subcommand and aggregate their outcomes into a combined report at contracts/reports/audit-all/<date>.json. Worst-case exit code semantics per contract §umbrella: - 0 if all sub-runs return 0 - 1 if any sub returns 1 and none return 2 or 3 - 2 if any sub returns 2 and none return 3 - 3 if any sub returns 3 Emits one vox.audit.run telemetry event per sub-gate (with umbrella_run = true) per A11 contract compliance. |
run_ga_snapshot | Run every registered gate (foundation first per CR-F0) plus the standalone product binaries, fold them into a [ga::GaSnapshot] with blocked_by_foundation semantics, and (when args.write_canonical_report) write contracts/reports/_snapshot/<UTC>.json. This is the spine behind vox audit --gate all --strict-block-ga. |
aggregate_exit_code | Aggregate-exit-code per contract §umbrella. |