Repository navigation
Conversation
…stage The runtime stage ran scripts/build_runtime.ps1 through the bare name "powershell". CreateProcess searches System32 but not System32\WindowsPowerShell\v1.0, so on a PC whose PATH no longer lists that folder the stage ended in a FileNotFoundError traceback, after the shader and asset stages had already run. windows_powershell() returns the file under %SystemRoot%, and the bare name where the file is not at its usual place. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Kam471
left a comment
There was a problem hiding this comment.
Ran this at b763d04d on Windows 11: python -I tests/test_make_game_platform.py -> 41 tests, OK; git diff --check clean.
The runtime stage now starts PowerShell by the full %SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe path instead of relying on PATH, which is the failure mode described (powershell.exe is not in System32). The platform test covers the resolved path and still exercises the non-Windows branch. No blocking issue.
|
PASS. Two minor notes:
Approve. AI-assisted review, no game files, no GPU. |
…dir fallback Two notes from the review of this pull request: - windows_powershell() returns the bare name where the file is not at its usual place. If PATH has no powershell either, the runtime stage still ended in the FileNotFoundError of the launch, after the earlier stages had run. preflight now lists Windows PowerShell with the other missing prerequisites, on Windows, when the runtime stage is going to build. - The windir fallback had no test: the existing one sets SystemRoot to a folder without the file. A new test unsets SystemRoot. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Pushed
Tested on Windows 11 26200 (Python 3.12.6) and Linux (WSL Ubuntu, Python 3.12.3): One thing I looked for on purpose: existing tests that run the preflight with Not tested: a real Windows without |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Native Windows recheck of 1a870404 on aa2988cc. Windows 11 x64 build 26300, CPython 3.12.8. All 44 selected stock platform tests passed, including the six PowerShell-specific tests and both early-preflight cases. With an empty child-process |
|
Tested
Code read: the full-path-first/bare-name-fallback order matches how CreateProcess actually searches (System32 yes, its WindowsPowerShell\v1.0 child no), and putting the check in preflight is the right layer — it fails before the shader and asset stages burn an hour. No findings. |
|
✅ Automated security review: CLEAN (commit
Scope: static analysis of added diff lines only; no code was executed. Please review findings manually. |
detect_gpus asks Win32_VideoController for every adapter through "powershell". CreateProcess searches System32 but not System32\WindowsPowerShell\v1.0, so the bare name works only while that folder is on PATH. Where it isn't, _run turns the FileNotFoundError into an empty string and the report silently leaves out every GPU that nvidia-smi doesn't list (AMD, Intel, and any NVIDIA card nvidia-smi misses). windows_powershell() resolves %SystemRoot% (then %windir%, then C:\Windows) to System32\WindowsPowerShell\v1.0\powershell.exe, and keeps the bare name where the file isn't at its usual place. This is the same rule ItsNotRexed#3930 uses for make_game.py's runtime stage. pc_checker runs on its own, so it has its own copy instead of importing make_game. The new WindowsPowerShell tests cover: - the full path under SystemRoot; - the windir fallback; - the bare-name fallback; - detect_gpus with sys.platform patched to win32 in the module, which checks that the CIM query starts the full path and that its adapter is reported. Without the change, those tests give 3 errors and 1 failure. test_pc_checker gives 30 OK on Python 3.15.2, 3.14.10 and 3.12.16 on macOS (Apple M4), and pc_checker --cli still reports the M4.
…ll path for the runtime stage Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewed head: 1a87040 Review: ItsNotRexed#3930 (comment) Board: ItsNotRexed#8919 AI-assisted integration.
Claimed in the coordination issue as: new BUILD item, claim in #3918 (since listed as BUILD-1118). Depends on: nothing open.
Updated 2026-11-23:
1a870404answers the two notes of the review below (a preflight check, and a test of thewindirfallback). The earlier checks here were ofb763d04d.What and why
On Windows,
runtime()inmake_game.pybuilds the runtime by runningscripts/build_runtime.ps1through the bare namepowershell.CreateProcesssearchesSystem32, butpowershell.exelives inSystem32\WindowsPowerShell\v1.0, so the name is found only while that folder is on PATH. On a PC whose PATH no longer lists it (mine: neither the machine nor the user PATH has it), the stage ends like this:Stages run in order, so in a default build this comes after
shadersandassetshave already run, and the preflight, which exists to catch a missing prerequisite before the long stages, says nothing.The change:
windows_powershell()returns%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exewhen that file exists (windir, thenC:\Windows, whenSystemRootis unset), and the bare namepowershellotherwise, so nothing changes where the file is not at its usual place.runtime()starts that instead of the bare name. Windows PowerShell 5.1 is also whatbuild_runtime.ps1is written for, so naming its file is more exact than whateverpowershellresolves to on PATH.1a870404)preflight()lists Windows PowerShell with the other missing prerequisites when the file is not at its usual place and PATH has nopowershelleither (windows_powershell_ok()). It asks only where the stage would start it: on Windows, withruntimeamong the stages and no--runtime-build.The same bare
"powershell.exe"in the Windows-only tests is #3965 (TEST-869), which builds on this PR.Tested
Windows 11 26200, Python 3.12.6, a PATH without
System32\WindowsPowerShell\v1.0. No game files; no GPU is involved in this change.At
1a870404:python -I tests/test_make_game_platform.py: 45/45 OK (41 before, plus four: thewindirfallback,windows_powershell_ok(), and the preflight failing and passing).test_preflight_names_a_missing_powershell_before_any_workfails withSystemExit not raised, and the passing-case test fails because the check was never asked. Thewindirtest passes onb763d04dtoo: that code was right, only untested.tests/test_make_game*.pyfiles, on Windows and on Linux (WSL Ubuntu, Python 3.12.3): 325 tests OK. The same on this branch merged withmain(3faac557): 362 tests OK on both, and the merge is clean. On Linux the tests that run the preflight withos.namepatched tontmatter here, since there is no PowerShell: none of the existing ones reaches the new check and passes by accident or fails because of it.python -m compileall -q make_game.py tools testsandpython -I make_game.py --help: OK.At
b763d04d:make_game.runtime()with a scratch game folder and output folder, MSVC 19.42 and Windows SDK 10.0.28000.0:main(aa2988c):FileNotFoundError: [WinError 2], as above.build_runtime.ps1runs, andgta6rt.exeandgta6rt_tls_host.dllare packaged (179 s).main'smake_game.py('powershell' != '...\powershell.exe', andwindows_powershellmissing).Not tested: a real Windows without
powershell.exeat its usual place or on PATH. The preflight message for it is covered by the unit test only, and the real stage was not built again after1a870404, which does not touch it.Checklist
docs/design.md, with how it was confirmed. (Not applicable.)AI-assisted (Claude Code).
🤖 Generated with Claude Code