Commit b83f084
committed
W45 §3.5: fix restore_files() to snapshot pre-script state
ROOT CAUSE FIX for the 8-incident undiagnosed-recurring file-state
revert class (D-1776998268 + 7 priors).
Per supervisor 04:14:27Z post-incident-python#8 ROOT CAUSE IDENTIFICATION:
the §3.5 falsifier's restore_files() trap was the "external reverter"
across all 8 incidents. It ran `git checkout HEAD --` on TOUCHED_FILES
on script exit; if those files had unstaged modifications BEFORE the
script ran (e.g., agent's in-flight Tier 8 Phase A content), the trap
blew them away.
Empirical validation (this session 04:13:36Z):
- Test python#6 + python#7 (trivial content, single-mechanism): no revert
- Tests python#5/python#7 idle: no revert
- cmake build alone: no revert
- §3.5 invocation on staged Phase A: REVERT (PhxExceptionTable
count 13 → 0; mtime bumped 1777002918 → 1777003987; builder_state_c.h
no longer M in git status)
8 prior incidents now retroactively attributed to §3.5 trap firing
during build/gate cycles concurrent with agent Tier 8 attempts.
NO external actor (no VS Code, no Alex, no formatter, no cron).
W48 inotify daemon NOT NEEDED. (Iso-A) host relocation NOT NEEDED.
Class size CLOSED — class type changed from "undiagnosed-recurring"
to "self-inflicted via §3.5 trap, RESOLVED".
Fix mechanism: snapshot per-file content to /tmp on first
snapshot_file_if_new() call (per fixture mutation start). restore_files()
copies from snapshot (not HEAD), preserving pre-script unstaged state.
Snapshots cleaned + FILE_SNAPSHOTS array unset post-restore.
Re-validation (this session post-fix):
- §3.5 BUILD MODE 4/4 PASS
- post-restore build [OK]
- Phase A content (PhxExceptionTable count 13) SURVIVED §3.5 invocation
- ALL 6 Tier 8 staged files still M
Doc-only (script-only) push, no §3.5 BUILD MODE per touched-files rule
(this IS the §3.5 script being amended; meta-circular but doc-only
gate appropriate).
Authorization: supervisor 04:14:27Z FIX directive post-ROOT-CAUSE
identification (generalist 04:13:58Z catch).
Pythia python#105 'fever has name infection still spreads' was structurally
correct re self-inflicted infrastructure — but the infection wasn't
external-class undiagnosable; it was OUR OWN script's exit trap
trampling unstaged work. 5 detection layers (Alex directive D-1776434533,
gate python#3 D-1776887480, 4-step Pre-Edit WT Integrity D-1776995670,
mtime-checkpoint D-1776998268, W48 spec D-1776999077) added to detect
ourselves. Audit own scripts BEFORE external-actor hypotheses (per
new feedback memory entry).1 parent 61f0e3e commit b83f084
1 file changed
Lines changed: 39 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
79 | 84 | | |
80 | | - | |
81 | | - | |
82 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
83 | 93 | | |
84 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
85 | 103 | | |
86 | 104 | | |
87 | 105 | | |
| |||
90 | 108 | | |
91 | 109 | | |
92 | 110 | | |
| 111 | + | |
93 | 112 | | |
94 | 113 | | |
95 | 114 | | |
| |||
104 | 123 | | |
105 | 124 | | |
106 | 125 | | |
| 126 | + | |
107 | 127 | | |
108 | 128 | | |
109 | 129 | | |
| |||
121 | 141 | | |
122 | 142 | | |
123 | 143 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
128 | 151 | | |
| 152 | + | |
129 | 153 | | |
130 | | - | |
| 154 | + | |
131 | 155 | | |
132 | 156 | | |
133 | | - | |
134 | | - | |
| 157 | + | |
| 158 | + | |
135 | 159 | | |
136 | 160 | | |
137 | | - | |
| 161 | + | |
138 | 162 | | |
139 | | - | |
| 163 | + | |
140 | 164 | | |
141 | 165 | | |
142 | 166 | | |
143 | 167 | | |
144 | 168 | | |
145 | 169 | | |
146 | 170 | | |
| 171 | + | |
147 | 172 | | |
148 | 173 | | |
149 | 174 | | |
| |||
0 commit comments