startup: hold other threads while a hook steps over its byte #1401
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1408"
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 R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T10:48:56Z.
Fixes #1281
What this unblocks: a startup run that traces every call of a hooked function even when two threads enter it at once (files.txt, the offline socket refusal and rewrites built on the hook no longer miss concurrent calls).
Source: Microsoft Win32 debugging API documentation: WaitForDebugEvent / ContinueDebugEvent (https://learn.microsoft.com/windows/win32/api/debugapi/nf-debugapi-waitfordebugevent), SuspendThread and GetThreadContext (https://learn.microsoft.com/windows/win32/api/processthreadsapi/nf-processthreadsapi-suspendthread); the single-step trap flag is the x86 EFLAGS TF bit.
Change
The startup debugger's function hooks are one patched byte per function. To run the original instruction it restores the byte, single-steps the thread that hit it and patches the byte again. A second thread entering the same function in that window ran untraced, so files.txt, the offline socket refusal and any rewrite built on the hook missed calls.
Chosen fix: hold every other thread for the step (SuspendThread plus a GetThreadContext to wait until it has stopped), step the owner alone, patch the byte again, then resume them. Why this and not the alternatives:
Details:
hook windows: entries=N windows=W unprotected=U deferred=D timeouts=T protection=on|offin the console, finished.txt and files.txt, also when all are 0.--suspend-others 0turns the holding off, to measure it or to see the loss.Bookkeeping is in tools/startup/hook_window.py (no Win32 calls) so it can be checked without Windows.
Verification
Linux, run here:
python3 -B tests/startup_hook_check.py: PASS. Five single mutations of hook_window.py (defer never, any thread closes the window, deadline not counted, failed hold not counted, owner held) each make it fail.py_compileof the three Python files,tests/docs_links_check.py,tests/bidi_controls_check.py,git diff --check: clean.Windows (Win2025, D3D12 WARP node, MSVC 14.44, Windows Server 2025 build 26100), PR head
88e0aa815(origin/main merged in, merge commit, no force):startup_hook_overlap: 64 of 64 opens traced with the window, three times,unprotected=0; the control with--suspend-others 0lost opens and reportedunprotectedabove 0.returns.get(addr)(the class has noget;ReturnBook.pending()added with a test), and a duplicatefile_logassignment overrode main'strace or log_at(startup_debug_log failed before the fix, passes after).--map-drivecase needs #1251, which is not in main.Evidence and follow-up
prpreset: startup_hook_window, startup_hook_overlap.returns, so it needs no change for this fix. This PR does not touch those lines; it applies on main without #1251.Checklist
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T10:54:42Z.
AI-assisted. Cause of "88 of 64" in the unprotected control: with --suspend-others 0 another thread can re-patch the hook byte before the stepping thread has run the original instruction, so that thread traps again at the same address. The entry hook registered the same call twice (same thread, same stack slot), and the return wrote one line per registration. Replaying that bookkeeping with 24 re-trapped calls out of 64 gives 88 lines with the old logic and 64 with the fix.
Changes in the new commit: pending returns now live in
ReturnBook(tools/startup/hook_window.py), where a call is identified by thread and stack slot and a repeat registration replaces the first. The control counts lost opens as max(0, 64 - traced) and fails if traced exceeds 64. The overlap probe now uses 4 threads x 16 rounds (still 64 opens) with a spin barrier to make the race more likely.Linux: startup_hook_window logic, py_compile, docs_links_check, bidi_controls_check pass. Windows not run by me. Node command: ctest --preset dev -R 'startup_hook|startup_launch' (Debug and /O2). PR stays Draft.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T10:57:28Z.
AI-assisted. Pushed
3cfa1726for the Windows Server 2025 failure of startup_hook_overlap (windows=132 unprotected=1 timeouts=0).Cause: a thread that has called ExitThread stays in the debugger's thread list until its exit event is read. OpenThread still succeeds on it, but SuspendThread/GetThreadContext fail with access denied, and hold_thread returned FAILED, so the window counted it as unprotected although it runs no code. The hold is now classified after the failure by a pure function (hook_window.classify_hold): GONE when GetExitCodeThread != STILL_ACTIVE (or the handle is already signaled, for a thread that is terminating and has no exit code yet), FAILED when the thread is alive and could not be suspended. A live unsuspendable thread still counts as unprotected, and the test still requires unprotected == 0.
Ruled out by reading: a thread created after the list is read (CREATE_THREAD held at its event), an already suspended thread (nested count is not an error, only 0xFFFFFFFF is), a reused or closed handle (a fresh handle per hold, threads dropped from the list on exit), the owner itself (excluded from the others).
Linux checks: py_compile, startup_hook_window (new GONE/FAILED cases; the old module has no classifier), docs_links_check, bidi_controls_check, preflight. The Win32 debugger race cannot be run on Linux, so it is not verified here. Windows: ctest --preset dev -R 'startup_hook|startup_launch' (Debug and /O2).
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T11:02:07Z.
Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207) at commit
3cfa1726:--preset dev):ctest --preset dev -R '^(startup_launch|startup_hook_window|startup_hook_overlap)$' --no-tests=error --output-on-failure— 3/3 passed (startup_hook_window0.07s,startup_hook_overlap0.78s,startup_launch1.77s)/O2(--preset release):ctest --preset release -R '^(startup_launch|startup_hook_window|startup_hook_overlap)$' --no-tests=error --output-on-failure— 3/3 passed (startup_hook_window0.07s,startup_hook_overlap0.75s,startup_launch1.76s)Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T11:02:14Z.
Codex Review Summary: ❌ Failed
This comment shows the latest Codex review activity on this pull request.
We couldn’t complete this review. Comment
@codex reviewto try again.88e0aa8ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T11:10:58Z.
Review: COMMENTED
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
3cfa1726b4ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T11:17:44Z.
Review: COMMENTED
No description provided.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T11:17:47Z.
Review: COMMENTED
No description provided.
Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-11-24T11:21:14Z.
Tested on Windows 11 26200, MSVC 19.42, RTX 4070 Ti (driver 621.35) at
3cfa172:startup_launch,startup_hook_windowandstartup_hook_overlapall passed. Overlap traced 64/64 opens, while the control lost 12.AI-Assisted
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T11:33:59Z.
Thanks @SimSalabimse for verifying on Windows 11 26200 / MSVC 19.42! Rebased onto current
mainat6df8cf0aafter addressing the Codex P2 notes (3/3pass on Win2025 Debug & Release).Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T11:35:37Z.
Thanks @SimSalabimse: that is the hardware pass (RTX 4070 Ti, 64/64 opens traced against 12 lost by the control) on top of our Windows Server 2025 run. No change to the head is needed.
Imported from R0Y00/Xbox2Windows. Originally posted by RenzoWit35 on 2026-11-24T11:38:54Z.
Ran this branch on a Windows 11 client (build 26300, MSVC 14.51, Python 3.14), commit 86d81f9e (same hook code as the rebased head
6df8cf0a).startup_hook_window,startup_launch,startup_debugandstartup_host_cpu_debugpass. Thetracing itself looks right: in every protected run 64 of 64 opens were traced. A second probe of
mine, two threads opening their own file 64 times each without a barrier, gave exact per-thread
counts in 20 of 20 runs, where current main is wrong in 16 of 20.
startup_hook_overlapis intermittent here: 17 of 40 runs failed with(262, 1, 0)or(262, 2, 0), sounprotectedwas 1 or 2 with all 64 opens traced. Single runs do pass, which fits the passes reported above. I logged the failed holdsin 15 more runs (5 failed). All 8 failed holds looked the same:
SuspendThreadfailed,GetExitCodeThreadreturned 259, the handle was still not signaled after the 20 ms wait, andNtSuspendThreadon the same handle returned0xC000004B(STATUS_THREAD_IS_TERMINATING). Myguess is that the thread is inside its exit and waits for the debugger to take its EXIT_THREAD
event, so it cannot become signaled while the window is open. Treating
0xC000004BfromNtSuspendThreadasGONE(the thread runs no more user code) covered it in a similar changehere. The failures appeared when the test was started from PowerShell, directly or through ctest;
15 runs started from Git Bash all passed, and I don't know why the shell matters.
Cost: 2 x 2000 serial opens took 7.1 to 8.0 s on main and 12.5 to 13.3 s at
2fabc905(three runseach; similar at 86d81f9e on a busier machine). In a similar change most of that was
OpenThreadper held thread per step, about 80 µs each here. The
hThreadfrom the CREATE_THREAD andCREATE_PROCESS events already has suspend/resume and get-context access, and the system closes it
after the exit event.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T11:45:23Z.
Thanks @RenzoWit35, great catch on the Win11 26300
STATUS_THREAD_IS_TERMINATINGcase.hold_threadnow suspends withNtSuspendThreadand treats0xC000004Band0xC0000008as GONE (a unit test covers it, and it does not count as unprotected). It also reuses thehThreadfrom the CREATE_PROCESS and CREATE_THREAD debug events, and only falls back toOpenThreadwhen that handle is missing. It never closes the OS-provided handle.Verified on Windows Server 2025 at
4b05247a:startup_launch,startup_hook_windowandstartup_hook_overlappass 3/3 in both Debug and Release/O2. I haven't re-run it on Win11 26300.Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T11:10:58Z.
Code review location:
tools/startup/hook_window.py; line 49When a hooked function tail-calls another hooked function, both entries have the same return address, thread and return-stack slot. Filtering solely on
(tid, slot)therefore deletes the outer function's pending description rather than just deduplicating a repeated breakpoint. A synthetic tail-call sequence through the actual breakpoint handler produces two return records before this change but only the inner record afterward, even with protection enabled. Restrict replacement to confirmed re-traps of an unexecuted hook entry so legitimate tail-called functions remain visible infiles.txt.Useful? React with 👍 / 👎.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T11:10:59Z.
Code review location:
docs/startup-runtime.md; line 178When holding fails, a deadline expires, or protection is disabled, one exposed window can let several other threads—or repeated calls from one thread—cross the restored hook byte before it is rearmed. The bookkeeping increments
unprotectedonce for that window, soU=1can correspond to several missed calls and is not an upper bound on tracing loss. Describe this value only as a count of exposed windows; the current wording can understate missing file operations and offline-hook coverage.Useful? React with 👍 / 👎.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T11:17:44Z.
Code review location:
tools/startup/hook_window.py; line 49Fixed in 86d81f9e: ReturnBook.add() now tracks the hooked entry address alongside (tid, slot) so tail-called hooked functions keep both pending return records while re-traps of the same entry still deduplicate; added unit test coverage in tests/startup_hook_check.py.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T11:17:46Z.
Code review location:
docs/startup-runtime.md; line 178Fixed in 86d81f9e: docs/startup-runtime.md now describes unprotected (U) strictly as the count of exposed step windows, noting that one exposed window can miss multiple calls.
Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-11-24T13:57:43Z.
Retested at
ecbbf3e2on Windows 11 26200, MSVC 19.42, RTX 4070 Ti (driver 621.35): startup_launch, startup_hook_window and startup_hook_overlap pass in both presets (ctest exit 0 for dev and release).startup_hook_overlap traced 64/64 opens with the window on both presets; the unprotected control lost 21 opens on dev and 30 on release. So the NtSuspendThread path holds on Win11 as well.
AI-Assisted
Imported from R0Y00/Xbox2Windows. Originally posted by SuperCraft3M on 2026-11-24T14:07:29Z.
Independent integration check on Windows 11 build 26300.9711, Python 3.13 / MSVC 19.44 Debug: combined main
8f438025, #1251 atad94c950, and #1408 atecbbf3e2(plus the independent UTF-8 storage change #1551).The merge needs one semantic resolution in
debug_launch.py: store(description, restore)as the ReturnBook payload, then invoke the restore callback when taking the matching return. Keeping only the description loses the mapped caller-name restoration. No change to ReturnBook's bookkeeping API is needed.The combined source-built map overlap control reports 64 opens / 64 traces / 64 rewrites, two pooled name allocations, and both caller names intact. Its former WILL_FAIL registration can therefore become a normal pass when both PRs are present.
ctest --test-dir C:/Xbox2Windows-build --no-tests=error -R '^startup_(map_drive|map_drive_overlap|hook_window|hook_overlap)$' --output-on-failure: 4/4 passed, no skips. Integration and gate changes are on SuperCraft3M/Xbox2Windows branchruntime/startup-null-diagnosis, commit 30988289. This is an integration check of the existing PRs, not a replacement implementation. No binary inputs or raw runtime traces attached.AI-assisted (Codex).
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T14:11:00Z.
Thanks @SuperCraft3M for the independent integration check with
#1251(and noting the(description, restore)ReturnBookpayload resolution fordebug_launch.pywhen both PRs are combined).Rebased
#1408ontoorigin/mainat19d57310(resolving thedocs/experiments.mdconflict) and re-verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207):--preset dev):ctest --preset dev -R '^(startup_launch|startup_hook_window|startup_hook_overlap)$' --parallel 4 --no-tests=error --output-on-failure— 3/3 passed (startup_hook_window0.07s,startup_hook_overlap0.80s,startup_launch2.01s)/O2(--preset release):ctest --preset release -R '^(startup_launch|startup_hook_window|startup_hook_overlap)$' --parallel 4 --no-tests=error --output-on-failure— 3/3 passed (startup_hook_window0.07s,startup_hook_overlap0.83s,startup_launch1.98s)Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T21:01:06Z.
Updated the branch for the conflict with main.
e263314d(merged, no force push)c100ac3737git diff --check origin/main...HEAD,tests/startup_hook_check.py(startup_hook_window PASS),tests/docs_links_check.py(378 links),tests/bidi_controls_check.py, py_compile of the touched tools: all passed.x2w_pipe.py win2025 1408) atc100ac37: Debug 6/6 and Release 6/6 passed.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T01:02:56Z.
Updated the branch for the new conflict with main (merge, no force push).
84ce2942. New head:36bb4ada.CMakeLists.txt(kept both the hook tests andstartup_launch_cli_check) anddocs/experiments.md(kept both sections).22294074and answered; nothing new to change.tests/startup_hook_check.py(startup_hook_window PASS),tests/docs_links_check.py(397 links),tests/bidi_controls_check.py, py_compile oftools/startup,git diff --check origin/main...HEAD: all passed.x2w_pipe.py win2025 1408): Debug 7/7 and Release 7/7 passed on the previous headc100ac37; the merge only touches test registration and docs, so a re-run on36bb4adais left to CI.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T13:51:16Z.
Closing this PR for now to keep the Windows test queue short. Nothing is wrong with it and the branch stays as it is.
We will reopen it once the queue is clear, re-run the Win2025 WARP checks at its head, and post the result here.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T10:44:19Z.
Win2025 receipt for head
88e0aa815(origin/main merged in, no force push):startup_launch|startup_hook_window|startup_hook_overlap|startup_debugon Windows Server 2025 build 26100: dev 7/7 and release 7/7 passed (startup_launch, startup_launch_cli_check, startup_hook_window, startup_hook_overlap, startup_debug, startup_debug_log, startup_debug_hooks).startup_hook_overlap: 64 of 64 opens traced, three times, unprotected=0; the control with --suspend-others 0 lost opens.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-26T10:46:43Z.
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T10:51:44Z.
Head moved to
08f0f4e9f: ReturnBook gets an optional per-call restore callback (run once when the call returns; a re-trap of the same call keeps the first restore), so #1251 can restore a rewritten name through the same return book. Covered in startup_hook_check.Win2025 (build 26100) on
08f0f4e9f: startup_launch|startup_hook_window|startup_hook_overlap|startup_debug dev 7/7 and release 7/7 passed (hook_overlap 64 of 64 with the window, control loses opens).AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T10:46:31Z.
Independent Stage-2 gate of head
08f0f4e9f: PASS (supersedes my receipt for88e0aa815).Checked:
tools/startup/hook_window.py/debug_launch.py: the owner steps alone while every other live thread is held (NtSuspendThread plus a GetThreadContext to wait until it has stopped); a thread that trapped before it was held goes back to the hook address and is traced after the window; a thread created in the window is held; a thread that is already exiting counts as gone; every window has a 2 s deadline and the counters are always reported.hook_window.py(defer for any thread,_exposenot counted, any thread closes the window) are killed bytests/startup_hook_check.py, on top of the author's five.startup_hook_overlapasserts the real-thread result itself: 4 threads x 16 rounds through one hookedCreateFileW(the probe from this PR), every one of the 64 opens traced with its result andunprotected=0/timeouts=0/protection=onin three runs; the control--suspend-others 0must lose opens and reportunprotectedabove 0, else the test fails.Verification (Win2025, proxmox only):
python3 -B tests/startup_hook_check.py,tests/docs_links_check.py,py_compileof the Python files: pass on Linux.x2w_pipe.py win2025 1408 --host proxmox --force --keep-release --regex '^(startup_launch|startup_hook_window|startup_hook_overlap|startup_debug)': dev 7/7 and release 7/7 passed (startup_hook_overlap0.8 s dev, 0.9 s release).Not covered, as the PR says: the two-thread
--map-drivecase needs #1251.Update, head
08f0f4e9f(ReturnBookrestore callback): the callback runs once, when its call returns, and only for that call; a re-trap of the same call keeps the first restore (the caller's original state). Three single mutations (restore order swapped, callback never run, callbacks of other calls run too) are killed bytests/startup_hook_check.py.x2w_pipe.py win2025 1408 --host proxmox --force --keep-release --regex '^(startup_launch|startup_hook_window|startup_hook_overlap|startup_debug)': dev 7/7 and release 7/7 passed.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T11:09:42Z.
@MasterDomino these are tested and Ready. Could you merge them in this order when you have a moment?
Each PR has its Win2025 dev + release receipt in its comments. Thanks!
Imported from R0Y00/Xbox2Windows. Originally posted by pigalot on 2026-11-27T17:58:40Z.
Review: CHANGES_REQUESTED
Independently reviewed
08f0f4e9integrated overmain5ebdc581(treead6137f4, clean merge).I traced the step window through the breakpoint handler in
debug_launch.pyand throughhook_window.py.StepWindow.open()holds every other thread. Onlyfinish()releases them early, from the owner's single-step or its EXIT_THREAD; otherwise they stay held until the 2 s deadline. One path opens a window with no step behind it; see the finding below.Built
startup_launch_probe,startup_debug_probeandstartup_debug_callsindevandrelease, then ranctest --test-dir out/build/<preset> --no-tests=error -j 1 -V -R '^(startup_launch|startup_launch_cli_check|startup_hook_window|startup_hook_overlap|startup_debug|startup_debug_log|startup_debug_hooks)$':7/7 passed in Debug and in Release
/O2, no skips.ctest ... --repeat until-fail:20 -R '^startup_hook_overlap$', started from PowerShell, passed 20 of 20 in each preset.On
main5ebdc581,startup_hook_windowandstartup_hook_overlapare not registered. A mutant whosehold_threadreports HELD without callingNtSuspendThreadfailsstartup_hook_overlapwith16 of 64 opens traced.git diff --checkis clean.Finding: a LOG_AT breakpoint retired at its hit limit leaves its step window open until the deadline.
In the breakpoint handler,
window.open(tid, ...)runs before the hit-limit branch. That branch:set_ctx;So no single-step event follows, and
finish(tid)is never called for that window. The other threads stay held until the 2 s deadline. Thenexpire()counts the window as both a timeout and unprotected, although nothing could be missed: the byte is no longer patched.To reproduce, use the source-built
startup_debug_probe. It calls its log site 19 times, then waits 3 s.Set
X2W_LOG_AT=<site>:rdxwith a hit limit, taking<site>from the probe'sdebug-probe log siteline:@2(retire path):hook windows: entries=0 windows=2 unprotected=1 deferred=0 timeouts=1 protection=on. The run took 5.1 s.@100(control, no retire):windows=19 unprotected=0 timeouts=0. The run took 3.1 s.Two runs each gave the same result.
Suggested direction (tried locally, not pushed): move
window.open(...)below the retire branch, directly before TF is set. With that change,@2reportswindows=1 unprotected=0 timeouts=0in 3.1 s, and the 7 tests above still pass in Debug.The existing
log-atcase intests/startup_debug_check.pyalready takes the retire path (@2of 19 calls) but doesn't read the counters. An assert ontimeouts=0 unprotected=0there would catch this.Environment: Windows 11 25H2 build 26200.9974, MSVC 19.52.37029, Python 3.12.10. No GPU is involved in these tests.
CI:
Build and test on Windowspasses on08f0f4e9.This reply was AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-27T21:28:12Z.
Thanks for the trace. Pushed
ac0f5e216, which merges currentmainand fixes the finding:window.open(...)now runs after the hit-limit retire branch, directly before TF is set, so a retired LOG_AT breakpoint no longer leaves a window open until the deadline. Thelog-atcase intests/startup_debug_check.pynow also assertsunprotected=0andtimeouts=0.Not yet run on Windows:
startup_debugwith the new assertion.Commands run locally:
python3 -m py_compile tools/startup/debug_launch.py tests/startup_debug_check.py,cmake -S . -B <tmp> -DDXC_EXECUTABLE=/bin/true,public_guard.py.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-27T21:47:23Z.
Verification: head
ac0f5e216after the main merge and the latest fixes.Environment: Windows Server 2025 (build 26100), MSVC 14.44, D3D12 WARP and the hardware adapter, dev and release legs in parallel.
Commands (the same selection in both legs):
Result: 6/7 passed, 1 skipped by capability (
startup_debug_window), no failures, in both legs.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by pigalot on 2026-11-27T21:58:55Z.
Review: APPROVED
Re-reviewed
ac0f5e21merged over currentmain28e4a025. The merge is clean andgit diff --cached --checkis clean.The finding from my review of
08f0f4e9is fixed.window.open(...)now sits after the hit-limit retire branch, directly before TF is set. A LOG_AT breakpoint that retires at its limit therefore returns without opening a window. Thelog-atcase intests/startup_debug_check.pynow assertsunprotected=0andtimeouts=0on thehook windows:line.What I ran. I built
startup_launch_probe startup_debug_probe startup_debug_callsindevandrelease, then ran9/9 pass in both presets, with no skips. The set is
startup_debug,_log,_hooks,_window,startup_debug_launch_args,startup_launch,startup_launch_cli_check,startup_hook_windowandstartup_hook_overlap.startup_debug_windowpasses on this host; tedin7's Server 2025 run reports it as a capability skip.Negative control. I moved
window.open(...)back above the retire branch, which is the08f0f4e9order.startup_debug_log, the group that holds thelog-atcase, then fails on the new assertion withThose are the same counters and the same 5 s run time I reported before. With the PR's order the line reads
unprotected=0 ... timeouts=0, and the run takes about 3 s. I restored the file afterwards, andgit diff --quietis clean.Note for anyone re-running this: the case is in
startup_debug_log. The anchored-R '^startup_debug$'runs only the core group, which doesn't reach it.Verdict: approve on
ac0f5e21.Environment: Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; Python 3.12.10. No GPU is involved in these tests.
CI:
Build and test on Windows,Assemble and translate gfx1013 fixturesandRun platform-independent Python checks on Linuxpass onac0f5e21.This reply was AI-assisted.