Skip to content

Commit 03a0dcb

Browse files
committed
CLAUDE.md: add Pre-Edit Working-Tree Integrity discipline
Theologian 01:53:41Z draft per shepard 01:53:07Z + pythia python#104 (3) + supervisor 01:53:55Z GO. Adds proactive complement to existing gate python#3 (HEAD==binary AND tree-clean during build, REACTIVE detection at build-symptom). 4-step discipline for multi-file (≥2) edit sequences: 1. Pre-edit baseline snapshot 2. Mid-edit integrity check (HALT on unexpected change) 3. Pre-commit verification (HALT if staged diff diverges) 4. HALT response (clean-HEAD restore + observed-but-not-attributed report; do NOT auto-resume) Rationale: 5+ prior incidents caused gate failures + false BUILD PASS + ARM64 build BLOCK (D-1775810621, D-1775669703, D-1776414469, D-1776434533, D-1776887480/D-1776890644 per librarian 01:46:19Z). Triggered by 01:23Z external file-state revert during Tier 8 pilot Phase A execution (generalist 01:24:43Z observed-but-not-attributed HALT + clean-HEAD restore demonstrated the prescribed response). Doc-only +14L. No §3.5 BUILD MODE per touched-files rule (no builder*.{cpp,h,c} touched).
1 parent a9603a9 commit 03a0dcb

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,17 @@ When devgpu004 receives a commit via `git am` (because the local bundle is multi
144144
In that case, **tree-match is canonical**: x86_64 TREE == ARM64 TREE proves the content is identical. SHA-match is a metadata artifact, not a content check. Testkeeper reports both SHAs in this scenario and gatekeeper accepts tree-match as the gate.
145145

146146
For full SHA-match, refresh the bundle on devgpu004 between pushes (`git bundle create` on x86 + `scp` to devgpu004), or pursue W30 (point devgpu004's git origin at github directly).
147+
148+
## Pre-Edit Working-Tree Integrity (NEW)
149+
150+
Multi-file edit sequences (≥2 files) require working-tree integrity discipline:
151+
152+
1. **Pre-edit baseline snapshot.** Before multi-file edit, capture `git status --short` + `git diff --name-only HEAD`. Confirm tree state is clean OR known-modified.
153+
154+
2. **Mid-edit integrity check.** If any touched file's mtime/content changes UNEXPECTEDLY during edit (not as result of agent's own write), HALT immediately. Restore to baseline via `git checkout HEAD -- <file>` per Alex directive D-1776434533.
155+
156+
3. **Pre-commit verification.** At commit time, re-verify staged diff matches expected file-set + line-count forecast. If staged diff is missing expected files OR shows unexpected files, HALT (do NOT commit; investigate).
157+
158+
4. **HALT response.** When integrity violation detected, restore to clean HEAD per gate-#3 prescription (librarian 01:46:19Z) + post observed-but-not-attributed report per don't-speculate-on-cause (generalist 01:24:43Z precedent). Surface trigger for supervisor disposition; do NOT auto-resume.
159+
160+
Rationale: 5+ prior incidents (D-1775810621, D-1775669703, D-1776414469, D-1776434533, D-1776887480/D-1776890644) caused gate failures + false BUILD PASS + ARM64 build BLOCK. Per pythia #104 (3): gate #3 (HEAD==binary AND tree-clean during build) is REACTIVE; this discipline is PROACTIVE complement.

0 commit comments

Comments
 (0)