Skip to content

Add bounded Windows first-boot capture and process cleanup - #6417

Open
kacper-serewis wants to merge 1 commit into
ItsNotRexed:mainfrom
kacper-serewis:feat/local-runner-tests
Open

kacper-serewis wants to merge 1 commit into
ItsNotRexed:mainfrom
kacper-serewis:feat/local-runner-tests

Conversation

@kacper-serewis

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as #6379 (claim). Closes #6379.

What and why

Add a native Windows runner for one dry-run, init or run pass with an explicit deadline. It assigns the suspended loader to a private job before resuming it, attempts a bounded external thread minidump on deadline or request, and cleans up descendants even after a normal root exit. It records loader, capture and parser outcomes independently in a fresh local directory. The existing trace parser handles partial runs. The invocation follows the pass and trace options in #6198 and works independently of #6378.

Tested

Windows, CPython 3.13.15. All 7 synthetic runner tests passed, covering all modes, successful and nonzero exits, native fail-fast termination, missing traces, launch failure, collisions, descendant cleanup, successful dumps, failed dumps and a stalled writer. The existing boot parser (20), text line endings (3) and documentation CLI flag checks (3) passed. CPU tests only. No GPU or driver exercised.

AI-assisted: yes (OpenAI Codex).

  • No game data, keys or decryption, including in logs and reports.
  • Translator contract update is inapplicable.

@milas6669

Copy link
Copy Markdown

Checked the stack #6410 -> #6417 -> #6419 as one unit: #6410 and #6417 are ancestors of #6419 (git merge-base --is-ancestor), so I merged e4c4bec9c onto main 4beffda88 (15 files, +831/-5, no conflicts) and built everything. Windows 11 26200, MSVC 19.44 RelWithDebInfo, RTX 3070.

  • ctest -R "startup|boot|loader|run_tiny|fsr": 25/25 (23 pass, 2 skipped: fsr_dispatch, d3d12_boot_movie; both need game files). That includes startup_trace, startup_trace_phases and run_startup_cmdline.
  • tests/test_run_boot.py 7/7 and tests/test_boot_trace.py 21/21 (the runner prints some stray status words, exited, timeout, while the tests run; harmless).
  • scripts/rehearse_first_boot.py end to end, exit 0 in 9 s: map and attach exit 0, entry process 42 / trace 42, abnormal process 73, timeout captured by the 5 s deadline (the deadline.dmp is written and is non-empty), failed-init "DllMain returned FALSE", missing-import unresolved import reported. tasklist afterwards shows no gta6rt/tiny_startup_cmdline left over, so the job cleanup does terminate descendants here.
  • Negative control: main's runtime/src/pe_loader.cpp and runtime/shims/process.cpp only (the rest of the stack kept): startup_trace_phases fails (startup_trace and run_startup_cmdline still pass), so the loader change is what the thread-attributed entry/return records need.

No defect found. One note for the minidump: docs/boot.md says to keep the output directory local; on a real first boot MiniDumpNormal thread stacks can hold bytes from the game, so that sentence matters. No game data used. AI-assisted (Claude Code).

@memorypressure

Copy link
Copy Markdown

Verified against main 1cc6e3c: merges cleanly. The new test file is Windows-gated (Ran 7, all 7 skipped on this Linux host), so the runner behavior itself rests on the CI windows job here; what I could check — the docs guards over boot.md (cli-flags, links, repo-paths) — all pass, and the scripts are stdlib-only. Ordering note: this head is a direct ancestor of #6419, which merges it, so merging either first is conflict-free and the pair needs no coordination. Checks pending. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run).

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.

First-boot readiness: add bounded local boot capture with hang evidence

3 participants