Skip to content

Avoid invalid repair compiles and improve reuse discovery - #138

Merged
RetroGameDeveloper merged 2 commits into
mainfrom
feat/repair-preflight-and-reuse-traversal
Oct 28, 2026
Merged

RetroGameDeveloper merged 2 commits into
mainfrom
feat/repair-preflight-and-reuse-traversal

Conversation

@RetroGameDeveloper

@RetroGameDeveloper RetroGameDeveloper commented Oct 28, 2026 •

Copy link
Copy Markdown

Summary

  • Add cached, advisory warning preflight for saved ROM drafts using known GCC toolchains. Warnings appear in agent briefs and deep-search output; diagnostic objects never enter the judge, and project flags remain unchanged.
  • Skip generated direct calls that contradict a fixed, unambiguous plain C prototype. Unknown declarations, macros/includes, indirect calls, varargs and C++ remain with the compiler. Shared local repair families work in ROM and imported projects; ROM permuter/reuse paths also check the actual context header.
  • Resume template/address/SDK discovery using its own persistent cursor, batch names and cached misses, and reserve half the remaining wall time for wider discovery. Wider discovery now shortlists small donor metadata once per pass and keeps at most 1,024 donor bodies instead of repeatedly loading large source/target blobs.
  • Keep deep search's compile allowance separate from invalid-call skips. This branch includes merged Add cancellable deep permuter searches for one function #137's single-function deep permuter.

Validation

  • Ruff passed. Full suite with optional toolchains unavailable (CI-style): 1,824 passed, 373 skipped. Real installed-toolchain private checks are listed below.
  • A private N64 project replay examined 602 generated candidates across 51 near misses: 31 were filtered, and all 31 were independently confirmed to fail in the ordinary pinned compiler (zero false rejections in this sample).
  • Diagnostic preflight found the saved draft's uninitialized pointer; its repeated unchanged check used cached evidence.
  • Recompiled and linked the four previously recovered functions: all remain exact byte matches.
  • Two bounded four-compile deep searches respected their limits, reused cached misses, and released their claims.
  • Profiled private reuse discovery; repeated donor/blob queries were a substantial cost. The new cache is per pass, so subsequent passes see changed donor code. No additional exact matches were produced in these short replays.

No game data or private evidence is included. No AI helpers were started. Imported projects keep their ordinary build diagnostics; extra diagnostic builds for imported projects and non-GCC backends remain documented follow-up work.

@github-actions github-actions Bot added the enhancement New feature or request label Oct 28, 2026
@RetroGameDeveloper
RetroGameDeveloper merged commit 4030a3b into main Oct 28, 2026
6 checks passed
@RetroGameDeveloper
RetroGameDeveloper deleted the feat/repair-preflight-and-reuse-traversal branch October 28, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant