gdk_runtime_calls: protect runtime-source directory files from collision (OLD-8468) #702
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!702
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/gdk-runtime-source-collision"
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?
Pull request successfully merged and closed
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
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.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
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)
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)