The gate read env.externally_managed - whatever the caller last cached - before anything was
probed, and the rollback flow had no gate at all (H12). The Settings override saved and nothing
read it, so turning it on changed nothing (H11). Every mutating flow now starts with one
preamble: probe, then decide on what the probe says. Without the override a managed
environment is PD-ENV-002 before any engine command; with it, the flow carries
SystemPackages::OverrideAllowed to every mutating engine call.
SystemPackages is a named value, not a bool, for the reason SnapshotProof is a named waiver:
hard invariant 5 says the flag is never passed implicitly, and this makes "implicitly"
greppable. It reaches pip and uv installs and removals, and uv's dry run, which refuses a
managed environment without it (verified, uv 0.13.1); pip's --dry-run --report is exempt and is
never given it. pip implemented PEP 668 in 23.0 and added the flag in 23.0.1, so below 23.0
nothing is passed and pip 23.0 itself is PD-ENV-002.
The CLI reads the override from the store both heads share - deliberately with no flag of its
own - and says on stderr, every run, that it is in force. Verified against a uv-managed
CPython 3.13 with an EXTERNALLY-MANAGED marker: refused without the override (exit 3); with it,
pip installed and uv dry-ran and removed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>