diff --git a/phase-ends/current/logs/T4.md b/phase-ends/current/logs/T4.md new file mode 100644 index 0000000000..4da3848874 --- /dev/null +++ b/phase-ends/current/logs/T4.md @@ -0,0 +1,27 @@ +# T4 log — rung S sweep, md_*, main, shared (Phase 3.39) + +## Attempts +- a1: read plan/summaries; brief T4.c1 (--only main selector, md/main/shared sweep). c1 committed 95612c3097 (selector, selftest 97/97), launched md cycle (pid 1360696). Forced hand-back → logs/T4.progress1.md (9b4ee67726). +- a2: archived progress1 (fd8c632c9b); briefed T4.c2 with remaining steps (main cycle, shared, residue, census, R22). Forced hand-back → logs/T4.progress2.md (e603d617c6). c1 and c2 were both still alive. +- a3 (this): archived progress2 (ddb65fc672). Waited idle (tail --pid) on md cycle 1360696, then main cycle 1638948, then c2 census/check-casts. Launched no coder: c1 and c2 finished every step. + +## Coder results (from their logs, checked against git log and re-run gates) +- c1 log logs/T4.c1.md, commits 95612c3097, 90257a55eb (docs/ops/p39-t4-2026-10-02-restruct-only-main.md). +- c2 log logs/T4.c2.md, commits c2ea6e5428 (residue rows), 8315a95bc6 (log). +- Cycle commits: md 3a259e0198 ef3cab3047 52b50095e5 93260530b5 773878d86a (S6 nothing drawable); main f6f4ae75d0 (S2 nothing drawable). Each final N/N identical, R22 218/218. +- shared: `--plan --rung S --headers --only "src/shared/*"` → 0 drawable (type-not-canonical 3054, type-not-visible 1); no cycle. +- Both coders started a main cycle; restruct apply.lock refused the second, no tree change. + +## Commands run (a3) +- `type_census.py --check-casts --quiet` → rc 1, raw P=257464 I=51505 X=13790 M=15130; macros CAST_ALIAS=1173 CAST_SIGN=8429 CAST_WIDTH=10410 CAST_MISALIGNED=624 CAST_NONSTRUCT=327 (unbacked 0); lying=229. +- `restruct.py --rung S --check-residue --only` md_* / main / src/shared/* / ov_* → uncovered 0 sites / 0 bodies, rc 0 each. +- `type_census.py --check-structs --quiet` → rc 0. +- `.run/logs/t4_verify.log`: make clean && extract-all (217 + main) && check-all → 218 passed, 0 failed. + +## Done-when assessment +- "as T3 for md_*, main, shared": met (every P/X body ledgered; kept casts backed; R22 green). +- "main gated only by gate_main.py": gate_main gates draft slates only (c2, retriever-code read gate_main.py:32-33,243-249); main gated by per-object oracle + cycle clean R22 (check.main.sha in the 218). +- "P and X raw = 0 fleet-wide except T5-owned (non-struct base)": NOT met. Residue P 257,464 / X 13,790, ledgered overwhelmingly TYPE-NOT-CANONICAL (T3 binding), not NON-STRUCT. Needs a plan ruling. + +## Retrievers +- none in a3 (c2 used one retriever-code on gate_main; no report adopted). diff --git a/phase-ends/current/tasks/INDEX.md b/phase-ends/current/tasks/INDEX.md index 7cc4dca93b..a15e688adb 100644 --- a/phase-ends/current/tasks/INDEX.md +++ b/phase-ends/current/tasks/INDEX.md @@ -3,3 +3,4 @@ T1 | done | phase-start health, carry cleanup and baselines | - | tasks/T1.md | logs/T1.md | R3.39-001 T2 | done | cast and lying gate instruments, reinterpret-macro set | - | tasks/T2.md | logs/T2.md | - T3 | done | rung S sweep, overlays (forms P and X) | - | tasks/T3.md | logs/T3.md | - +T4 | blocked | rung S sweep, md_*, main and shared bodies (forms P and X) | - | tasks/T4.md | logs/T4.md | - diff --git a/phase-ends/current/tasks/T4.md b/phase-ends/current/tasks/T4.md new file mode 100644 index 0000000000..a68b95279b --- /dev/null +++ b/phase-ends/current/tasks/T4.md @@ -0,0 +1,29 @@ +# T4 — rung S sweep, md_*, main and shared bodies (forms P and X) + +Status: blocked | expert: expert-opus55 (3 attempts, 2 handoffs) | ctx-at-completion: n/a | commit: see COMMIT line of the return | coder runs: c1 done (95612c3097, 90257a55eb), c2 done (c2ea6e5428, 8315a95bc6) +Done: every md_*, main and src/shared/* body with a P/X site has a latest rung-S ledger row (drawn, kept, or RESIDUAL by cause); md swept in t4_md_S1..S5, main in t4_main_S1, each R22 218/218 and committed by restruct_cycle.sh; shared had nothing drawable. The fleet-wide "P/X = 0 except T5-owned" clause is not met (see Deviations). +Files: +- src/md_*/**/*.c, src/*.c (main) — cast → member respell (S1/S2), CAST_* macros for kept sites +- tools/restruct.py — exact `--only main` selector (top-level src/*.c + src/resident/, never src/shared/main/*.h); selftest 97/97 +- docs/ops/p39-t4-2026-10-02-restruct-only-main.md, docs/ops/INDEX.md — new selector (H7) +- .run/P37/restruct/ledger.jsonl — S rows + residue rows t4_res_md/main/sh +Decisions: +- binding: tools/gate_main.py gates gate_lane draft slates only (it git-checkouts main TUs, conflicts with R102); main's rung-S gate is the per-object oracle plus the cycle's clean R22 (config/check.main.sha is one of the 218). +- shared headers: no fan-out attempted; 0 drawable bases (3054 type-not-canonical, 1 type-not-visible). +Deviations: +- Done-when clause "P and X raw = 0 fleet-wide except sites ledgered with a cause T5 owns (non-struct base)" fails: raw P=257,464, X=13,790. Residue is ledgered (check-residue 0 everywhere) but its cause is overwhelmingly TYPE-NOT-CANONICAL (T3 binding: base type has no canonical definition), not NON-STRUCT. Clearing it needs canonical definitions for map types (18,526 map types vs 1,650 defined), outside T4's files. Status blocked for a plan ruling, not weakened. +- No coder in attempt 3: c1 and c2 both survived the hand-backs and completed every step; verified from git and re-run gates. +Findings: +- md P 9,047 → 6,222 (X 92 unchanged); top-level main P 1,755 → 1,672 (X 83); resident 78 → 78; shared/ov 11,428 → 11,428; shared/slot_* 23 → 24 (+1, not investigated, no shared header edited). +- Repo check-casts: P 260,372 → 257,464; I 51,514 → 51,505; X 13,790 → 13,790; M 15,130. +- Residue rows: md 710 (TYPE-NOT-CANONICAL 4,815 sites, NO-TYPE-IN-MAP 31, FILE-SCOPE 1); main 265 (TNC 1,712, NO-TYPE-IN-MAP 19, FILE-SCOPE 9); shared 1,708 (TNC 11,353, NO-TYPE-IN-MAP 90, TYPE-NOT-VISIBLE 9). +- X form does not move under rung S: indexed sites sit on non-canonical bases. +Gotchas: +- harness: forced expert hand-back does not stop the expert's coders; two coders (c1, c2) kept running in parallel and both launched the same main cycle; restruct's apply.lock refused the second. A respawn must pgrep and wait before briefing anyone. +- harness: commit_task.sh re-runs plain `git add` on passed paths, failing on the gitignored ledger; `git add -f` it, then call commit_task.sh with no path args. +- workflow: readability snapshot "refused (a stale census?)" on every cycle batch is non-gating; the cycle continues. +Research: none new +Next task needs: TYPE-NOT-CANONICAL residue (~250k P sites fleet-wide) dominates the fleet-wide P/X clause; it needs canonical definitions for top struct-map types (header fan-out batches) or a plan ruling assigning it to a later task. `restruct --rung S --check-residue` must stay 0 after any further S batch. +Recommended: critic rules on the fleet-wide clause: either assign TYPE-NOT-CANONICAL residue to T5/a new canonical-types task, or accept it as ledgered residual per the T3 binding; then mark T4 done. +Verified: PY tools/type_census.py --check-casts --quiet → rc 1 (raw P=257464 I=51505 X=13790 M=15130; unbacked 0; lying 229) · make clean && make extract-all JOBS=16 && make check-all JOBS=16 → extract-all 217/217 + main, check-all 218 passed 0 failed (.run/logs/t4_verify.log) · check-structs rc 0 · check-residue uncovered 0 for md_*, main, src/shared/*, ov_* +Full log: phase-ends/current/logs/T4.md