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

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 PATH flag.
  • :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) kind asm-macro; an asm-macro residue 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.
  • --help lists --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; headline 3,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-corpus not run (duration unknown); expert runs it.