Retry the exact failed compile job #1053

Merged
monsterlag merged 1 commit from fix/retry-exact-compile-job into main 2026-11-09 15:15:28 +00:00
monsterlag commented 2026-11-09 08:12:31 +00:00 (Migrated from github.com)

When two compile jobs share a source but have different flags and outputs, the retry pass currently finds the first job with that source. If A succeeds and B fails, it retries cached A and can announce recovery/proceed to linking while B's object is still missing; the linker may then fail. Two failures can likewise retry A twice.

Keep each completed future paired with its original job, retain that complete job on failure, and retry it once serially. compile_one's return API, memory/worker/cache policies, progress records and linking stay unchanged.

Refs #1029 as related investigation context; this is separate from the memory-reservation lease fix.

Validation:

  • Five authored cases execute the actual AST-extracted compile_one and compile/retry coordinator using a real ThreadPoolExecutor and fake compiler children. They cover different outputs/flags for one source, B's successful retry, persistent B failure returning1 before linking, both jobs failing, successful jobs without retries, and existing counted progress.
  • Unmodified main29571064 fails four cases and passes the success control. The preserved baseline reports recovery with B.o absent; the fixed source passes all five on Windows and WSL Python.
  • Windows strict automatic runner passes the new check and the existing compiler-failure check; git diff --check passes.

No native compiler, game, memory stress or full build/link. The fixture disables the memory gate and spies on cache publication/ETA helpers to isolate job selection. Existing stamp-file ResourceWarning diagnostics remain visible and are not suppressed.

All hosted checks on 502544b0 pass: Linux source regressions, Windows source regressions, Windows Vulkan renderer, Builder packaging, AppImage packaging, SPIR-V checks and workflow lint. Release publication was intentionally skipped.

Release integration: the official v2.0.8-rc.2 and rc.3 history contains this fix through merge commit 2c5c9e6. GitHub's PR metadata remains open while the default main branch is at a different revision; this note records released-source incorporation separately from a formal PR merge.

When two compile jobs share a source but have different flags and outputs, the retry pass currently finds the first job with that source. If A succeeds and B fails, it retries cached A and can announce recovery/proceed to linking while B's object is still missing; the linker may then fail. Two failures can likewise retry A twice. Keep each completed future paired with its original job, retain that complete job on failure, and retry it once serially. `compile_one`'s return API, memory/worker/cache policies, progress records and linking stay unchanged. Refs #1029 as related investigation context; this is separate from the memory-reservation lease fix. Validation: - Five authored cases execute the actual AST-extracted `compile_one` and compile/retry coordinator using a real `ThreadPoolExecutor` and fake compiler children. They cover different outputs/flags for one source, B's successful retry, persistent B failure returning1 before linking, both jobs failing, successful jobs without retries, and existing counted progress. - Unmodified main29571064 fails four cases and passes the success control. The preserved baseline reports recovery with B.o absent; the fixed source passes all five on Windows and WSL Python. - Windows strict automatic runner passes the new check and the existing compiler-failure check; `git diff --check` passes. No native compiler, game, memory stress or full build/link. The fixture disables the memory gate and spies on cache publication/ETA helpers to isolate job selection. Existing stamp-file `ResourceWarning` diagnostics remain visible and are not suppressed. All hosted checks on `502544b0` pass: [Linux source regressions](https://github.com/NotRexed/Hookshot/actions/runs/42584275577/job/129050210560), [Windows source regressions](https://github.com/NotRexed/Hookshot/actions/runs/42584275577/job/129050210473), [Windows Vulkan renderer](https://github.com/NotRexed/Hookshot/actions/runs/42584275563/job/129050209669), [Builder packaging](https://github.com/NotRexed/Hookshot/actions/runs/42584275563/job/129050210079), [AppImage packaging](https://github.com/NotRexed/Hookshot/actions/runs/42584275601/job/129050210246), SPIR-V checks and workflow lint. Release publication was intentionally skipped. Release integration: the official v2.0.8-rc.2 and rc.3 history contains this fix through merge commit [2c5c9e6](https://git.magicbean.dev/MagicBeanDev/Hookshot/commit/2c5c9e6). GitHub's PR metadata remains open while the default main branch is at a different revision; this note records released-source incorporation separately from a formal PR merge.
Commenting is not possible because the repository is archived.
No description provided.