Skip to content

windows-boot: keep driver artifacts outside the checkout (RT-WINDOWS-BOOT-SCRATCH-CWD) - #1609

Open
lixonik wants to merge 1 commit into
ProjectLeonida:mainfrom
lixonik:windows-boot-scratch-cwd
Open

lixonik wants to merge 1 commit into
ProjectLeonida:mainfrom
lixonik:windows-boot-scratch-cwd

Conversation

@lixonik

@lixonik lixonik commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: RT-WINDOWS-BOOT-SCRATCH-CWD

What and why

Refs #1552 for the driver artifact report. boot.ps1 starts the runtime from the checkout, so a driver artifact with a relative filename, such as the reported ucode.elf, can be created at its root and staged by accident.

Start the runtime from a per-run directory under -OutDir. Resolve the launcher's path inputs before spawning the child and keep the base for the existing runtime path overrides that were relative to the checkout. Ignore only a root-level ucode.elf to cover direct launches from the checkout.

Tested

  • Launched a synthetic child executable with the original and patched launchers on Windows PowerShell 5.1 and PowerShell 7. Its marker landed at the checkout root before the patch and under work_<name> afterwards. Verified paths with spaces, relative launcher inputs from outside the checkout, and -DryRun leaving the output directory absent.
  • Ran the full semantic suite (6,252 tests) and the docs link tests (16 tests). Verified the scoped Git ignore rule and ran check_no_game_data.py on all three changed files.

GPUs tested: n/a (synthetic child process)

AI-assisted.

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.

@JoeY54

JoeY54 commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Independent Windows launcher validation at 0236b63f4e18996a8210c841bea54e64af3f3ba7, compared with parent 42537e7b6f84c233ac009b924d3a25d2a1178197.

12/12 passed on Windows 11 Pro 26H2 (26300.9974). I ran the old and new launcher with a synthetic marker child in Windows PowerShell 5.1.26100.9818 and PowerShell 7.6.9, using absolute paths, relative paths from outside the checkout, and -DryRun. The paths contained spaces.

  • The parent wrote the marker at the checkout root. The PR head wrote it under <OutDir>/work_<Name>.
  • The PR resolved the relative launch input before starting the child and preserved the checkout-relative meaning of LEONIDA_SAVE_DIR.
  • All four -DryRun cases exited 0 and left the output directory absent. git check-ignore matched root ucode.elf and left the nested example visible.

Windows PowerShell 5.1 initially refused to load the script under the default execution policy in the test environment. The successful 5.1 runs used RemoteSigned at process scope. The child recorded its working directory, arguments and selected environment variables using synthetic placeholders. AI-assisted with Codex. Test coordination.

@TheGeogeo

Copy link
Copy Markdown
Contributor

Checked 0236b63f4 merged (no commit) with main 87a39df94: Python 3.12.4, Windows 11 10.0.26300, CPU only. check_no_game_data.py is clean.

  • This PR adds no test, so there is no red/green to show.
  • No regression: the tests that name the boot scripts give the same result on main and on the merge (test_boot_matrix.py 36 OK, test_boot_trace.py 39 OK, test_dev_boot_trace.py 5 OK and 4 more).
  • I did not run scripts/windows-boot/boot.ps1 itself: it starts the title, so this is diff reading only.

No blocker from my side.

AI-assisted (Claude Code).

@lixonik

lixonik commented Nov 29, 2026

Copy link
Copy Markdown
Contributor Author

When I merged public head 0236b63f4e18996a8210c841bea54e64af3f3ba7 into main c8bf0e7b65, the synthetic journal-seed suite had one failure. The launcher made a relative writable-cache path absolute before seed selection, causing it to add a seed in a case that previously suppressed automatic seeding.

A local follow-up chooses the seed before resolving the writable-cache path. The child still gets the absolute path, and an explicit seed can still override the default. The updated test checks both the absolute path handed to the child and the absence of an automatic seed. The 17-test suite passes. This also removes the boot.ps1 text conflict with #2599 at 202ad50e5b686a885f7e6e72d55608a5bb0162fd, and all 26 tests pass with both changes applied. Windows 10, Windows PowerShell 5.1, CPython 3.12.1, dry-run only.

The follow-up is still local because of GitHub commit-email protection on the fork.

AI-assisted. Codex (GPT-6).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants