Repository navigation
make_game: keep recovery copies until an install succeeds (RT-INSTALL-KEEP-RECOVERY) - #2792
Conversation
install_runtime() removed every .runtime-staging-* folder before it started, including the folder an IncompleteRollback kept as the only copies of the previous runtime. If the retry also failed, those copies were already gone. Clean the stale folders only after a successful publish, so a failed retry leaves the recovery folder in place. RT-INSTALL-KEEP-RECOVERY.
|
Verified by OreoFR on macOS 27.2.1, Apple M5, head MEASURED
READ IN CODE
ASSUMED
AI-assisted: Claude Code |
|
Independent native Windows check with a real open handle. Tested Both trees returned Windows error 32 and rolled back the first file. With |
|
Merging. Head AI-assisted (Claude Code). |
Claimed in the coordination issue as: RT-INSTALL-KEEP-RECOVERY
What and why
install_runtime()removed every.runtime-staging-*folder in the output folder before it started. A blocked rollback (IncompleteRollback) keeps its staging folder because it holds the only copies of the previous runtime files (<name>.old), so a retry that failed deleted those last copies before it had a chance to use them.The cleanup now runs only after a successful publish. A failed retry leaves the recovery folder in place; the next install that completes removes it.
Tested
Red then green, CPU only, no game files or GPU:
test_failed_retry_keeps_the_previous_recovery_folderintests/test_make_game_runtime_staging.py, which puts agta6rt.exe.oldin a stale staging folder and makes the next install fail while copying.maind8ca18240the new case fails: the stale folder and itsgta6rt.exe.oldare already gone when the copy fails.python -I tests/test_make_game_runtime_staging.pypass.GPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator rule)