gdk_runtime_calls: protect runtime-source directory files from collision (OLD-8468) #702
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/702"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T12:24:01Z.
Summary
Restores old upstream PR 8468 (OLD-8468).
When --runtime-source\ is a directory of \xgameruntime*.cpp\ (such as the default
untime/shims), \main()\ checked only \if os.path.isfile(a.runtime_source): inputs.append(a.runtime_source). This left all scanned shim C++ files omitted from collision detection, allowing --out\ to overwrite them.
This change extracts
untime_source_paths()\ to properly enumerate the scanned shim files and include them in the collision check against .json\ and .txt\ output paths.
Verification
Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-25T01:17:06Z.
Reviewed a008a756. I read the diff and ran the tests in a Linux sandbox:
tests/test_gdk_runtime_calls.py: 25 tests OK on this branch.test_main_refuses_out_that_overwrites_runtime_source_folder_filefails because main exits 0, andtest_runtime_source_paths_directory_and_fileerrors because the helper is missing.check_no_game_data.pyon both changed files: clean.b4b7756e).Before this change, the collision check only added
--runtime-sourcewhen it was a single file. With the default folder source, a shim.cppreached by the output path was not protected.runtime_source_paths()now feeds every scannedxgameruntime*.cppinto the check.read_runtime_source()is moved onto the same helper and behaves the same: an empty folder still raisesFileNotFoundError. No findings.AI-assisted review.
Recommendation: Merge
Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-25T21:33:39Z.
Rebased cleanly onto latest \main\ (\
e34ff17e9), resolving the stale base CI failure. Verified: all 25 tests in \ est_gdk_runtime_calls.py\ pass.AI-assisted (Claude Code)
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T10:58:05Z.
Red/green: the PR's tests fail on main and pass with this PR (Linux, Python 3.13.18).
Targeted batch of 23 PRs (their tests, the tests importing the changed modules, the docs tests) on main
3ca0707: no new failure, Linux / Python 3.13.AI-assisted (Claude Code, Claude Opus 5.5)