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

3.0 KiB

T5 — long tail: one definition per type (partial; question)

Status: question | expert: expert-opus55 | ctx-at-completion: n/a | commit: see COMMIT | coder runs: c1 opus55 done (907138d26), c2 opus55 done (bc9c5bebb, 81fc2be28, e5ba08739, 6f01332bc) Done: 1308 types lifted to engine_types.h; pad_names 0; variants 0; dead 142→134 listed residuals; dup_classes 198 and outside_canon 3680 not reachable under the current gate definitions without violating the done-when's own "twins apart" clause. Files:

  • tools/lift_types.py — file-scope only; refuse struct defs declaring an object; skip common.h scalars; skip names in overlay-local .h
  • src/shared/engine_types.h — lift block (1308), 72 pad renames, 314 dead defs removed, tag/typedef splits
  • src/ov_/.c, src/md_, src/800.c (~690 files) — stripped identical copies; variant renames <Name>_<suffix>
  • docs/struct-map.md — regenerated Decisions:
  • binding: a divergent-layout local of a VARIANT name is renamed <Name>_<suffix> (TU suffix); the canon/most-used layout keeps the name.
  • A struct tag and a typedef of the same name with different layouts are split N_tag/N_td (census counts the two C namespaces as one name). Deviations:
  • Stopped before dup_classes/outside_canon/PsyQ/800B5CB8 work: gate definitions conflict with the done-when (see Findings). Findings:
  • Counts now: dup_classes=198 outside_canon=3680 dead=134 variants=0 pad_names=0 parse_error_decls=1106 controls=4/4 (from 205/5917/142/40/25).
  • dup_classes has no evidence/allowlist input: opaque layout twins (tier 2) always count, so 0 means one name per layout, contrary to G62/S106 and the done-when's "left apart and listed".
  • outside_canon counts every body incl. 1774 block-scope stack frames and fn-header/md/main bodies; lift_types reaches only ov file-scope.
  • dead residual 134 (.run/P38/t5/c2_residual.txt): 114 used as member/alias by live canon defs (census ignores intra-canon uses), 12 invisible uses (D_*, macros), 6 single-char names (ident filter len>1, type_census.py:603), actor4c self-ref, Unkstruct_80126B58 (generated).
  • lift exclusions (156) with cause: .run/P38/t5/c1_excluded.txt. Gotchas:
  • generalizable: a "dead name" metric that skips references inside the canonical header set flags every member-only type as dead; deleting them breaks the build.
  • harness: commit_task.sh stages pending logs/ of other coder runs (T5.c1 log rode in bc9c5bebb).
  • harness: lift_types --candidates output changed after c1; .run/P38/t5_lift_all.txt is stale. Next task needs: plan decision on the gate (see RECOMMENDED); then PsyQ SDK names, 800B5CB8 split/union call (T4 kept units), twins list, block-scope/md/main relocation tool. Verified: make clean && make extract-all JOBS=16 && make check-all JOBS=16 → extract-all 217 extracted 0 failed, check-all 218 passed 0 failed, rc 0 at 5bd5236ab (.run/logs/t5verify.log); census --check-structs FAIL dup_classes=198 outside_canon=3680 dead=134 variants=0 pad_names=0 (.run/logs/t5c2census2.log, same src tree) Full log: phase-ends/current/logs/T5.md