Scripts: triage unknown D3D12.X slots and interfaces #557

Open
github-bot wants to merge 1 commit from github-bot/gh-557 into main AGit
Owner

@⁠wileyGray on GitHub · 2026-11-24 01:45 UTC · original
wileyGray:codex/d3d12-triage → main · +392 −0 · 5 files · 1 commits · open

Unknown D3D12.X slots and IIDs are spread across reports and first-call logs. This adds an offline triage command that groups observations and recovers log evidence when the JSON report is unusable, without inferring crash causes or changing dispatch.

What is in it

  • Dependency-free Python CLI with deterministic text/JSON, interface/layout identities, callers and incomplete-input warnings.
  • Report counts are aggregated; log lines never increase them.
  • 15 synthetic regressions in Windows CI, plus design and reproduction docs. Five files, 392 added lines.

Tested

  • Rebased head 0506c659935775e6fdce1210500c9a67c6cd482a on main b7aa9f3. Windows 11 Home build 26300; Intel i9-14900K; NVIDIA RTX 4080 SUPER driver 32.0.16.2114; Rust 1.93.0, DXC 1.9.2609.5, Python 3.13.9; debug build.
  • python -B -m unittest discover -s scripts -p test_triage_d3d12.py -v: 15 passed, 0 failed/skipped.
  • scripts/test.ps1 (workspace build + standard four-thread suite) at stack head 61abda9ce0f413db3d6adfa1540700f5b25c3032: 770 passed, 0 failed, 41 ignored; synthetic console-title e2e passed. Its Rust runtime/tests are identical to this PR's.
  • Passing totals include 4 GPU/debug skips and 33 sample-gated early returns, excluded from executed coverage. All XCL_SAMPLE_* unset.
  • Earlier pre-rebase parallel stalls match the deadlock described in #344; current main includes #443 and the rebased standard run completed.
  • Synthetic 100,000-line log: 0.164 s, one unique slot; offline parsing only. git diff --check: clean.

Regression run

  • Not required: scripts, CI and documentation only.

Not tested

  • Upstream CI still needs maintainer approval before jobs can run.
  • Retail titles, AMD/Intel adapters or gameplay. No proprietary data used.
  • Caller supplies matching report/log files; schema/logger drift can lose evidence. Unknown IIDs may be optional probes.

AI use

  • Codex (GPT-6; exact variant unavailable) implemented and reviewed the tool/tests, ran validation and wrote this description.
**@⁠wileyGray** on GitHub · 2026-11-24 01:45 UTC · [original](https://github.com/xcl-dev/xcl/pull/557) `wileyGray:codex/d3d12-triage` → `main` · +392 −0 · 5 files · 1 commits · open Unknown D3D12.X slots and IIDs are spread across reports and first-call logs. This adds an offline triage command that groups observations and recovers log evidence when the JSON report is unusable, without inferring crash causes or changing dispatch. **What is in it** - Dependency-free Python CLI with deterministic text/JSON, interface/layout identities, callers and incomplete-input warnings. - Report counts are aggregated; log lines never increase them. - 15 synthetic regressions in Windows CI, plus design and reproduction docs. Five files, 392 added lines. **Tested** - Rebased head `0506c659935775e6fdce1210500c9a67c6cd482a` on main `b7aa9f3`. Windows 11 Home build 26300; Intel i9-14900K; NVIDIA RTX 4080 SUPER driver 32.0.16.2114; Rust 1.93.0, DXC 1.9.2609.5, Python 3.13.9; debug build. - `python -B -m unittest discover -s scripts -p test_triage_d3d12.py -v`: 15 passed, 0 failed/skipped. - `scripts/test.ps1` (workspace build + standard four-thread suite) at stack head `61abda9ce0f413db3d6adfa1540700f5b25c3032`: 770 passed, 0 failed, 41 ignored; synthetic console-title e2e passed. Its Rust runtime/tests are identical to this PR's. - Passing totals include 4 GPU/debug skips and 33 sample-gated early returns, excluded from executed coverage. All XCL_SAMPLE_* unset. - Earlier pre-rebase parallel stalls match the deadlock described in #344; current main includes #443 and the rebased standard run completed. - Synthetic 100,000-line log: 0.164 s, one unique slot; offline parsing only. `git diff --check`: clean. **Regression run** - Not required: scripts, CI and documentation only. **Not tested** - Upstream CI still needs maintainer approval before jobs can run. - Retail titles, AMD/Intel adapters or gameplay. No proprietary data used. - Caller supplies matching report/log files; schema/logger drift can lose evidence. Unknown IIDs may be optional probes. **AI use** - Codex (GPT-6; exact variant unavailable) implemented and reviewed the tool/tests, ran validation and wrote this description.
Recover unknown-slot and IID evidence from report.json or matching first-call logs. Preserve layout variants and callers without counting log lines as additional calls. Add synthetic regressions and Windows CI coverage.

Assisted-by: Codex (GPT-6; exact variant unavailable)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:25:40 +00:00
Author
Owner

@⁠chaseb64 on GitHub · 2026-11-25 05:26 UTC · original

I ran the triage script on synthetic input at 0506c65. The runtime emits ID3D12PipelineState(console)::#N and ID3D12GraphicsCommandList(console)::#N, but the parser warns and drops both names.

To reproduce, save this as report.json:

{"called_stubs":[{"dll":"d3d12_xs.dll","function":"ID3D12PipelineState(console)::#9","calls":1,"first_caller":"synthetic.exe+0x10"}],"d3d12":{"unknown_iids":[]}}

Save this as xcl.log:

[12:34:56 WARN] [STUB] d3d12_xs.dll!ID3D12GraphicsCommandList(console)::#70 first called from synthetic.exe+0x10 -> returning 0x0

Run python3 scripts/triage_d3d12.py report.json --log xcl.log --json. I get an unrecognized-name warning and an empty slots array. Preserving (console) in the interface name keeps both observations distinct from unqualified slots. I can share the locally prepared patch and regression if helpful. All 16 triage tests passed with the patch on macOS arm64 and Python 3.9.6.

AI-assisted using OpenAI Codex (GPT-6.2 Sol for implementation, reproduction and transfer verification, GPT-6.2 Astra for independent review, and GPT-6 Luna for prior combined validation).

**@⁠chaseb64** on GitHub · 2026-11-25 05:26 UTC · [original](https://github.com/xcl-dev/xcl/pull/557#issuecomment-7153768598) I ran the triage script on synthetic input at `0506c65`. The runtime emits `ID3D12PipelineState(console)::#N` and `ID3D12GraphicsCommandList(console)::#N`, but the parser warns and drops both names. To reproduce, save this as `report.json`: ```json {"called_stubs":[{"dll":"d3d12_xs.dll","function":"ID3D12PipelineState(console)::#9","calls":1,"first_caller":"synthetic.exe+0x10"}],"d3d12":{"unknown_iids":[]}} ``` Save this as `xcl.log`: ```text [12:34:56 WARN] [STUB] d3d12_xs.dll!ID3D12GraphicsCommandList(console)::#70 first called from synthetic.exe+0x10 -> returning 0x0 ``` Run `python3 scripts/triage_d3d12.py report.json --log xcl.log --json`. I get an unrecognized-name warning and an empty `slots` array. Preserving `(console)` in the interface name keeps both observations distinct from unqualified slots. I can share the locally prepared patch and regression if helpful. All 16 triage tests passed with the patch on macOS arm64 and Python 3.9.6. AI-assisted using OpenAI Codex (GPT-6.2 Sol for implementation, reproduction and transfer verification, GPT-6.2 Astra for independent review, and GPT-6 Luna for prior combined validation).
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 13:30 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 13:30 UTC · [original](https://github.com/xcl-dev/xcl/pull/557#issuecomment-7163874672) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Author
Owner

@⁠RavenCurseBurg on GitHub · 2026-11-25 19:05 UTC · original · edited 2026-11-25 19:11 UTC

Tested the offline CLI on 0506c659935775e6fdce1210500c9a67c6cd482a with Windows 11 build 26100.9711, i7-13700 and Python 3.14.3.

I ran python -B scripts/triage_d3d12.py report.json --log xcl.log in text and --json modes. The inputs had a UTF-8 BOM, mixed CRLF/LF, no final log newline, Unicode callers, both arrow spellings, and the same interface/slot number on two DLLs. I repeated the runs in reverse record order and with redirected output using PYTHONIOENCODING=utf-8, cp1252 and cp936.

  • All 12 combinations produced byte-identical output within each format. The two report records for the XS DLL totaled 5 calls. Repeated log lines added evidence without increasing that count. The other DLL retained its separate count of 7, and one normalized IID had both sources.
  • With a truncated report and an invalid UTF-8 byte in the log, all three redirected JSON runs retained the valid caller and IID as log-only evidence, reported an unknown call count and emitted both warnings.
  • python -B -m unittest discover -s scripts -p test_triage_d3d12.py passed all 15 tests.

These cases used ordinary interface names, separately from the console-qualified names reported earlier. No real title, runtime or GPU run. OpenAI Codex (GPT-6) prepared the synthetic inputs and ran the checks.

**@⁠RavenCurseBurg** on GitHub · 2026-11-25 19:05 UTC · [original](https://github.com/xcl-dev/xcl/pull/557#issuecomment-7171808382) · edited 2026-11-25 19:11 UTC Tested the offline CLI on `0506c659935775e6fdce1210500c9a67c6cd482a` with Windows 11 build 26100.9711, i7-13700 and Python 3.14.3. I ran `python -B scripts/triage_d3d12.py report.json --log xcl.log` in text and `--json` modes. The inputs had a UTF-8 BOM, mixed CRLF/LF, no final log newline, Unicode callers, both arrow spellings, and the same interface/slot number on two DLLs. I repeated the runs in reverse record order and with redirected output using `PYTHONIOENCODING=utf-8`, `cp1252` and `cp936`. - All 12 combinations produced byte-identical output within each format. The two report records for the XS DLL totaled 5 calls. Repeated log lines added evidence without increasing that count. The other DLL retained its separate count of 7, and one normalized IID had both sources. - With a truncated report and an invalid UTF-8 byte in the log, all three redirected JSON runs retained the valid caller and IID as log-only evidence, reported an unknown call count and emitted both warnings. - `python -B -m unittest discover -s scripts -p test_triage_d3d12.py` passed all 15 tests. These cases used ordinary interface names, separately from the console-qualified names reported earlier. No real title, runtime or GPU run. OpenAI Codex (GPT-6) prepared the synthetic inputs and ran the checks.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/557/head:github-bot/gh-557'
git switch 'github-bot/gh-557'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-557'
git switch 'github-bot/gh-557'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-557'
git switch 'github-bot/gh-557'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-557'
git switch 'main'
git merge --squash 'github-bot/gh-557'
git switch 'main'
git merge --ff-only 'github-bot/gh-557'
git switch 'main'
git merge 'github-bot/gh-557'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.