The Security tab's core reaches both heads. `AuditReport` joins `SCHEMA_TYPES`, which
is the six-place change the P1-A record describes — including `golden.rs`'s own copy of
the list, a new `golden__schema-AuditReport.snap`, and the expected churn in
`golden__schema-unknown-type.snap`, whose error message enumerates every known type.
`audit_run` takes the freeze itself, through the configured engine, because that choice
changes what is audited: pip is invoked with `--all` and includes pip and setuptools,
uv has no such flag. The real run makes that concrete — auditing the SP-4 environment
reports **five advisories in pip 25.0.1** alongside urllib3's eight, which a uv-engine
audit of the same environment would not see. The store guard is read and dropped before
any subprocess.
`AppState.audit` is `Sessions<()>`: nothing is parked, because an audit hands its report
straight back with no second call consuming it the way `health_fix` consumes a
`HealthSession`. What the slot is for is the **token**, which lives beside it so
`audit_cancel` can reach a run the slot no longer owns. Its own slot rather than
health's, for the reason health's is not `sessions` — an audit touches no environment,
so refusing it while Code Health runs would be a lock with no invariant behind it.
`pipdock audit` exits **1 on findings**, as `health` does: an advisory is a result, not
a failure, and a script wants to branch on it. A tool problem outranks the findings, so
a report that is empty because pip-audit never ran cannot exit 0 and read as "nothing
wrong here".
**Run rather than asserted.** Cold, against `spikes/out/target-env` with an isolated
`LOCALAPPDATA`: the audit venv bootstrapped, wrote its manifest, and reported 13
advisories across 2 packages; `--json` emitted **one** camelCase document with
`toolVersion` read back out of that manifest, and exit was 1. The second run did no
bootstrap at all, which is `needs_sync` returning `Fresh` for `AUDIT_TOOLS` — the half
of the venv split that only a warm second run can show.
Two hand-maintained lists were a row short and are not now: ARCHITECTURE §7, which the
new drift test demanded before it would pass, and `golden.rs`'s per-command help list,
which nothing polices — so `help-audit.snap` exists rather than the subcommand's help
going unpinned.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>