mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-10-04 16:28:11 -04:00
4.0 KiB
4.0 KiB
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 mainselector (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 addon passed paths, failing on the gitignored ledger;git add -fit, 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-residuemust 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