Files
BFM-decomp/phase-ends/current/logs/T3.md
T

5.3 KiB
Raw Blame History

T3 log — head-type layouts and canonical files

Attempts: 1 (expert-fable, handed off at context threshold; progress archived to logs/T3.progress1.md), 2 (expert-fable, this log).

Timeline

  • a1: read plan Context/Interfaces/Rationale, task T3, tasks/T1.md, tasks/T2.md. Census refreshed with --sites into .run/P37/census (restruct's hard-coded input dir) at 42a9cd7f5 (census_t3 → .run/logs/census_t3.log): the two heads separate again (Unkstruct_800B5CB8 107,580 sites/11,184 bodies; Unkstruct_80126B58 65,397/17,047; 18,739 types). The P37 T4e census had them merged as Unkstruct_800D3888 on a stale body_base_type.json.
  • a1: hypothesis "Unkstruct_80078E00 exists in the preview/map" rejected: preview ov.h holds 800B5CB8, 80126B58, 8018E71C, dac960ce, 0caecd54, f8ed2b9f; no cluster at 0x80078E00; D_80078E00 0 occurrences in src. .run/P38/T3/player_vs_heads.py: of 9 scalar player globals, 1 agrees with 80126B58, 0 with 800B5CB8; both heads have s32 at +0xB4 where hp_current is u16. So the player block is not an instance of either head; the code's record is Blk98_80029274 (0x98 at 0x80078E78, src/800.c) / Blk80078E78 (resident_jr_800D00E4.c:546) / u8 D_80078E78[] in 880 TUs.
  • c1 (coder-opus55, done, 5aaa25154, logs/T3.c1.md): tools/head_types.py — max-site split, weighted-interval DP over layout ∪ conflicts, --header, --decisions, --selftest; include/struct_types.h generated block for both heads; docs/struct-map-decisions.md skeleton + generated per-offset block; include/common.h:64 includes struct_types.h; CANON_HEADERS = (engine_types.h, include/struct_types.h). audit-types 26 (0 in the new file), selftests 24/54, R22 green.
  • a1: hypothesis "a type in include/ is visible to restruct" rejected: delever.py:663-674 resolved includes relative-only and never scanned include/ (retriever-code answer, no report).
  • c2 (coder-opus55, blocked on two pre-existing --try-file crashes, committed e4341ee11, logs/T3.c2.md): tools/delever.py includers() follows -Iinclude (relative first, else include/x; scans include/*.h; cache key "I|"); hand-written Unkstruct_80078E78 (0x98, evidence-named fields) in struct_types.h; src/800.c:8 typedef Unkstruct_80078E78 Blk98_80029274; (byte-identical, kept); decisions doc's three hand sections filled. Hypothesis "the crashes come from the new include graph" rejected: reproduced with HEAD~1's graph. R22 green.
  • c3 (coder-opus55, done, 1a35655ab, logs/T3.c3.md): restruct pass_hint (:522-531 skips non-str rows; classify_residual emits aligned mnemonic rows as pairs, regs as regs); drop_overlaps (:698-710) makes nested-base overlapping edits KEPT(overlap-edit) instead of Refuse:; +2 selftests (56); snapshot-baseline at e4341ee11 (7,428 objects, 218/218) + calibrate 146/146 identical, positive control DIFFERS; --selftest --real 61/61 OK; linked-control OK.
  • a1 exemplar proofs, all final IDENTICAL, 0 TYPE-NOT-VISIBLE (.run/logs/t3c3_try_1..9.log): 800B5CB8 → ov_SC06_032_jr_80182890 (MEMBERS 123, S2 7), ov_SC02_027_jr_8017D898 (193/4), md_SC07_004 (220/17), md_SC07_003 (82/2), src/800.c main (108/10); 80126B58 → ov_MAIN_012_jr_8015A3C8 (104/5), ov_SC03_107_jr_8015A3C8 (102/4), md_MAIN_046 (24/3), md_MAIN_036 (15/2). 80126B58 has 0 main bodies in the map (.run/P38/T3/bodies_by_space.py), so no main exemplar exists for it.
  • a1: verify launched detached as t3_verify at 1a35655ab; handoff.
  • a2: t3_verify had exited 1 at its first link: restruct --selftest --real: 58/59 OK — FAIL the oracle's calibration is current: calibrated at e4341ee11, HEAD is 1a35655ab (the c3 commit moved HEAD after the calibration). Archived the progress file (54c26d08a).
  • a2: t3_verify2 (.run/logs/t3_verify2.log): R22 green + delever_oracle --snapshot-baseline at 54c26d08a; its bare --calibrate refused ("no recipes for []", R43). t3_verify3 (.run/logs/t3_verify3.log): --calibrate ov_SC04_011 ov_SC03_015 md_SC07_004 main -j 16 146/146 identical, then the verify command verbatim: rc 0, selftest --real 61/61, extract-all 217/0, check-all 218/0.

Retriever questions

  • retriever-code ×3 in a1 (delever include resolution; restruct try-file crash sites; player-block symbols). Answers under 300 lines; no reports written.

Commands and logs

  • .run/logs/census_t3.log, .run/logs/t3c3_try_1..9.log, .run/logs/t3_verify.log (red, stale calibration), .run/logs/t3_verify2.log (the verify of record).
  • Scratch: .run/P38/T3/{map_dump.py,bodies_by_space.py,player_vs_heads.py,player_use_widths.py}, offsets dumps D_80126B58.offsets.txt, D_800B5CB8.offsets.txt.

Gotchas

  • restruct --selftest --real compares the calibration's HEAD to the current HEAD: every commit, even a docs-only one, turns it red until delever_oracle --snapshot-baseline && --calibrate re-run on a green tree. The task's own log/summary commit therefore always post-dates the verify.
  • The expert's Bash hook denies reading tool sources even by range; code facts via retriever-code.
  • restruct reads .run/P37/census/* (hard-coded), not .run/P38/census; cluster names change when membership changes (lowest AT global).
  • --try-file on the 9 exemplars takes 1.5–125 s each; run through run.sh.
  • commit_task.sh refuses gitignored-but-tracked paths; git add -f them first.
  • A /* 0xNN */ field comment nested inside another C comment kills the build (c1).