tooling: report compute dispatch refusals in triage summary #3384

Merged
triggered02 merged 3 commits from upstream-pr/3384 into main 2026-11-29 17:42:41 +00:00
triggered02 commented 2026-11-28 17:24:38 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-28T17:24:38Z.


Refs #3381

Adds an allowlisted compute Dispatch section to tools/startup/triage_run.py. The shareable summary previously omitted the current first blocker of a startup run.

  • Counts x2w-draw compute ... refused: <reason> by the fixed reason literals in src/startup_stubs/d3d12_compute_dispatch.inl; unknown text becomes other (text omitted).
  • Reports the maximum cumulative x2w-render compute dispatches: totals: translated, refused, no translation, not modelled and builder gate refused.
  • Program keys, group counts, addresses, descriptor words and paths are never copied into the report.

Verification (Debian x64, Python 3.12, standard library only):

  • python3 -B tests/startup_triage_run_check.py -> startup triage_run checks: 0 failed (known reason, unknown reason, mirrored trap.log deduplication, per-bucket totals, negative control, redaction).
  • python3 -B tests/startup_triage_run_cli_check.py -> 8 tests OK.
  • On a local 180 s startup log the new section reports 16 refusals of an input is in a placed buffer that does not alias title memory with totals 0 translated / 2942 refused; a grep of the report for the program key, descriptor address and host paths returned 0 matches.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5542771797 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3384). Originally posted by [triggered02](https://github.com/triggered02) on 2026-11-28T17:24:38Z. --- Refs #3381 Adds an allowlisted compute Dispatch section to `tools/startup/triage_run.py`. The shareable summary previously omitted the current first blocker of a startup run. - Counts `x2w-draw compute ... refused: <reason>` by the fixed reason literals in `src/startup_stubs/d3d12_compute_dispatch.inl`; unknown text becomes `other (text omitted)`. - Reports the maximum cumulative `x2w-render compute dispatches:` totals: translated, refused, no translation, not modelled and builder gate refused. - Program keys, group counts, addresses, descriptor words and paths are never copied into the report. Verification (Debian x64, Python 3.12, standard library only): - `python3 -B tests/startup_triage_run_check.py` -> `startup triage_run checks: 0 failed` (known reason, unknown reason, mirrored trap.log deduplication, per-bucket totals, negative control, redaction). - `python3 -B tests/startup_triage_run_cli_check.py` -> 8 tests OK. - On a local 180 s startup log the new section reports 16 refusals of `an input is in a placed buffer that does not alias title memory` with totals 0 translated / 2942 refused; a grep of the report for the program key, descriptor address and host paths returned 0 matches. AI-assisted (Claude Code).
chatgpt-codex-connector[bot] commented 2026-11-28 17:24:46 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-28T17:24:46Z.


Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-28T17:24:42.287913Z
We couldn’t complete this review. Comment @codex review to try again.
ce63461 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7242996128 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3384#issuecomment-7242996128). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-11-28T17:24:46Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"ce63461ed9b93b045514ae58eecf1ac73aaeb39a","has_any_findings":true,"has_unresolved_findings":true,"status":"failed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ❌ Failed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ❌ **Failed** <relative-time datetime="2026-11-28T17:24:42.287913Z">2026-11-28T17:24:42.287913Z</relative-time><br/>We couldn’t complete this review. Comment `@codex review` to try again. | `ce63461` | PR opened | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review" or "@codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
chatgpt-codex-connector[bot] commented 2026-11-28 17:24:49 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-28T17:24:49Z.


You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7242996666 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3384#issuecomment-7242996666). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-11-28T17:24:49Z. --- You have reached your Codex usage limits for code reviews. You can see your limits in the [Codex usage dashboard](https://chatgpt.com/codex/cloud/settings/usage). To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your [settings](https://chatgpt.com/settings/code-review).
Leyukaka commented 2026-11-28 18:17:09 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-28T18:17:09Z.

Review: CHANGES_REQUESTED


Reviewed ce63461e by its diff. Request changes.

The allowlist misses many reasons that reach the Dispatch(...) refused: line. On main f2972840, bind refusals from compute_root_srv_buffer, compute_token_output / volume_uav_range_error and record_translated_dispatch in d3d12_compute_dispatch.inl, and from indirect_table_buffer in src/startup_stubs/d3d12_draw.inl (for example lines 2566 and 2598), are not in COMPUTE_DISPATCH_REASONS; neither are the manifest reasons that come through tr->unmodelled. Examples: an output UAV interval is unaligned, oversized or outside its buffer, an output token's backing does not uniquely alias its guest byte interval, an input view token is not a buffer view of a desktop resource. Two listed strings are not refusals on main: zeros for a null descriptor is an input-source label (line 800), and an output texture view is not 1D is an output texture view or resource is not 1D there.

The line is printed for the first 16 bind refusals and the first 16 untranslated or unmodelled dispatches per process, and not for indirect dispatches (d3d12_compute_dispatch.inl:972-975), so the table counts log lines, not dispatches. In a 600 s and a 900 s start-up run here, 9 and 7 of the 32 refused lines carry a reason missing from the set and would show as other (text omitted). The four largest compute census reason entries after no translation in both runs (1,146,106, 831,790, 547,723 and 356,938 dispatches at 900 s) are reasons missing from the set.

Fix: in the test, check that every reason literal of these functions is in the set, so a new reason fails the test instead of folding into other; drop or correct the two stale entries.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6099514409 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3384#pullrequestreview-6099514409). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-28T18:17:09Z. **Review:** CHANGES_REQUESTED --- Reviewed `ce63461e` by its diff. Request changes. **The allowlist misses many reasons that reach the `Dispatch(...) refused:` line.** On `main` `f2972840`, bind refusals from `compute_root_srv_buffer`, `compute_token_output` / `volume_uav_range_error` and `record_translated_dispatch` in `d3d12_compute_dispatch.inl`, and from `indirect_table_buffer` in `src/startup_stubs/d3d12_draw.inl` (for example lines 2566 and 2598), are not in `COMPUTE_DISPATCH_REASONS`; neither are the manifest reasons that come through `tr->unmodelled`. Examples: `an output UAV interval is unaligned, oversized or outside its buffer`, `an output token's backing does not uniquely alias its guest byte interval`, `an input view token is not a buffer view of a desktop resource`. Two listed strings are not refusals on `main`: `zeros for a null descriptor` is an input-source label (line 800), and `an output texture view is not 1D` is `an output texture view or resource is not 1D` there. **The line is printed for the first 16 bind refusals and the first 16 untranslated or unmodelled dispatches per process, and not for indirect dispatches** (`d3d12_compute_dispatch.inl:972-975`), so the table counts log lines, not dispatches. In a 600 s and a 900 s start-up run here, 9 and 7 of the 32 refused lines carry a reason missing from the set and would show as `other (text omitted)`. The four largest `compute census reason` entries after `no translation` in both runs (1,146,106, 831,790, 547,723 and 356,938 dispatches at 900 s) are reasons missing from the set. Fix: in the test, check that every reason literal of these functions is in the set, so a new reason fails the test instead of folding into `other`; drop or correct the two stale entries.
KelboLive commented 2026-11-28 20:34:50 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-28T20:34:50Z.

Review: APPROVED


LGTM — useful addition to the triage tool.

Adds compute dispatch refusal tracking to triage_run.py. Defines COMPUTE_DISPATCH_REASONS allowlist for known first-refusal reasons; unknown reasons are bucketed as OTHER without copying private text (keys, addresses, descriptors) into the report. Parses cumulative x2w-render compute dispatches: totals and takes per-bucket maxima across snapshots. New report section ### Compute Dispatch Refusals with markdown table. Test covers known reasons, OTHER bucket, privacy, negative control, and deduplication with trap.log.

Ready to land.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6099979711 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3384#pullrequestreview-6099979711). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-28T20:34:50Z. **Review:** APPROVED --- LGTM — useful addition to the triage tool. Adds compute dispatch refusal tracking to triage_run.py. Defines COMPUTE_DISPATCH_REASONS allowlist for known first-refusal reasons; unknown reasons are bucketed as OTHER without copying private text (keys, addresses, descriptors) into the report. Parses cumulative `x2w-render compute dispatches:` totals and takes per-bucket maxima across snapshots. New report section `### Compute Dispatch Refusals` with markdown table. Test covers known reasons, OTHER bucket, privacy, negative control, and deduplication with trap.log. Ready to land.
KelboLive commented 2026-11-28 21:57:08 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-28T21:57:08Z.

Review: APPROVED


LGTM — useful addition to the triage tool.

Adds compute dispatch refusal tracking to triage_run.py. Defines COMPUTE_DISPATCH_REASONS allowlist for known first-refusal reasons; unknown reasons are bucketed as OTHER without copying private text (keys, addresses, descriptors) into the report. Parses cumulative x2w-render compute dispatches: totals and takes per-bucket maxima across snapshots. New report section ### Compute Dispatch Refusals with markdown table. Test covers known reasons, OTHER bucket, privacy, negative control, and deduplication with trap.log.

Ready to land.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6100253091 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3384#pullrequestreview-6100253091). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-28T21:57:08Z. **Review:** APPROVED --- LGTM — useful addition to the triage tool. Adds compute dispatch refusal tracking to triage_run.py. Defines COMPUTE_DISPATCH_REASONS allowlist for known first-refusal reasons; unknown reasons are bucketed as OTHER without copying private text (keys, addresses, descriptors) into the report. Parses cumulative `x2w-render compute dispatches:` totals and takes per-bucket maxima across snapshots. New report section `### Compute Dispatch Refusals` with markdown table. Test covers known reasons, OTHER bucket, privacy, negative control, and deduplication with trap.log. Ready to land.
Leyukaka commented 2026-11-29 04:01:10 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T04:01:10Z.

Review: APPROVED


Approve at e44093d8. Reviewed by reading the diff against ce63461e and main 212d4b5f; nothing was built or run here. The first commit (9b07999c) is the same patch as ce63461e, rebased.

  • COMPUTE_DISPATCH_REASONS (tools/startup/triage_run.py:69-200) now holds 130 strings. All 130 occur as literals on main: 111 in src/startup_stubs/d3d12_compute_dispatch.inl, 19 in indirect_table_buffer (d3d12_draw.inl:2511-2654). The reasons of compute_root_srv_buffer, compute_token_output, volume_uav_range_error, record_translated_dispatch and load_compute_translation are covered. The one refusal literal of these functions left out, typed input range is not dword aligned (d3d12_draw.inl:2640), needs alignment == 4; the compute calls (d3d12_compute_dispatch.inl:794, :939, :1131) use 16.
  • The two stale entries are gone: zeros for a null descriptor and the snapshot label are no longer listed, and an output texture view is not 1D became an output texture view or resource is not 1D.
  • The section header is now ### Compute Dispatch Refusals (logged lines, capped per process) (tools/startup/triage_run.py:896), which matches the 16-line caps and the indirect exclusion at d3d12_compute_dispatch.inl:990-992.
  • check_allowlist_covers_source_reasons (tests/startup_triage_run_check.py:367, called at :796) scans both sources and fails when a matching literal is missing from the set. The file runs as CTest startup_triage_run (CMakeLists.txt:5285-5286) and in the Linux Python job (.github/workflows/windows.yml:327); both jobs pass at e44093d8.

Not blocking:

  • The scan only picks up literals that start with one of the words in reason_start (tests/startup_triage_run_check.py:376-380), so a new reason starting with another word (typed, descriptor, ...) would still fall into other (text omitted) without failing the test.
  • The test checks one direction only. Apart from the two named stale strings (:432), a set entry that no longer exists in the source is not detected.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6101329720 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3384#pullrequestreview-6101329720). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T04:01:10Z. **Review:** APPROVED --- Approve at `e44093d8`. Reviewed by reading the diff against `ce63461e` and main `212d4b5f`; nothing was built or run here. The first commit (`9b07999c`) is the same patch as `ce63461e`, rebased. - `COMPUTE_DISPATCH_REASONS` (`tools/startup/triage_run.py:69-200`) now holds 130 strings. All 130 occur as literals on main: 111 in `src/startup_stubs/d3d12_compute_dispatch.inl`, 19 in `indirect_table_buffer` (`d3d12_draw.inl:2511-2654`). The reasons of `compute_root_srv_buffer`, `compute_token_output`, `volume_uav_range_error`, `record_translated_dispatch` and `load_compute_translation` are covered. The one refusal literal of these functions left out, `typed input range is not dword aligned` (`d3d12_draw.inl:2640`), needs `alignment == 4`; the compute calls (`d3d12_compute_dispatch.inl:794`, `:939`, `:1131`) use 16. - The two stale entries are gone: `zeros for a null descriptor` and the snapshot label are no longer listed, and `an output texture view is not 1D` became `an output texture view or resource is not 1D`. - The section header is now `### Compute Dispatch Refusals (logged lines, capped per process)` (`tools/startup/triage_run.py:896`), which matches the 16-line caps and the indirect exclusion at `d3d12_compute_dispatch.inl:990-992`. - `check_allowlist_covers_source_reasons` (`tests/startup_triage_run_check.py:367`, called at `:796`) scans both sources and fails when a matching literal is missing from the set. The file runs as CTest `startup_triage_run` (`CMakeLists.txt:5285-5286`) and in the Linux Python job (`.github/workflows/windows.yml:327`); both jobs pass at `e44093d8`. Not blocking: - The scan only picks up literals that start with one of the words in `reason_start` (`tests/startup_triage_run_check.py:376-380`), so a new reason starting with another word (`typed`, `descriptor`, ...) would still fall into `other (text omitted)` without failing the test. - The test checks one direction only. Apart from the two named stale strings (`:432`), a set entry that no longer exists in the source is not detected.
pigalot commented 2026-11-29 13:36:27 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by pigalot on 2026-11-29T13:36:27Z.

Review: CHANGES_REQUESTED


Independently reviewed e44093d8 integrated over main 17b662a2 (tree b70be32b). Request changes: two reproducible problems, both small.

The trial merge is clean and git diff --check is clean. I read the two rules against the log statements they parse (src/startup_stubs/d3d12_compute_dispatch.inl:1084 and src/startup_stubs/d3d12_xs_device.cpp:7833) and ran the Python checks on the merged tree and on the head alone. This is tooling only, so nothing was built and no title run was requested.

1. Merged over current main, the PR's own test fails.
python -B tests/startup_triage_run_check.py on the trial merge prints

FAIL source reasons missing from COMPUTE_DISPATCH_REASONS: 'a content view token is not readable', 'a whole copied output UAV requires X2W_COPIED_OBJECT_UAV', 'an MTBUF byte window requires a buffer SRV', 'an MTBUF byte window requires identity DST_SEL', 'an MTBUF byte window requires identity component mapping', 'an input buffer view token names a committed buffer', "an input buffer view token's buffer is placed on another device", "an input buffer view token's placed buffer is not indexed at its range", 'an output UAV covers only part of a copied placement', 'an output packed D16 buffer format does not support typed UAV stores', 'an output packed D16 buffer is not element-aligned in its resource', 'an output packed D16 buffer range is over 16 MiB'
startup triage_run checks: 1 failed

On the head alone (merge base 212d4b5f) the same command prints startup triage_run checks: 0 failed. main gained these 12 literals after the merge base (for example in 7aa09ec0, 80952189, 647db688, 19bf3cab and d13a3353). The branch has no textual conflict, so GitHub shows it as mergeable and the checks on e44093d8 are green, but merging it as it stands would turn the startup_triage_run CTest and the Linux Python job red on main. Please merge or rebase onto current main and add the 12 strings.

This is the source scan doing what it was added for. It also means every later PR that adds a refusal literal to d3d12_compute_dispatch.inl or indirect_table_buffer must touch tools/startup/triage_run.py too; a sentence saying so in the comment above COMPUTE_DISPATCH_REASONS would help the next author who hits it.

2. The totals rule does not match the line the runtime prints.
RE_COMPUTE_TOTALS ends in builder gate refused (\d{1,19})\s*$. The log statement at d3d12_xs_device.cpp:7833 continues after that number:

x2w-render compute dispatches: translated %ld, refused %ld, no translation %ld, not modelled %ld, builder gate refused %ld; placed inputs from a GPU copy %ld, from a title snapshot %ld (%ld KiB)

The suffix is already there at the PR's merge base. Filling that format string with integers and passing the line to triage_run.summarize_lines gives compute_totals: None, on the head alone and on the trial merge, so the cumulative row is never printed for a real log. The fixtures in tests/startup_triage_run_check.py use a shortened line that stops at builder gate refused N, which is why the test passes. I could not reproduce the "0 translated / 2942 refused" totals from the description with this regex and this format string; if your local log comes from a build with a different line, say which.

Suggested direction: drop the \s*$ anchor (or accept ; after the last number) and make the fixture lines carry the real suffix. Dropping the anchor is mutant M12 below; it passes the present tests, so the fixture change is what pins it.

Mutants (each applied to tools/startup/triage_run.py at the head, then tests/startup_triage_run_check.py and tests/startup_triage_run_cli_check.py; file restored and git diff --quiet checked afterwards):

Killed (7):

  • M1 count any reason text under its own name (allowlist bypass): leaked 'alice' in report.
  • M2 totals max -> min, and M3 last snapshot wins: compute totals did not take per-bucket maxima.
  • M4 remove 'no translation' from the set: compute refusal counts wrong.
  • M5 remove 'manifest version' (not used by any fixture): caught by the source scan.
  • M6 re-add 'an output texture view is not 1D': stale reason still allowlisted.
  • M10 reverse the totals header columns: missing expected summary line.

Surviving (5):

  • M12 totals regex without the \s*$ anchor. See finding 2.
  • M8 print the section only when refusal lines exist (if compute:). No fixture has totals without refusal lines.
  • M7 drop .strip() on the reason. Not equivalent: with CRLF line ends the reason would keep the \r and fall into other. The fixtures only use \n. (CRLF input does work at the head; I checked it by hand.)
  • M11 key pattern [0-9a-fA-F]{16} -> \S+. No fixture has a near-miss line.
  • M9 remove the continue after a refusal line. Probably equivalent, since I found no later rule that matches this line, but I did not prove it.

Equivalent: none shown.

M7, M8, M9 and M11 are not blocking. The two notes in the approval on this head (the reason_start word list, and the one-directional check) still stand and are not blocking either.

Hard-rule screen: no game files or dumps, wording is title-neutral, one behaviour, no test weakened, the new section has a negative control (the rule replaced by (?!)), title form is fine. The privacy property holds as far as tested: an unknown reason, the program key and the Dispatch(...) arguments do not reach the report.

Environment: Windows 11 25H2 build 26200.9974; Python 3.12.10. No GPU tests.
CI: Build and test on Windows and Run platform-independent Python checks on Linux pass on e44093d8; those runs are from 03:27Z on 2026-11-29 and do not cover main 17b662a2, where finding 1 reproduces locally.

This reply was AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6103108335 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3384#pullrequestreview-6103108335). Originally posted by [pigalot](https://github.com/pigalot) on 2026-11-29T13:36:27Z. **Review:** CHANGES_REQUESTED --- Independently reviewed `e44093d8` integrated over `main` `17b662a2` (tree `b70be32b`). Request changes: two reproducible problems, both small. The trial merge is clean and `git diff --check` is clean. I read the two rules against the log statements they parse (`src/startup_stubs/d3d12_compute_dispatch.inl:1084` and `src/startup_stubs/d3d12_xs_device.cpp:7833`) and ran the Python checks on the merged tree and on the head alone. This is tooling only, so nothing was built and no title run was requested. **1. Merged over current `main`, the PR's own test fails.** `python -B tests/startup_triage_run_check.py` on the trial merge prints ``` FAIL source reasons missing from COMPUTE_DISPATCH_REASONS: 'a content view token is not readable', 'a whole copied output UAV requires X2W_COPIED_OBJECT_UAV', 'an MTBUF byte window requires a buffer SRV', 'an MTBUF byte window requires identity DST_SEL', 'an MTBUF byte window requires identity component mapping', 'an input buffer view token names a committed buffer', "an input buffer view token's buffer is placed on another device", "an input buffer view token's placed buffer is not indexed at its range", 'an output UAV covers only part of a copied placement', 'an output packed D16 buffer format does not support typed UAV stores', 'an output packed D16 buffer is not element-aligned in its resource', 'an output packed D16 buffer range is over 16 MiB' startup triage_run checks: 1 failed ``` On the head alone (merge base `212d4b5f`) the same command prints `startup triage_run checks: 0 failed`. `main` gained these 12 literals after the merge base (for example in `7aa09ec0`, `80952189`, `647db688`, `19bf3cab` and `d13a3353`). The branch has no textual conflict, so GitHub shows it as mergeable and the checks on `e44093d8` are green, but merging it as it stands would turn the `startup_triage_run` CTest and the Linux Python job red on `main`. Please merge or rebase onto current `main` and add the 12 strings. This is the source scan doing what it was added for. It also means every later PR that adds a refusal literal to `d3d12_compute_dispatch.inl` or `indirect_table_buffer` must touch `tools/startup/triage_run.py` too; a sentence saying so in the comment above `COMPUTE_DISPATCH_REASONS` would help the next author who hits it. **2. The totals rule does not match the line the runtime prints.** `RE_COMPUTE_TOTALS` ends in `builder gate refused (\d{1,19})\s*$`. The log statement at `d3d12_xs_device.cpp:7833` continues after that number: ``` x2w-render compute dispatches: translated %ld, refused %ld, no translation %ld, not modelled %ld, builder gate refused %ld; placed inputs from a GPU copy %ld, from a title snapshot %ld (%ld KiB) ``` The suffix is already there at the PR's merge base. Filling that format string with integers and passing the line to `triage_run.summarize_lines` gives `compute_totals: None`, on the head alone and on the trial merge, so the cumulative row is never printed for a real log. The fixtures in `tests/startup_triage_run_check.py` use a shortened line that stops at `builder gate refused N`, which is why the test passes. I could not reproduce the "0 translated / 2942 refused" totals from the description with this regex and this format string; if your local log comes from a build with a different line, say which. Suggested direction: drop the `\s*$` anchor (or accept `;` after the last number) and make the fixture lines carry the real suffix. Dropping the anchor is mutant M12 below; it passes the present tests, so the fixture change is what pins it. **Mutants** (each applied to `tools/startup/triage_run.py` at the head, then `tests/startup_triage_run_check.py` and `tests/startup_triage_run_cli_check.py`; file restored and `git diff --quiet` checked afterwards): Killed (7): - M1 count any reason text under its own name (allowlist bypass): `leaked 'alice' in report`. - M2 totals `max` -> `min`, and M3 last snapshot wins: `compute totals did not take per-bucket maxima`. - M4 remove `'no translation'` from the set: `compute refusal counts wrong`. - M5 remove `'manifest version'` (not used by any fixture): caught by the source scan. - M6 re-add `'an output texture view is not 1D'`: `stale reason still allowlisted`. - M10 reverse the totals header columns: missing expected summary line. Surviving (5): - M12 totals regex without the `\s*$` anchor. See finding 2. - M8 print the section only when refusal lines exist (`if compute:`). No fixture has totals without refusal lines. - M7 drop `.strip()` on the reason. Not equivalent: with CRLF line ends the reason would keep the `\r` and fall into `other`. The fixtures only use `\n`. (CRLF input does work at the head; I checked it by hand.) - M11 key pattern `[0-9a-fA-F]{16}` -> `\S+`. No fixture has a near-miss line. - M9 remove the `continue` after a refusal line. Probably equivalent, since I found no later rule that matches this line, but I did not prove it. Equivalent: none shown. M7, M8, M9 and M11 are not blocking. The two notes in the approval on this head (the `reason_start` word list, and the one-directional check) still stand and are not blocking either. Hard-rule screen: no game files or dumps, wording is title-neutral, one behaviour, no test weakened, the new section has a negative control (the rule replaced by `(?!)`), title form is fine. The privacy property holds as far as tested: an unknown reason, the program key and the `Dispatch(...)` arguments do not reach the report. Environment: Windows 11 25H2 build 26200.9974; Python 3.12.10. No GPU tests. CI: `Build and test on Windows` and `Run platform-independent Python checks on Linux` pass on `e44093d8`; those runs are from 03:27Z on 2026-11-29 and do not cover `main` `17b662a2`, where finding 1 reproduces locally. This reply was AI-assisted.
pigalot commented 2026-11-29 17:42:14 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by pigalot on 2026-11-29T17:42:14Z.

Review: APPROVED


Retested de70c492 integrated over main 26df1826 (tree 1830c3d3). Approve. This supersedes my changes-requested review on e44093d8.

The branch is now rebased onto c4b8a41b; against e44093d8 the two PR files differ only in the allowlist, the totals rule, its comment and the fixtures. The trial merge is clean and git diff --check is clean. Tooling only, so no title run was requested.

Earlier finding 1 (the PR's own test fails over current main): addressed.
python -B tests/startup_triage_run_check.py on the trial merge prints startup triage_run checks: 0 failed. COMPUTE_DISPATCH_REASONS now holds 166 strings; the 12 I listed are in it, along with the typed-buffer, cube, indexed-atomic and adapter-capability reasons main gained since. I also checked the other direction by hand: all 166 occur as literals in d3d12_compute_dispatch.inl or d3d12_draw.inl on main 26df1826, so there is no stale entry today. The comment above the set now says a new refusal literal must be added there in the same PR.

Earlier finding 2 (the totals rule does not match the runtime's line): addressed.
RE_COMPUTE_TOTALS no longer ends in \s*$. I filled the format string at src/startup_stubs/d3d12_xs_device.cpp:7855 with integers and passed it to triage_run.summarize_lines: the five totals are read correctly with \n and with \r\n line ends, and also from the short form without the placed-input suffix. The fixtures now carry the real suffix, so putting the old anchor back fails the test (M12 below).

Tests on the trial merge:

  • python -B tests/startup_triage_run_check.py: 0 failed. python -B tests/startup_triage_run_cli_check.py: 8 tests OK.
  • Built compile_dxil and native_compute_manifest_reasons in dev, then
    ctest --test-dir out/build/dev --no-tests=error -j 4 -R "^(startup_triage_run|runtime_startup_triage_run_cli_check|startup_refusal_census|native_compile_dxil_refusals|native_compute_manifest_reasons|native_compute_manifest_reasons_requests|startup_run_preset)$":
    7 passed, no skips. These are the other tests that import or call triage_run.py.

Mutants (each applied to tools/startup/triage_run.py on the trial merge, then both Python checks; file restored and git diff --quiet checked afterwards):

Killed (9):

  • M1 count any reason text under its own name: leaked 'alice' in report.
  • M2 totals max -> min, and M3 last snapshot wins: compute totals did not take per-bucket maxima.
  • M4 remove 'no translation': compute refusal counts wrong.
  • M5 remove 'a content view token is not readable' (one of the 12 new strings): caught by the source scan.
  • M6 re-add 'an output texture view is not 1D': stale reason still allowlisted.
  • M8 print the section only when refusal lines exist: totals-only log produced no totals row. This survived on e44093d8; the new totals-only fixture kills it.
  • M10 reverse the totals header columns: missing expected summary line.
  • M12 put the \s*$ anchor back on the totals rule: TypeError: 'NoneType' object is not subscriptable in the test. This is the old behaviour from finding 2 and it survived on e44093d8.

Surviving (5), none blocking:

  • M7 drop .strip() on the reason. With CRLF line ends the reason would keep the \r and fall into other; the fixtures only use \n.
  • M9 remove the continue after a refusal line. Probably equivalent (I found no later rule that matches this line), not proven.
  • M11 key pattern [0-9a-fA-F]{16} -> \S+. No fixture has a near-miss line.
  • M13 make the placed-input suffix mandatory. No fixture has the short line any more, so the "older logs omit them" case in the comment is not pinned by a test.
  • M15 anchor \s*$ after the optional suffix. Same output for both line forms the runtime has printed.

Equivalent (1):

  • M14 remove the optional suffix group. The pattern is unanchored and the group captures nothing, so it matches the same lines with or without it. The group is documentation only; fine to keep.

The two notes from the approval on e44093d8 (the reason_start word list and the one-directional check) still stand and are not blocking.

Hard-rule screen: no game files or dumps, wording is title-neutral, one behaviour, no test weakened, the section has a negative control, title form is fine. All three commits are the author's.

Environment: Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; Python 3.12.10. No GPU tests.
CI: Build and test on Windows and Run platform-independent Python checks on Linux pass on de70c492.

This reply was AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6104023974 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3384#pullrequestreview-6104023974). Originally posted by [pigalot](https://github.com/pigalot) on 2026-11-29T17:42:14Z. **Review:** APPROVED --- Retested `de70c492` integrated over `main` `26df1826` (tree `1830c3d3`). Approve. This supersedes my changes-requested review on `e44093d8`. The branch is now rebased onto `c4b8a41b`; against `e44093d8` the two PR files differ only in the allowlist, the totals rule, its comment and the fixtures. The trial merge is clean and `git diff --check` is clean. Tooling only, so no title run was requested. **Earlier finding 1 (the PR's own test fails over current `main`): addressed.** `python -B tests/startup_triage_run_check.py` on the trial merge prints `startup triage_run checks: 0 failed`. `COMPUTE_DISPATCH_REASONS` now holds 166 strings; the 12 I listed are in it, along with the typed-buffer, cube, indexed-atomic and adapter-capability reasons `main` gained since. I also checked the other direction by hand: all 166 occur as literals in `d3d12_compute_dispatch.inl` or `d3d12_draw.inl` on `main` `26df1826`, so there is no stale entry today. The comment above the set now says a new refusal literal must be added there in the same PR. **Earlier finding 2 (the totals rule does not match the runtime's line): addressed.** `RE_COMPUTE_TOTALS` no longer ends in `\s*$`. I filled the format string at `src/startup_stubs/d3d12_xs_device.cpp:7855` with integers and passed it to `triage_run.summarize_lines`: the five totals are read correctly with `\n` and with `\r\n` line ends, and also from the short form without the placed-input suffix. The fixtures now carry the real suffix, so putting the old anchor back fails the test (M12 below). **Tests** on the trial merge: - `python -B tests/startup_triage_run_check.py`: `0 failed`. `python -B tests/startup_triage_run_cli_check.py`: 8 tests OK. - Built `compile_dxil` and `native_compute_manifest_reasons` in `dev`, then `ctest --test-dir out/build/dev --no-tests=error -j 4 -R "^(startup_triage_run|runtime_startup_triage_run_cli_check|startup_refusal_census|native_compile_dxil_refusals|native_compute_manifest_reasons|native_compute_manifest_reasons_requests|startup_run_preset)$"`: 7 passed, no skips. These are the other tests that import or call `triage_run.py`. **Mutants** (each applied to `tools/startup/triage_run.py` on the trial merge, then both Python checks; file restored and `git diff --quiet` checked afterwards): Killed (9): - M1 count any reason text under its own name: `leaked 'alice' in report`. - M2 totals `max` -> `min`, and M3 last snapshot wins: `compute totals did not take per-bucket maxima`. - M4 remove `'no translation'`: `compute refusal counts wrong`. - M5 remove `'a content view token is not readable'` (one of the 12 new strings): caught by the source scan. - M6 re-add `'an output texture view is not 1D'`: `stale reason still allowlisted`. - M8 print the section only when refusal lines exist: `totals-only log produced no totals row`. This survived on `e44093d8`; the new totals-only fixture kills it. - M10 reverse the totals header columns: missing expected summary line. - M12 put the `\s*$` anchor back on the totals rule: `TypeError: 'NoneType' object is not subscriptable` in the test. This is the old behaviour from finding 2 and it survived on `e44093d8`. Surviving (5), none blocking: - M7 drop `.strip()` on the reason. With CRLF line ends the reason would keep the `\r` and fall into `other`; the fixtures only use `\n`. - M9 remove the `continue` after a refusal line. Probably equivalent (I found no later rule that matches this line), not proven. - M11 key pattern `[0-9a-fA-F]{16}` -> `\S+`. No fixture has a near-miss line. - M13 make the placed-input suffix mandatory. No fixture has the short line any more, so the "older logs omit them" case in the comment is not pinned by a test. - M15 anchor `\s*$` after the optional suffix. Same output for both line forms the runtime has printed. Equivalent (1): - M14 remove the optional suffix group. The pattern is unanchored and the group captures nothing, so it matches the same lines with or without it. The group is documentation only; fine to keep. The two notes from the approval on `e44093d8` (the `reason_start` word list and the one-directional check) still stand and are not blocking. Hard-rule screen: no game files or dumps, wording is title-neutral, one behaviour, no test weakened, the section has a negative control, title form is fine. All three commits are the author's. Environment: Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; Python 3.12.10. No GPU tests. CI: `Build and test on Windows` and `Run platform-independent Python checks on Linux` pass on `de70c492`. This reply was AI-assisted.
Leyukaka commented 2026-11-29 17:45:31 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T17:45:31Z.


On main 1b8e2fee: de70c492 removed 'an input view token is not a buffer view of a desktop resource' from COMPUTE_DISPATCH_REASONS, but input_view_token_refusal still returns it (src/startup_stubs/input_view_token.h:69) and indirect_table_buffer forwards it with refuse(token_reason) (src/startup_stubs/d3d12_draw.inl:2597).
Ten more reasons from that function are not in the list either (input_view_token.h:58-75; only has an unrecognized slot is), so all eleven are counted as other (text omitted).
check_allowlist_covers_source_reasons does not catch this because it reads only d3d12_compute_dispatch.inl and d3d12_draw.inl.
I can open a follow-up for this: add the eleven strings and scan input_view_token.h in the check.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7259941613 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3384#issuecomment-7259941613). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T17:45:31Z. --- On main `1b8e2fee`: `de70c492` removed `'an input view token is not a buffer view of a desktop resource'` from `COMPUTE_DISPATCH_REASONS`, but `input_view_token_refusal` still returns it (`src/startup_stubs/input_view_token.h:69`) and `indirect_table_buffer` forwards it with `refuse(token_reason)` (`src/startup_stubs/d3d12_draw.inl:2597`). Ten more reasons from that function are not in the list either (`input_view_token.h:58-75`; only `has an unrecognized slot` is), so all eleven are counted as `other (text omitted)`. `check_allowlist_covers_source_reasons` does not catch this because it reads only `d3d12_compute_dispatch.inl` and `d3d12_draw.inl`. I can open a follow-up for this: add the eleven strings and scan `input_view_token.h` in the check.
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
R0Y00/Xbox2Windows!3384
No description provided.