docs/boot.md: the Windows PowerShell 5.1 capture survives ErrorActionPreference Stop (PROC-271) (OLD-9939) #668

Manually merged
github merged 1 commit from gh-pr/668/head into gh-pr/668/base 2026-11-26 09:15:08 +00:00
Owner

@⁠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 UTC

Claimed 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 the gta6rt.exe --run ... 2>&1 | ... capture in docs/boot.md into 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 pattern scripts/first_look.ps1 uses 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.

  • Without the block: three lines captured with Continue, none with Stop.
  • With the block: three lines captured with either setting, $LASTEXITCODE was 37, and the session's preference was unchanged afterwards.

Documentation only.

GPUs tested: n/a

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: documentation only)
**@⁠LouisRiverstone** on GitHub · 2026-11-24 11:18 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/668) `LouisRiverstone:carry-old-9939` → `main` · +9 −1 · 1 files · 1 commits · merged 2026-11-24 12:43 UTC Claimed in the coordination issue as: OLD-9939 (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/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 the `gta6rt.exe --run ... 2>&1 | ...` capture in `docs/boot.md` into 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 pattern `scripts/first_look.ps1` uses 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. - Without the block: three lines captured with `Continue`, none with `Stop`. - With the block: three lines captured with either setting, `$LASTEXITCODE` was 37, and the session's preference was unchanged afterwards. Documentation only. GPUs tested: n/a AI-assisted: yes (Claude Code) ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: documentation only)
- docs/boot.md: the Windows PowerShell 5.1 capture survives ErrorActionPreference Stop (PROC-271)

Carried over from old-pr/9939 (old upstream PR 9939), rebased on main.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:15:08 +00:00
github manually merged commit 4d470fd69b into gh-pr/668/base 2026-11-26 09:15:08 +00:00
Author
Owner

@⁠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 commit 4d470fd69b8fd415261b8283bc3bf31424d8bda5.

Verdict: Looks good — confirmed both the failure under $ErrorActionPreference = 'Stop' and that the scoped & { $ErrorActionPreference = 'Continue' ... } pipeline captures every stderr line cleanly while feeding tools/boot_trace.py.

Checks run locally

  • Clean merge with main (21625bca): git merge-tree --write-tree upstream/main HEAD exited 0; git diff --check upstream/main...HEAD clean.
  • Doc tests (python -I): all 13 files passed (test_docs_cli_flags.py 4, test_docs_design_rows.py 5, test_docs_encoding.py 1, test_docs_env_vars.py 4, test_docs_links.py 16, test_docs_list_items.py 3, test_docs_pr_template.py 2, test_docs_python_deps.py 3, test_docs_repeated_lines.py 2, test_docs_repo_paths.py 3, test_docs_table_ids.py 2, test_docs_table_rows.py 2, test_design_contract_rows.py 5).
  • 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 (exit 0).

Windows PowerShell 5.1.26100.9818 empirical reproduction

Ran a synthetic stand-in command printing 3 [d3d12-trace] lines to stderr and exiting 37, then parsed Boot + D3D12 with python -I tools/boot_trace.py $trace --d3d12 $log --json:

  • Pre-PR pipeline (... 2>&1 | ForEach-Object { $_.ToString() } | Out-File -LiteralPath $log -Width 4096 -Encoding utf8):
    • $ErrorActionPreference = 'Continue': PowerShell exited 0, $LASTEXITCODE = 37, 3 lines captured (135 bytes), boot_trace.py exited 0 (d3d12.calls = 3).
    • $ErrorActionPreference = 'Stop': PowerShell aborted (exit 1) on the first stderr line, no log was written (0 lines), boot_trace.py exited 2.
  • PR #668 pipeline (& { $ErrorActionPreference = 'Continue'; ... 2>&1 } | ForEach-Object { $_.ToString() } | Out-File ...):
    • Under 'Continue': PowerShell exited 0, $LASTEXITCODE = 37, $ErrorActionPreference remained Continue, 3 lines captured (135 bytes), boot_trace.py exited 0 (d3d12.calls = 3).
    • Under 'Stop': PowerShell exited 0, $LASTEXITCODE = 37, outer $ErrorActionPreference remained Stop, all 3 lines captured (135 bytes), and boot_trace.py exited 0 (d3d12.calls = 3).

AI-assisted: yes

**@⁠kirigayakazima** on GitHub · 2026-11-24 12:26 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/668#issuecomment-7131439811) 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 commit `4d470fd69b8fd415261b8283bc3bf31424d8bda5`. **Verdict: Looks good** — confirmed both the failure under `$ErrorActionPreference = 'Stop'` and that the scoped `& { $ErrorActionPreference = 'Continue' ... }` pipeline captures every stderr line cleanly while feeding `tools/boot_trace.py`. ### Checks run locally - Clean merge with `main` (`21625bca`): `git merge-tree --write-tree upstream/main HEAD` exited `0`; `git diff --check upstream/main...HEAD` clean. - Doc tests (`python -I`): all 13 files passed (`test_docs_cli_flags.py` 4, `test_docs_design_rows.py` 5, `test_docs_encoding.py` 1, `test_docs_env_vars.py` 4, `test_docs_links.py` 16, `test_docs_list_items.py` 3, `test_docs_pr_template.py` 2, `test_docs_python_deps.py` 3, `test_docs_repeated_lines.py` 2, `test_docs_repo_paths.py` 3, `test_docs_table_ids.py` 2, `test_docs_table_rows.py` 2, `test_design_contract_rows.py` 5). - `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 (exit `0`). ### Windows PowerShell `5.1.26100.9818` empirical reproduction Ran a synthetic stand-in command printing 3 `[d3d12-trace]` lines to `stderr` and exiting `37`, then parsed `Boot + D3D12` with `python -I tools/boot_trace.py $trace --d3d12 $log --json`: - **Pre-PR pipeline** (`... 2>&1 | ForEach-Object { $_.ToString() } | Out-File -LiteralPath $log -Width 4096 -Encoding utf8`): - `$ErrorActionPreference = 'Continue'`: PowerShell exited `0`, `$LASTEXITCODE = 37`, 3 lines captured (`135` bytes), `boot_trace.py` exited `0` (`d3d12.calls = 3`). - `$ErrorActionPreference = 'Stop'`: PowerShell aborted (`exit 1`) on the first stderr line, no log was written (`0` lines), `boot_trace.py` exited `2`. - **PR #668 pipeline** (`& { $ErrorActionPreference = 'Continue'; ... 2>&1 } | ForEach-Object { $_.ToString() } | Out-File ...`): - Under `'Continue'`: PowerShell exited `0`, `$LASTEXITCODE = 37`, `$ErrorActionPreference` remained `Continue`, 3 lines captured (`135` bytes), `boot_trace.py` exited `0` (`d3d12.calls = 3`). - Under `'Stop'`: PowerShell exited `0`, `$LASTEXITCODE = 37`, outer `$ErrorActionPreference` remained `Stop`, all 3 lines captured (`135` bytes), and `boot_trace.py` exited `0` (`d3d12.calls = 3`). AI-assisted: yes
This discussion has been locked. Commenting is limited to contributors.
No description provided.