fix(builder): stop when generated source cleanup fails #1218

Merged
monsterlag merged 1 commit from fix/lift-cleanup-error into main 2026-11-09 18:20:28 +00:00
monsterlag commented 2026-11-09 17:59:13 +00:00 (Migrated from github.com)

A fresh lift now stops if an earlier code_*.c or .c.whole file cannot be removed. The normal builder error names the exact path and OS error. A file that has already disappeared remains harmless; permissions and the cleanup filename scope stay unchanged.

The v2.0.10 cleanup previously ignored every OSError and continued translating, then wrote a fresh lift key that included any surviving obsolete shard. A later compile/link failure removes that key correctly, but a persistent deletion failure can send the next build through the same cycle. Fail before translation and key writing instead.

The regression executes the actual fresh-lift branch from make_game.main, together with the real reporting/key helpers, using tiny authored temporary files and deletion-error doubles. Untouched main 7b009156 produces three intended failures: both obsolete C/whole-file permission cases and another removal error continue into lift/key writing. Five controls already pass. With the change, all eight cases pass on Windows and Linux, and the strict selected automatic runner passes 1/0/0 on both. Assertions are byte-identical between original and fixed runs. The test is discovered automatically; no workflow or runner policy change is needed.

No real access denial, permission change, translator, compiler, SDK, game or existing generation directory is used. This does not validate full generation/link output or provide #918's completeness/concurrent-work protection. It follows the recovery work prompted by #1197 (@anonymm7711) and #1176 (@jamtastik819); it does not establish that a failed removal caused either report or claim to resolve all their failure modes. All eight hosted validation checks passed on d254e6f: both Windows/Linux source jobs (zero annotations), Windows Builder/setup and renderer, Linux AppImage, SPIR-V, F2I and workflow lint. The two release-publication jobs were skipped for the PR as expected. See the source checks, Windows builds and AppImage build.

A fresh lift now stops if an earlier `code_*.c` or `.c.whole` file cannot be removed. The normal builder error names the exact path and OS error. A file that has already disappeared remains harmless; permissions and the cleanup filename scope stay unchanged. The v2.0.10 cleanup previously ignored every `OSError` and continued translating, then wrote a fresh lift key that included any surviving obsolete shard. A later compile/link failure removes that key correctly, but a persistent deletion failure can send the next build through the same cycle. Fail before translation and key writing instead. The regression executes the actual fresh-lift branch from `make_game.main`, together with the real reporting/key helpers, using tiny authored temporary files and deletion-error doubles. Untouched main `7b009156` produces three intended failures: both obsolete C/whole-file permission cases and another removal error continue into lift/key writing. Five controls already pass. With the change, all eight cases pass on Windows and Linux, and the strict selected automatic runner passes 1/0/0 on both. Assertions are byte-identical between original and fixed runs. The test is discovered automatically; no workflow or runner policy change is needed. No real access denial, permission change, translator, compiler, SDK, game or existing generation directory is used. This does not validate full generation/link output or provide #918's completeness/concurrent-work protection. It follows the recovery work prompted by [#1197](https://git.magicbean.dev/MagicBeanDev/Hookshot/issues/1197) (@anonymm7711) and [#1176](https://git.magicbean.dev/MagicBeanDev/Hookshot/issues/1176) (@jamtastik819); it does not establish that a failed removal caused either report or claim to resolve all their failure modes. All eight hosted validation checks passed on `d254e6f`: both Windows/Linux source jobs (zero annotations), Windows Builder/setup and renderer, Linux AppImage, SPIR-V, F2I and workflow lint. The two release-publication jobs were skipped for the PR as expected. See the [source checks](https://github.com/NotRexed/Hookshot/actions/runs/42669898362), [Windows builds](https://github.com/NotRexed/Hookshot/actions/runs/42669898912) and [AppImage build](https://github.com/NotRexed/Hookshot/actions/runs/42669898407).
Commenting is not possible because the repository is archived.
No description provided.