mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-10-05 08:57:59 -04:00
2.0 KiB
2.0 KiB
T2.c2 — lever_census.py --strict --residue (reading A)
Changed
- tools/lever_census.py:1109-1148:
RESIDUE_COLS,load_residue(path)(skips#, blank, header row),strict_failures(sites, pt, gte_header, residue_rows) -> (fails, residue_hit, counts); the P37 S106 comment moved into its docstring. counts = asm, direct_gte, ab, pt, residue_unused (list of rows). - :1194-1209: selftest controls (i)-(iv) on hand-built site dicts.
- :1219-1220:
--residue PATHflag. - :1249-1265: main --strict calls strict_failures; line gains
, residue <n>, residue-unused <n>; prints first 10 residue-unused rows; prints first 10 fails; rc 1 iff fails non-empty. - config/lever_residue.tsv:
#contract line + header row. - .run/P36/census/cache/walk_cache.json deleted.
Decisions
- asm-macro rows: mdefs_all is local to run_census (not returned, not in summary beyond the count) → not reachable without changing run_census's return. pt stays unmatched: when pt>0, fails gets one synthetic entry
(per-TU asm macro definitions)kindasm-macro; anasm-macroresidue row matches nothing (shows as residue-unused). - --strict is only evaluated inside
if a.check(unchanged); the brief's command lacks --check, so runs used--check --strict.
Verified
/usr/bin/python3 tools/lever_census.py --selftest→selftest: OK — 24 sites, 2 defs, 2 asm macros, rc 0.--helplists--residue PATH.bash tools/run.sh t2c2_strict -- … --check --strict --residue config/lever_residue.tsv --no-cache -j 16→lever_census --check --strict: pins 1868, asm 1411, gte-levers 450, direct GTE statements in bodies 6717, per-TU asm macro definitions 314, volatile-needed 1589, register-needed 50, residue 0, residue-unused 0 — FAIL; headline3,729 sites … UNMARKED 0; controls OK; rc 1 (rerun with cache, --quiet).
Notes for the expert
- Tracked .run/P36/census/lever_census.{json,txt} regenerated with dict-order/elapsed noise only; left uncommitted (outside touch list).
make kit-corpusnot run (duration unknown); expert runs it.