auto becomes the default next week

Zero security tests covered auto or dontAsk. Hooks branch on both.

The deadline

Claude Code makes auto the default permission mode as of ~2026-08-14. Before this file, zero tests under tests/security exercised auto or dontAsk — while hooks branch on both at guards.ts:339/349 and architecture-change-detector.ts:120.

The envelope key is not guessed

#3331 reports 103 unit tests passing against a helper dead in production, because fixtures were hand-written in camelCase exactly like the broken code — the suite encoded the bug. guards.ts:326-329 reads permission_mode first and calls camelCase “a speculative fallback”. Both spellings are asserted anyway.

Proven to discriminate

mutant 1  dangerous payload -> benign      rc=1, 8 failures
mutant 2  hook key -> nonexistent          rc=1, 9 failures
restored                                   rc=0, 17 passes
runner    18 -> 19 tests, glob-discovered
Section 0 asserts the hooks are actually registered. An unregistered key returns {"continue":true} with no decision, which reads as allow — without that guard this file would be the theater it exists to prevent.