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

4.6 KiB

T7.1 — GTE to one spelling (predicate read as the census documents it)

Status: done | expert: expert-opus55 | ctx-at-completion: n/a | commit: see COMMIT | coder runs: c1 opus55 done (55ba77f9d8), c2 opus55 partial (8c3937da22, context threshold before R22; expert ran R22), c3 opus55 done (e672acfa6d, 6d61877b30, 72e4c48c89) Done: direct GTE statements in bodies 492 -> 0 (inline 477 + via-per-TU 15 respelled to include/gte_inline.h calls, oracle IDENTICAL per file, R22 218/218); per-TU GTE macro defs 150 -> 0; variants live once each in the generated header under // !FAKE: lines; gte-levers 434 untouched and marked. progress: readability snapshot 'P3.39 T7.1: GTE to one spelling (direct GTE 492 -> 0, per-TU gte defs 150 -> 0)'; timeline and README regenerated in the T7.1 commit. Files:

  • tools/lever_census.py — strict direct GTE = gte/gte-unsigned sites not via a gte_inline.h macro (docstring reading); split (via-header, via-per-TU, inline); per-TU defs by kind; selftest controls v-vii (c1)
  • tools/gte_consolidate.py — inventory signs every inline statement; canonical table gains inline-only and per-TU-only signatures; render_header emits _m/_v<sha4> variants and aliases once each after their canonical with // !FAKE: … pass: …; instrument: … (R113); file_edits deletes per-TU defs held by the header; --keep-levers; selftest controls (c2, c3)
  • include/gte_inline.h — regenerated by --header: 51 -> 82 #defines (68 canonical + 11 variants + 2 aliases + guard)
  • src/** — 435 files (c3b1 40, c3b2 395): 150 per-TU defs deleted, 73 use renames, 477 inline statements -> macro calls
  • decomp-architect/corpus/tools/P10/, .run/P36/{gte,delever,census}/ (force-added) — regenerated
  • docs/ops/p39-t71-2026-10-02-gte-one-spelling.md, docs/ops/INDEX.md — H7 note
  • README.md, docs/progress.json, docs/readability*, docs/story-timeline.*, docs/struct-map.md — D1 regeneration Decisions:
  • Variants are kept as header-level definitions (none replaced by a canonical: each differs in clobbers, a scheduling steer); per-TU variant names mapping to one signature merged (gte_rt_m -> gte_rtv0tr_m, gte_mvmva0 alias of gte_rtv0tr_m, gte_rt -> gte_rt_alt2).
  • binding: GTE asm in a body is spelled only as a call of an include/gte_inline.h macro, except gte-lever statements awaiting T8; new spellings enter the header through gte_consolidate --inventory && --header, never by hand.
  • Call vs inline left per site (§195-J): only asm-text spelling changed, no call/inline conversion. Deviations:
  • c2 stopped at context threshold before R22; expert ran R22 on 8c3937da22 (green).
  • --keep-levers added (tool respelled gte-lever direct statements by default; plan leaves them to T8).
  • Stale comment text in 55 files: /* GTE VARIANT gte_rt_m … */ and // !FAKE: gte via gte_rt_m while the call reads gte_rtv0tr_m (e.g. src/ov_SC06_008/ov_SC06_008_jr_801380E0.c:1006,1028); comment-only, left for T8. Findings:
  • Counts before -> after (lever_census strict): direct GTE 6733 (unfiltered) / 492 filtered (via-header 6241, via-per-TU 15, inline 477) -> 0 (via-header 6735, via-per-TU 0, inline 0); per-TU asm defs 314 {gte 150, launder 154, instruction 9, barrier 1} -> 164 {launder 154, instruction 9, barrier 1}; GTE variants per TU 64 -> 0; gte-levers 434 -> 434 (marked 434); unsigned 270 -> 0.
  • T8's share: 164 non-GTE per-TU defs (launder 154, instruction 9, barrier 1) and 434 gte-lever sites (346 direct, 88 via a header variant).
  • Strict overall still FAIL only on pins/non-GTE asm (T8 scope); --check rc 0. Gotchas:
  • generalizable: a census's "unsigned" class can mean "the tool's signature cache never saw it", not a semantic class; refresh the inventory before planning to respell such sites.
  • generalizable: a consolidation tool that respells "everything it can" will also respell the sites another task owns; give it an explicit keep filter before a fleet apply.
  • harness: readability_progress --snapshot refuses a stale .run/P39/census/type_census.json; run type_census.py -j 16 --out-dir .run/P39/census first. Research: none (one retriever-code answer inline) Next task needs: T8: 434 gte-lever sites + 164 per-TU launder/instruction/barrier defs + the 55 stale gte_rt_m comments; restruct/delever calibration is red after these commits until recalibrated. Verified: PY tools/gte_consolidate.py --selftest && PY tools/lever_census.py --selftest && PY tools/lever_census.py --check → OK, OK, 3,711 marked 0 UNMARKED rc 0 (.run/logs/t71_verify_a.log); make clean && make extract-all JOBS=16 && make check-all JOBS=16 → 218 passed 0 failed, exit 0 (.run/logs/t71_verify_r22.log) Full log: phase-ends/current/logs/T7.1.md