docs/boot.md: the Windows PowerShell 5.1 capture survives ErrorActionPreference Stop (PROC-271) (OLD-9939) #668
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!668
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/668/head"
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?
@LouisRiverstone on GitHub · 2026-11-24 11:18 UTC · original
LouisRiverstone:carry-old-9939→main· +9 −1 · 1 files · 1 commits · merged 2026-11-24 12:43 UTCClaimed in the coordination issue as: OLD-9939 (#14)
Replaces the carried-over draft #206. I'm the original author of old upstream PR 9939.
What and why
PROC-271. If the session, a profile or a script has set
$ErrorActionPreference = 'Stop', Windows PowerShell 5.1 turns the first stderr line of thegta6rt.exe --run ... 2>&1 | ...capture indocs/boot.mdinto a terminating error. The run stops there, and the log has no[d3d12-trace]line, so it reads as a run that made no D3D12 call. The command now runs inside& { $ErrorActionPreference = 'Continue'; ... }, which is the same patternscripts/first_look.ps1uses for its dry run, and the doc explains why the wrapper is there.The old branch's final diff, applied on current
main(21625bca8) as one commit. It applied cleanly.Tested
Measured with a stand-in on Windows PowerShell 5.1.26100. The stand-in printed three trace lines to stderr and exited with code 37.
Continue, none withStop.$LASTEXITCODEwas 37, and the session's preference was unchanged afterwards.Documentation only.
GPUs tested: n/a
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: documentation only)@kirigayakazima on GitHub · 2026-11-24 12:26 UTC · original
Independently verified on Windows 11 x64 (
Windows PowerShell 5.1.26100.9818,Python 3.14.7, CPU only, synthetic stand-in process — no game files) against head commit4d470fd69b8fd415261b8283bc3bf31424d8bda5.Verdict: Looks good — confirmed both the failure under
$ErrorActionPreference = 'Stop'and that the scoped& { $ErrorActionPreference = 'Continue' ... }pipeline captures every stderr line cleanly while feedingtools/boot_trace.py.Checks run locally
main(21625bca):git merge-tree --write-tree upstream/main HEADexited0;git diff --check upstream/main...HEADclean.python -I): all 13 files passed (test_docs_cli_flags.py4,test_docs_design_rows.py5,test_docs_encoding.py1,test_docs_env_vars.py4,test_docs_links.py16,test_docs_list_items.py3,test_docs_pr_template.py2,test_docs_python_deps.py3,test_docs_repeated_lines.py2,test_docs_repo_paths.py3,test_docs_table_ids.py2,test_docs_table_rows.py2,test_design_contract_rows.py5).python -I tests/test_boot_trace.py: 32 tests, OK.python -I tests/test_dev_boot_trace.py: 5 tests, OK.python -I scripts/check_no_game_data.py docs/boot.md: clean (exit0).Windows PowerShell
5.1.26100.9818empirical reproductionRan a synthetic stand-in command printing 3
[d3d12-trace]lines tostderrand exiting37, then parsedBoot + D3D12withpython -I tools/boot_trace.py $trace --d3d12 $log --json:... 2>&1 | ForEach-Object { $_.ToString() } | Out-File -LiteralPath $log -Width 4096 -Encoding utf8):$ErrorActionPreference = 'Continue': PowerShell exited0,$LASTEXITCODE = 37, 3 lines captured (135bytes),boot_trace.pyexited0(d3d12.calls = 3).$ErrorActionPreference = 'Stop': PowerShell aborted (exit 1) on the first stderr line, no log was written (0lines),boot_trace.pyexited2.& { $ErrorActionPreference = 'Continue'; ... 2>&1 } | ForEach-Object { $_.ToString() } | Out-File ...):'Continue': PowerShell exited0,$LASTEXITCODE = 37,$ErrorActionPreferenceremainedContinue, 3 lines captured (135bytes),boot_trace.pyexited0(d3d12.calls = 3).'Stop': PowerShell exited0,$LASTEXITCODE = 37, outer$ErrorActionPreferenceremainedStop, all 3 lines captured (135bytes), andboot_trace.pyexited0(d3d12.calls = 3).AI-assisted: yes