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

2.4 KiB

T2 — --check-structs instrument and actor-struct fix

Status: done | expert: expert-opus55 | ctx-at-completion: n/a | commit: see COMMIT | coder runs: c1 opus55 done (3ac7abee7) Done: type_census.py --check-structs gates the struct milestone's counts; on the T1 tree it FAILS with T1's baseline; actor-struct doc fixed so controls show 0 doc-disputed. Files:

  • tools/type_census.py — --check-structs mode, counts/controls/non-gating lines, 3 new selftests (24 total); CANON_HEADERS the single canonical list
  • tools/restruct.py — ledger_latest (the one latest-row-per-unit function; ledger_index, settled-set, --redraw use it); audit_type_violations (the --audit-types rule, imported by census)
  • docs/actor-struct.md — +0x108/+0x10C s16 → s32
  • docs/struct-map.md — regenerated stamp Decisions:
  • binding: every "latest ledger verdict" reader goes through restruct.ledger_latest; no second filter.
  • pad_names gates all restruct --audit-types violations; today all 26 are pad-name kind (audit_other=0 reported non-gating to expose any other kind). Deviations:
  • The census control's doc-disputed list was hard-coded in type_census, not parsed from the doc; D_80078F08/F0C moved into PLAYER_BLOCK at width 4 alongside the doc edit.
  • tu_conflict=0: the restruct ledger has no TU-CONFLICT verdicts; P37's 45 TU-CONFLICT rows live elsewhere (census/logs). Non-gating, left for T6. Findings:
  • Baseline counts: dup_classes=206 outside_canon=6076 dead=141 variants=40 pad_names=26 parse_error_decls=1106 controls=4/4; non-gating conflicting_types=160 tu_conflict=0 types_floor_lying=1796.
  • parse_error_decls 1,106 latest-row vs 1,107 all-rows; the P37 "1,120" predates latest-row counting. conflicting_types 160 latest-row vs P37's "417".
  • --check output identical before/after. Gotchas:
  • harness: the expert's Bash hook denies reading tool source even by line range (sed); code facts must come via coder or retriever-code.
  • generalizable: a census "control" that compares against a doc may be a hard-coded list, not a parse; fixing the doc alone does not move it. Next task needs: --check-structs is the phase gate; baseline above; census at .run/P38/census. Verified: .venv/bin/python tools/type_census.py --selftest && .venv/bin/python tools/type_census.py --out-dir .run/P38/census --check-structs; test $? -eq 1 → selftest OK, rc=1 with the baseline counts, doc_disputed=0 (.run/logs/t2verify.log) Full log: phase-ends/current/logs/T2.md