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

Open
wileyGray wants to merge 1 commit from upstream-pr/557 into main
wileyGray commented 2026-11-24 01:45:31 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by wileyGray on 2026-11-24T01:45:31Z.


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.
<!-- greyfinch-sync:ivall/xcl:issue:5464496286 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/557). Originally posted by [wileyGray](https://github.com/wileyGray) on 2026-11-24T01:45:31Z. --- 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.
chaseb64 commented 2026-11-25 06:05:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by chaseb64 on 2026-11-25T05:26:13Z.


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).

<!-- greyfinch-sync:ivall/xcl:comment:7153768598 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/557#issuecomment-7153768598). Originally posted by [chaseb64](https://github.com/chaseb64) on 2026-11-25T05:26:13Z. --- 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).
DavidM1911 commented 2026-11-25 14:10:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T13:30:24Z.


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!

<!-- greyfinch-sync:ivall/xcl:comment:7163874672 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/557#issuecomment-7163874672). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T13:30:24Z. --- 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!
RavenCurseBurg commented 2026-11-25 19:09:19 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by RavenCurseBurg on 2026-11-25T19:05:33Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7171808382 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/557#issuecomment-7171808382). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T19:05:33Z. --- 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.
github-actions[bot] commented 2026-11-30 08:39:23 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-30T08:39:23Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7273178540 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/557#issuecomment-7273178540). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-30T08:39:23Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 03:42:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T03:42:42Z.


Triage (#1607) – head 0506c65

#566 is stacked on this PR (same author, its first commit is this one), so the shared lines are not a duplicate. Main has no scripts/triage_d3d12.py.
Problem in scripts/triage_d3d12.py: the SLOT regex requires I<Name>::#<n>, but main also names D3D12.X stubs ID3D12PipelineState(console)::#i, ID3D12GraphicsCommandList(console)::#i (console_list.rs) and ID3D12PipelineState(stand-in)::#i (standin.rs). Those never match, are dropped from slots, and only add the warning "Unrecognized D3D12.X slot name", so any report with a console-list stub is reported as incomplete.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7299986344 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/557#issuecomment-7299986344). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T03:42:42Z. --- **Triage (#1607)** – head 0506c65 #566 is stacked on this PR (same author, its first commit is this one), so the shared lines are not a duplicate. Main has no `scripts/triage_d3d12.py`. Problem in `scripts/triage_d3d12.py`: the `SLOT` regex requires `I<Name>::#<n>`, but main also names D3D12.X stubs `ID3D12PipelineState(console)::#i`, `ID3D12GraphicsCommandList(console)::#i` (`console_list.rs`) and `ID3D12PipelineState(stand-in)::#i` (`standin.rs`). Those never match, are dropped from `slots`, and only add the warning "Unrecognized D3D12.X slot name", so any report with a console-list stub is reported as incomplete. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/557:upstream-pr/557'
git switch 'upstream-pr/557'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/557'
git switch 'upstream-pr/557'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/557'
git switch 'upstream-pr/557'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/557'
git switch 'main'
git merge --squash 'upstream-pr/557'
git switch 'main'
git merge --ff-only 'upstream-pr/557'
git switch 'main'
git merge 'upstream-pr/557'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!552
No description provided.