mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-10-06 17:11:04 -04:00
3.0 KiB
3.0 KiB
T3.c7 — rung S residue rows (ledger only)
Changed
tools/restruct.py:16-17docstring usage lines.tools/restruct.py:3416-3510new:RESIDUE_FILE_UNIT = "<file-scope>",residue_cause,residue_sites,residue_rows,residue(--residue),check_residue(--check-residue).tools/restruct.py:5015-5033selftest: 2ok(...)cases (one per mode) over fixture.run/P37/restruct/selftest/residue_sites.jsonl.tools/restruct.py:5086-5087, 5119-5124argparse--residue(rung S only),--check-residue..run/P37/restruct/ledger.jsonl(tracked): +34131 appended rows, labelt3_resid; no existing row touched (diff is pure append; backup.run/T3/ledger.pre_c7.jsonl).
Design
- residue set = census P/X sites (
sites.jsonl) in TUs matching--only(defaultov_*,matches_only) whose("S", tu, unit)has noledger_latestrow; unit =fnor<file-scope>(site fn null). - row: keys as rung-S rows;
fnnull +addrnull for<file-scope>; nhash_before == nhash_after == current body nhash (body_nhash); for<file-scope>the norm hash of the whole masked file; None if body gone (0 such rows in t3_resid). - site entry {form, line, base
bclass:base, off, type, verdictRESIDUAL(<cause>), cause}. cause order: FILE-SCOPE (fn null) → NO-TYPE-IN-MAP (type null) → TYPE-NOT-CANONICAL → TYPE-NOT-VISIBLE →site_class(s, None, typed=True)(MISALIGNED / NO-EDIT). - body verdict: the single shared cause if in
S_NO_EDIT_VERDICTS, else RESIDUAL. bases carry the cause asstatus→s_judgedFalse → not inledger_indexdone,s_finishedunaffected (selftest asserts both). - rows sorted (tu, unit); sites sorted (line, pos).
Results (t3_resid)
- 34131 rows · 200598 sites. causes: TYPE-NOT-CANONICAL 197600, NO-TYPE-IN-MAP 2349, NO-EDIT 482, FILE-SCOPE 167. Body verdicts: TYPE-NOT-CANONICAL 32521, RESIDUAL 1610. No TYPE-NOT-VISIBLE, no MISALIGNED.
- NO-EDIT 482: sites whose census type is canonical + visible but plan_S never drew the body (bbt's base type differs from the site's type, presumably); worth an expert look.
Commands
restruct.py --selftest→ 95/95 OK.--rung S --check-residue --only "ov_*"before:uncovered 200598 sites / 34131 bodiesexit 1; after:uncovered 0 sites / 0 bodiesexit 0.--rung S --residue --only "ov_*" --label t3_resid→ exit 0, 94 s.--check-ledger→ 141789 MEMBER sites, 0 violations, exit 0..run/T3/cover.py→UNCOVERED 0after a scratch fix (below);git status --short src includeempty.
Notes
- deviation: scratch
.run/T3/cover.pykeyed file-scope sites as(tu, None), which no ledger unit can match → it reported UNCOVERED 167 (exactly the FILE-SCOPE sites). Patched line 14 tos['fn'] or '<file-scope>'(original kept at.run/T3/cover.pre_c7.py). - the ledger is tracked but under an ignore rule (
git check-ignore --no-index): commit_task.sh refuses it (git addof an ignored path) → not committed; the appended rows sit in the working tree (backup of the pre-run file at.run/T3/ledger.pre_c7.jsonl).