fix(checker): require section coverage and live assembly inventory #1351

Merged
coah80 merged 1 commits from agent/fix/strict-completion-sections into main 2026-10-09 17:57:17 +00:00
coah80 commented 2026-10-09 17:55:48 +00:00 (Migrated from github.com)

Summary

  • Reject missing/invalid/duplicate report sections, require exact data coverage and sufficient code-section coverage using objdiff's actual schema.
  • Preserve legitimate ignored/deduplicated function accounting: code sections can exceed counted function bytes; no unit-specific exceptions.
  • Run check_asm_inventory.py only in the manually requested require_complete workflow path, after the report+DOL gate. Normal progress builds remain unchanged.

Verification

Rebased on c3dd1c08c0 and independently reviewed.

  • All 35 guards pass (23 existing + 12 new), no skips.
  • Each of 2,676 actual section records was deleted individually in memory; every deletion is rejected.
  • Emptying all section arrays yields 1,695 coverage failures.
  • Fresh current report and original-hash DOL pass DECOMPLETE_OK.
  • Strict combined gate correctly fails on the four remaining retained assembly placeholders. This PR does not hide or reclassify them.
  • No source/compiler/build-input changes; current 100% binary metrics preserved.

Evidence: tools/decomp-assist/completion-sections-attempts.md. Structural checks cannot authenticate deliberately forged sizes; report generation and the mandatory DOL hash remain required.

Note

Require section coverage in check_decomp_complete and add assembly inventory gate

  • Adds check_sections to check_decomp_complete.py. It validates unit section lists: names, duplicates, sizes, and match percentages. Code section bytes must cover total_code; data section bytes must equal total_data exactly.
  • check_report now calls this validator for every unit, replacing the old inline section checks.
  • The strict completion gate in build.yml now also runs tools/check_asm_inventory.py. Ordinary push and pull-request builds are unchanged.
  • Updates AGENTS.md completion instructions and adds tests in test_workflow_guards.py.
  • Behavioral Change: reports with missing, truncated, or excess sections now fail the completion check; deleted code or data sections also fail.

Macroscope summarized c19151d.

## Summary - Reject missing/invalid/duplicate report sections, require exact data coverage and sufficient code-section coverage using objdiff's actual schema. - Preserve legitimate ignored/deduplicated function accounting: code sections can exceed counted function bytes; no unit-specific exceptions. - Run check_asm_inventory.py only in the manually requested require_complete workflow path, after the report+DOL gate. Normal progress builds remain unchanged. ## Verification Rebased on c3dd1c08c04a38975b63dded77a7aef6fce385f3 and independently reviewed. - All 35 guards pass (23 existing + 12 new), no skips. - Each of 2,676 actual section records was deleted individually in memory; every deletion is rejected. - Emptying all section arrays yields 1,695 coverage failures. - Fresh current report and original-hash DOL pass DECOMPLETE_OK. - Strict combined gate correctly fails on the four remaining retained assembly placeholders. This PR does not hide or reclassify them. - No source/compiler/build-input changes; current 100% binary metrics preserved. Evidence: tools/decomp-assist/completion-sections-attempts.md. Structural checks cannot authenticate deliberately forged sizes; report generation and the mandatory DOL hash remain required. <!-- Macroscope's pull request summary starts here --> <!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. --> <!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. --> > [!NOTE] > ### Require section coverage in `check_decomp_complete` and add assembly inventory gate > - Adds `check_sections` to [check_decomp_complete.py](https://github.com/coah80/wii-ipl/pull/1351/files#diff-40b9b0f9d80df58a34763b21558dfb2fa7a17b758a948d7568b8b9715472a3f7). It validates unit section lists: names, duplicates, sizes, and match percentages. Code section bytes must cover `total_code`; data section bytes must equal `total_data` exactly. > - `check_report` now calls this validator for every unit, replacing the old inline section checks. > - The strict completion gate in [build.yml](https://github.com/coah80/wii-ipl/pull/1351/files#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721) now also runs `tools/check_asm_inventory.py`. Ordinary push and pull-request builds are unchanged. > - Updates [AGENTS.md](https://github.com/coah80/wii-ipl/pull/1351/files#diff-a54ff182c7e8acf56acfd6e4b9c3ff41e2c41a31c9b211b2deb9df75d9a478f9) completion instructions and adds tests in [test_workflow_guards.py](https://github.com/coah80/wii-ipl/pull/1351/files#diff-fd66ff7903cc79d67f9bf73cf1ead706756741fdfb286c8e86d25c635f55574d). > - Behavioral Change: reports with missing, truncated, or excess sections now fail the completion check; deleted code or data sections also fail. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized c19151d.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-09 17:57:14 +00:00 (Migrated from github.com)

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.
Sign in to join this conversation.