forked from bchanot/claude
New T8 in lib/tests/run-deterministic.sh: pre-commit hook that always rejects (exit 1), then attempts a memory-commit. Demonstrates J4-04 (UNTESTABLE, consequence CRITICAL) against the CURRENT code, on purpose — this commit is RED: rc=0 (expected 5), stdout leaks the stale (unchanged) HEAD hash instead of staying empty. `set -uo pipefail` (no -e) means a rejected `git commit` doesn't stop the function — it falls through to `git rev-parse --short HEAD`, which prints the PREVIOUS HEAD and succeeds, so the caller sees what looks like a valid hash for a commit that never happened. HEAD itself is correctly unmoved (git did block it) — only the reporting is masked. This intentionally reds `make test` (memory-commit.sh not yet fixed). Next commit fixes it.