tools/startup: add redacted 1-run telemetry summarizer (triage_run.py) #1457
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1464"
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-24T11:58:20Z.
Add
tools/startup/triage_run.py, a zero-dependency Python 3 CLI tool that summarizes a startup log directory (and optional--shader-cache DIR) into a path-redacted, address-redacted, title-neutral Markdown report for issue triage.What it summarizes
Device::slot70memory SRV refusals grouped by(reason, dim, fmt, view_dim, view_fmt, layout, flags)(stripping raw guest addresses and pointers)x2w-d3d12/x2w-trap/x2w-noopcalls andx2w-d3d12-debugmessagesx2w-dstoragefailure outcomes, entry/OpenFile/zlib failures, andStatusArray::GetHResult/EnqueueSignalHRESULT countsx2w-runtime/x2w-apifailing methods and HRESULTsX2W_SHADER_CACHE.failUnsupported(...)/fxcreasons when--shader-cacheis suppliedStrict redaction
Redacts Windows drive/UNC paths, POSIX local paths,
*.exefilenames, and 64-bit hex addresses (0x[0-9a-fA-F]{9,}).Verification
python3 -B tests/startup_triage_run_check.py(0 failed),python3 -B tests/docs_links_check.py,python3 -B tests/bidi_controls_check.py,git diff --check origin/main..HEADstartup_triage_run) and.github/workflows/windows.ymlPython checks wired; Win2025 verification pending.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T12:02:50Z.
Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
c44bd0ad785cc4a01110bd05360710fdf3a498f0:--preset dev):cmake --build --preset dev -- -j 6):103.03s(configure1.70s)ctest --preset dev -R '^startup_triage_run$' --parallel 4 --no-tests=error --output-on-failure): 1/1 passed (0.23s:startup_triage_run0.16s)/O2(--preset release):cmake --build --preset release -- -j 6):125.84s(configure1.74s)ctest --preset release -R '^startup_triage_run$' --parallel 4 --no-tests=error --output-on-failure): 1/1 passed (0.24s:startup_triage_run0.16s)sccache: 550/860 hits; wall238.4sImported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T12:10:21Z.
Review: COMMENTED
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
c44bd0ad78ℹ️ 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-24T12:16:29Z.
Review: COMMENTED
No description provided.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T12:16:33Z.
Review: COMMENTED
No description provided.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T12:16:37Z.
Review: COMMENTED
No description provided.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T12:17:34Z.
Review: CHANGES_REQUESTED
The summary is described as ready for a public issue, but it still emits arbitrary debug text, shader failure lines and several untyped field values. Regex redaction cannot establish that those strings contain only public evidence. Please make the default report allowlist structured values such as known reasons, numeric format categories, counts, diagnostic IDs and status codes, grouping unknown text without copying it. Add a synthetic control with a bare private module name, an unprefixed address, an opaque object name and a Markdown link. Keep raw snippets local.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T12:43:52Z.
Review: APPROVED
The allowlist export passes the synthetic privacy tests. I added controls for a long numeral in a slot field and an address-shaped value in a status field. Both are omitted. Short and correctly sign-extended HRESULTs still combine. The triage, docs links, and bidi checks passed.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T12:10:26Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
c44bd0aℹ️ 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 tedin7 on 2026-11-24T12:26:13Z.
Fixed in
71ec5842ed: the report is now allowlist-only. It copies just known slot70 reasons and dstorage outcomes, decimal IDs and counts, hex HRESULT/format/flag codes, slot numbers, trap tags, and shader-failure categories (for mnemonics only the family prefix, e.g.v_*). Debug messages are reduced to severity/ID counts, with no context or message text. View-skipped, device-removed, entry-failed, OpenFile and runtime rows no longer carry free text, module names or object prefixes. Anything unrecognised is grouped asother (text omitted). The default redaction regexes are removed, and the docs now describe the allowlist contract.New synthetic control in
tests/startup_triage_run_check.pycovers a bare private module name, an unprefixed address, an opaque object name, a Markdown link, and free-form debug/dstorage/shader text; none of it appears in the output.Local: startup_triage_run_check, docs_links_check, bidi_controls_check,
git diff --checkand preflight pass. Windows Server 2025: Debug and Release /O2startup_triage_run1/1 passed.Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T12:10:21Z.
Code review location:
tools/startup/triage_run.py; line 34For a shader
.failline such asfxc ps: C:\Users\Alice Smith\PrivateTitle\shader.hlsl(1,1): error X3000, this regex stops at the first space, leaving<path> Smith\PrivateTitle\shader.hlsl(1,1): error X3000in the report.gfx2hlsl.translate_to()writes compiler stderr verbatim into these files, so a cache path containing spaces can expose personal and title-specific directories in the supposedly path-redacted, title-neutral report intended for public issues. Redact the whole diagnostic path rather than only its first whitespace-delimited fragment.AGENTS.md reference: AGENTS.md:L23-L24
Useful? React with 👍 / 👎.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T12:10:21Z.
Code review location:
tools/startup/triage_run.py; line 459For directories produced by
run.ps1/debug_launch.py,stderr.txtandtrap.logcontain the same telemetry: the launcher setsX2W_TRAP_LOGwhile capturing stderr, and the shared and component loggers write each message to both destinations. Concatenating every discovered file therefore doubles the event counts; a synthetic run with one failed DirectStorage request mirrored in those two standard files reports two failures. Select a canonical stream per run or reconcile the mirrored sources while preserving genuine repeated calls.Useful? React with 👍 / 👎.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T12:10:21Z.
Code review location:
tools/startup/triage_run.py; line 200For a successful forwarded
Device::slot13(CheckFeatureSupport) call, the log emitted byforward_slot()still matches this fallback and incrementsd3d12_unhandled. The same happens for successfulcreate_slot()calls. These methods are wired to real desktop implementations insrc/startup_stubs/d3d12_xs_device.cpp, so normal implemented operations inflate the unhandled/stubbed report and can displace actual refusals in the limited table. Only add messages establishing unhandled or stubbed behavior here, or report ordinary slot telemetry separately.Useful? React with 👍 / 👎.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T12:16:29Z.
Code review location:
tools/startup/triage_run.py; line 34Fixed in
bf1b5b86: Unquoted diagnostic paths now redact whole directory components containing spaces (Windows and POSIX), so the full path is replaced; regression covers C:\Users\Alice Smith... and C:\Program Files\My App\shader.hlsl. Win2025 Debug and Release /O2: startup_triage_run 1/1 passed.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T12:16:33Z.
Code review location:
tools/startup/triage_run.py; line 459Fixed in
bf1b5b86: trap.log lines already present in the sibling stderr.txt are now skipped once each; genuine repeats beyond stderr.txt still count. Regression: one mirrored failure reports 1, a repeated one reports 2. Win2025 Debug and Release /O2: startup_triage_run 1/1 passed.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T12:16:37Z.
Code review location:
tools/startup/triage_run.py; line 200Fixed in
bf1b5b86: Forwarded/created slot lines ending in a successful result are no longer added to the unhandled table; failed results and untraced slot calls still are. Regression covers success, failure and untraced lines. Win2025 Debug and Release /O2: startup_triage_run 1/1 passed.