Files
BFM-decomp/phase-ends/current/tasks/T5.md
T

3.4 KiB

T5 — globals and absolute addresses to declared symbols (forms I and M, residual non-struct bases)

Status: done | expert: expert-opus55 (attempt 2) | ctx-at-completion: n/a | commit: see COMMIT | coder runs: c1 done (ef4507badb), c2 done (f476751f9f), c3 pilot+sweep (orphaned at handoff; cycles 1134b7a127, S2-S18), c4 blocked (bfc3f0cb41, cycle already running), c5 done (2407750392) Done: forms I and M at 0 uncovered: ~1676 global/gaddr sites drawn to typed externs (R2 extern array mostly) by the recipe ladder; every refused site and every non-global I/M base is a ledger RESIDUAL with a specific cause; R22 218/218. progress: readability snapshot 'P3.39 T5: forms I/M closed' (raw I 49831, M 15129), timeline and README regenerated in the T5 commit. Files:

  • src/**/.c, src/shared/.h — recipe-drawn extern declarations (cycle commits t5_imS1..S23)
  • .run/P37/restruct/ledger.jsonl — per-site RESIDUAL(R-why) and t5_res_* residue rows (force-added)
  • tools/restruct.py, tools/restruct_cycle.sh — --rung S --recipes --forms I,M, RECIPES/FORMS pass-through (c2)
  • docs/ops/p39-t5-2026-10-02-restruct-im-recipes.md — ops note (c2)
  • README.md, docs/progress*.{json,md}, docs/readability*, docs/story-timeline.* — D1 progress regeneration Decisions:
  • binding: I/M global sites close through restruct --rung S --recipes --forms I,M first; RESIDUAL only with the refusing recipe as cause (R2-NO-SCALAR-EXTERN, R2-WIDTH, R2-DIFFERS, R2-REKEYS, R2-COMPILE-ERROR, R2-HEADER-EXTERN, R3-NOT-CONTIGUOUS, R3-COMPILE-ERROR); non-global I/M bases close with --residue --forms I,M.
  • Absolute-address clause vacuous: 0 ABS 0x80… literal sites in I/M (c1), so no symbol-file edits. Deviations:
  • shared headers were planned residue-only; their 529 global-base sites need the ladder with --headers (HEADERS=1 cycles S20-S23, 5 drawn) before residue.
  • Attempt 1 handed back while c3's cycle ran; c3's orphaned agent kept sweeping (ov_, md_, main); c4 refused to race it; c5 waited and finished. Findings:
  • Ladder yield is low (~1676 drawn vs ~48k residual sites by R cause); the biggest refusals are R2-NO-SCALAR-EXTERN 18,945 and R2-WIDTH 10,186. Those are the backlog for any later typed-global work.
  • 1 GADDR residual remains: src/800_b_2.c:4639 gaddr:D_800A4F17 at file scope (ladder needs a function).
  • readability_progress.py reads .run/P39/census/type_census.json; refresh it with type_census.py --out-dir .run/P39/census before --snapshot "<label>". Gotchas:
  • harness: an orphaned coder's agent survives the expert hand-back and keeps launching cycles; a new coder's pgrep can pass and then race it. A respawn should wait for the orphan's cycles and treat a dirty-tree refusal (exit 3) as the signal.
  • generalizable: restruct --plan --rung S skips .h TUs unless --headers is passed; global sites in headers need a HEADERS=1 cycle.
  • workflow: D1 snapshot = type_census.py --out-dir .run/P39/census → readability_progress.py --snapshot "<label>" → timeline.py → progress.py --readme. Research: none Next task needs: T6 owns lying=229 (the only remaining cause of --check-casts --residue rc 1). T11 catch-up can start from snapshot 'P3.39 T5: forms I/M closed'. Verified: PY tools/type_census.py --check-casts --residue --quiet → uncovered P=0 I=0 X=0 M=0, unbacked 0, rc 1 on lying=229 only (T6); make clean && make extract-all JOBS=16 && make check-all JOBS=16 → check-all: 218 passed, 0 failed of 218 Full log: phase-ends/current/logs/T5.md