Files
claude/.claude/tasks/contracts/2026-11-12-dead-deny-lock-1239.md
T

4.2 KiB

CONTRACT — dead-deny-lock

  • date: 2026-11-12 | flow: feat | branch: feature/dead-deny-lock
  • status: active

REQUEST (verbatim — IMMUTABLE)

Dead deny entries, test half (user decision 2026-11-12 [gated]: Claude edits the test, the user removes the 6 lines from settings.json by hand and commits). TODO.md:156 + :92: the 6 dead deny entries Bash(docker run * -v /:*), Bash(git push * :*), Write(**/.git/config), Write(**/.gitconfig), Write(~/.gitconfig), Write(~/.config/git/config) (working forms -v /:/*, :**, Edit(...) added 2026-10-23, LRN in journal:646: Write(glob) deny never blocks the Write tool, Edit(...) does; mixed * :* / * -v /:* forms never match) are kept by lib/tests/push-guard.test.sh T41 (requires the 4 Write lines) and T42 (nothing removed vs the last release on main). Change only lib/tests/push-guard.test.sh: T41 stops requiring the 4 Write(...) lines (Edit forms stay required); T42 accepts exactly these 6 removals through a justified-removal list (each with its reason), anything else removed still fails. The test must be green both before and after the user's settings.json edit. Do not touch settings.json. make test needs GATES_TIMEOUT=600 + PATH=$HOME/.bun/bin:$PATH (LRN-271). Foreign-code style. In force: BDR-100, LRN-275, LRN-277.

CLARIFICATIONS

Q: plan? / A: .claude/tasks/plans/2026-11-12-dead-deny-lock-1239.md, latest revision is binding (orchestrator) Q: who edits settings.json? / A: the user, by hand, after this run merges (user, 2026-11-12) [gated] Q: justified list content? / A: only the 2 Bash entries main carries; the 4 Write lines leave T41 with a reason comment (base has no Write entry; a stale row fails, see below) (orchestrator, round 1) Q: list row absent from base? / A: FAIL (T42e) (user, 2026-11-12, superseded: no green path, challenge round 2) Q: stale list policy, re-gate? / A: expiry by version: removed_ok_until=3.0.0; T42e fails once version.txt is past it while the list is non-empty; the list is emptied in that bump (user, 2026-11-12) [gated] Q: rtk cat|head|tail forms? / A: separate TODO item with its own reviewed rows; TODO.md:92 rewritten to exactly the 6 (user, 2026-11-12) [gated] Q: baseline fact / A: main and origin/main (2026-11-06) hold only the 2 Bash entries; the 4 Write lines are guarded by T41 alone (orchestrator, read-only check)

ACCEPTANCE CRITERIA

  1. push-guard suite green on the current settings.json. CHECK: cd /home/bchanot/Documents/claude && GATES_TIMEOUT=600 PATH="$HOME/.bun/bin:$PATH" make test suite=lib/tests/push-guard.test.sh 2>&1 | grep -q "^PASS=[0-9]* FAIL=0" && echo PG-NOW EXPECT: PG-NOW EVIDENCE: MET exit=0 marker-found :: PG-NOW
  2. The suite proves the after-state in-suite: the lock bites (T42c), the user's 6-line edit is forgiven (T42d), the list expires by version (T42e); 3 more passing checks. CHECK: cd /home/bchanot/Documents/claude && P=lib/tests/push-guard.test.sh && grep -q 'T42c-lock-bites' $P && grep -q 'T42d-edit-forgiven' $P && grep -q 'T42e-list-not-expired' $P && grep -q '^removed_ok_until=3.0.0$' $P && GATES_TIMEOUT=600 PATH="$HOME/.bun/bin:$PATH" make test suite=$P 2>&1 | grep -q '^PASS=133 FAIL=0' && echo PG-AFTER EXPECT: PG-AFTER EVIDENCE: MET exit=0 marker-found :: PG-AFTER
  3. T41 no longer requires the 4 Write lines, requires the 2 working Bash forms; Edit forms still required; the justified list holds exactly the 2 Bash entries, each with a reason line. CHECK: cd /home/bchanot/Documents/claude && P=lib/tests/push-guard.test.sh && ! grep -q '^Write(' $P && grep -qx 'Edit(**/.git/config)' $P && grep -qx 'Edit(~/.config/git/config)' $P && grep -qxF 'Bash(docker run * -v /:/)' $P && grep -qxF 'Bash(git push * :**)' $P && grep -qxF 'Bash(git push * :)' $P && grep -qxF 'Bash(docker run * -v /:)' $P && [ "$(grep -c '^# mixed . form never matches' $P)" = 2 ] && ! grep -q $'\t' $P && echo T41-OK EXPECT: T41-OK EVIDENCE: MET exit=0 marker-found :: T41-OK
  4. Full suite green, shellcheck clean. CHECK: cd /home/bchanot/Documents/claude && shellcheck -S warning lib/tests/push-guard.test.sh && GATES_TIMEOUT=600 PATH="$HOME/.bun/bin:$PATH" make test 2>&1 | tail -1 | grep -q 'all suites green' && echo GREEN EXPECT: GREEN EVIDENCE: MET exit=0 marker-found :: GREEN

FILE SCOPE

lib/tests/push-guard.test.sh