4.2 KiB
C4 repair for the short static pass
Prepared under duckworth-0111 and sage-2325/2331. No tests, syntax execution, probe, real sudo or host experiment ran on this repair. No passing claim applies to these new product bytes. DESIGN.md and the approved DESIGN-C4.md remain unchanged. The original frozen snapshots remain unchanged.
REPAIR.diff compares the repaired scripts against their original frozen source, and tests/docs against 968db0bcd. The *.repair.txt files are non-executable exact snapshots of all seven pending source/test/doc paths. REPAIR-SHAS.json pins them. The live source/test paths remain uncommitted until the gate permits the product commit.
Conditions mapped to the diff
C1: fixed setsid without -f/-w; confirm the direct child's kernel SID equals its PID. M38 drops setsid; the named row253 C4 signals query killer must fail the exact numeric PID/SID equality assertion on the first query-pids line, in each kind and both sudo modes, without a timeout. A blocking child can still reach inner-timeout without setsid, so the refusal reason alone does not prove session creation (mos-1298).
C2: exact inner/outer/output-limit refusals in both fake modes, query 5/7 s and probe 2/4 s. Outer cases require at least the outer duration and less than outer + 2 s. Root discards the valid-looking stdout of a stalled supervisor. A trusted notice plus status 137 identifies the outer timer.
C3: read complete stat files, strip through the last closing parenthesis followed by space, skip vanished entries, refuse on other errors. The setpgid member has newline, closing parenthesis and space in comm. M36 kills only the leader group and must fail that case. The existing 250 ms cleanup budget and 50 x 10 ms post-return test polling remain.
C4: DEFERRED.md names row 276 / #1781 and the brief from sage-2331. It is an intended manifest path. UPSTREAM-PATHS.json records the requested comparison. Current upstream DEFERRED.md was preserved before our entry.
C5: the test compares both inline payloads byte for byte; M39 adds a comment to only one. Both payloads were prepared from supervisor-source.txt.
N1: the fake reads its mode with the Bash file-read builtin form. N2: fixture cleanup rechecks SID before each kill, including members discovered by an owned-session scan. N3: exec mode cannot safely scan the runner's session, so it checks exact PIDs and says so; hop mode checks all members of self-led recorded sessions. N4: the fake still makes no synthetic HUP on its own death. N5: polling remains bounded at 500 ms. N6: the packet must be published before the manifest round.
Line references in matching repair snapshots
- scripts/case2-unit.sh:162:
stat_fields() - scripts/case2-unit.sh:180:
clean_session() - scripts/case2-unit.sh:220:
"$setsid_bin" "$@" - scripts/case2-unit.sh:221:
for ((attempt= - scripts/case2-unit.sh:240:
tester_tools() - scripts/case2-unit.sh:270:
tester_capture() - packages/cli/tests/case2-unit.test.mjs:192:
for(const kind - packages/cli/tests/case2-unit.test.mjs:219:
C4 stalled supervisor - packages/cli/tests/case2-unit.test.mjs:233:
C4 inline supervisor - packages/cli/tests/case-sudo-fixture.mjs:21:
case_sudo_run() - packages/cli/tests/case-sudo-fixture.mjs:84:
function sessionPairs - packages/cli/tests/case-sudo-fixture.mjs:75:
function killPairs - packages/cli/tests/case1-accept.test.mjs:309:
C4 acceptance query inner - packages/cli/tests/case1-accept.test.mjs:322:
C4 acceptance query outer - packages/cli/tests/case1-accept.test.mjs:345:
for(const fault - docs/plans/DEFERRED.md:456:
## Row253 F5
Proposed next gate
On Sage CLEAR after static approval: both touched files whole, M1-M39 with passing focused bases and byte-identical restoration, CLI whole, WebUI whole and the ten shell files. Previous completed results are historical only because product blobs changed. Use a gXXXXXX TMPDIR under /mnt/storage/scratch/tmp, pipefail and tee, a busy check before every launch, and log/wrapper names that do not match the busy detector. Stop and report according to the new grant.
REPAIR.diff uses zero context so blank context lines in the stored patch do not trigger whitespace checks on the record itself. The full matching snapshots provide surrounding context.