tooling: list input view token refusals in the triage summary #3494

Manually merged
github merged 1 commit from github-bot/gh-3492 into gh-pr/3492/base 2026-11-30 02:22:22 +00:00 AGit
Owner

@⁠Leyukaka on GitHub · 2026-11-29 17:49 UTC · original
Leyukaka:tooling-triage-input-view-reasons → main · +14 −1 · 2 files · 1 commits · merged 2026-11-30 02:19 UTC

Follow-up to #3386.

COMPUTE_DISPATCH_REASONS in tools/startup/triage_run.py had only one of the reasons returned by input_view_token_refusal (src/startup_stubs/input_view_token.h). This adds the 11 missing ones, so the triage summary recognizes those refusals.

The coverage check in tests/startup_triage_run_check.py now also scans the body of input_view_token_refusal, so a reason added there without an allowlist entry fails the test.

Test: python -B tests/startup_triage_run_check.py → 0 failed.
Mutation: removing one of the new strings from the allowlist → FAIL source reasons missing from COMPUTE_DISPATCH_REASONS: 'an input view token is unknown'.

Not covered: no runtime change, and no run of the application; only the triage tool and its check are touched.

**@⁠Leyukaka** on GitHub · 2026-11-29 17:49 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3492) `Leyukaka:tooling-triage-input-view-reasons` → `main` · +14 −1 · 2 files · 1 commits · merged 2026-11-30 02:19 UTC Follow-up to #3386. `COMPUTE_DISPATCH_REASONS` in `tools/startup/triage_run.py` had only one of the reasons returned by `input_view_token_refusal` (`src/startup_stubs/input_view_token.h`). This adds the 11 missing ones, so the triage summary recognizes those refusals. The coverage check in `tests/startup_triage_run_check.py` now also scans the body of `input_view_token_refusal`, so a reason added there without an allowlist entry fails the test. Test: `python -B tests/startup_triage_run_check.py` → `0 failed`. Mutation: removing one of the new strings from the allowlist → `FAIL source reasons missing from COMPUTE_DISPATCH_REASONS: 'an input view token is unknown'`. Not covered: no runtime change, and no run of the application; only the triage tool and its check are touched.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 17:51:36 +00:00
Author
Owner

@⁠Not-Saii on GitHub · 2026-11-29 22:43 UTC · original · approved these changes

Reviewed at head 2a6e31a18f620fbd8ec319004a7008d1c314da33. It merges cleanly onto main 2ff74a6a.

Verdict: approve. No MUST or SHOULD findings, two NITs.

What I checked

  • The 11 new entries, plus 'an input view token has an unrecognized slot' already on main, match the 12 return literals of input_view_token_refusal (src/startup_stubs/input_view_token.h:52-78) character for character. That includes the two token's strings with an ASCII apostrophe.
  • The runtime emits them unchanged:
    • indirect_table_buffer returns refuse(token_reason) (src/startup_stubs/d3d12_draw.inl:2603).
    • Its refuse lambda stores the pointer into *why as-is (d3d12_draw.inl:2569-2572).
    • The compute path passes &reason (src/startup_stubs/d3d12_compute_dispatch.inl:1235) and logs it after Dispatch(x, y, z) refused: (d3d12_compute_dispatch.inl:1288).
    • RE_COMPUTE_DISPATCH_REFUSED (tools/startup/triage_run.py:239) captures that text and counts it by exact set membership (triage_run.py:641), so the allowlist entries are all the parser needs.
  • The allowlist stays sorted.
  • All 12 literals pass reason_start, and none is in labels.
  • function_body finds the definition first in the header, and the brace walk handles the nested if (slot == 17) { ... }.
  • No runtime change. The check scans repository sources only; it reads no captured logs.

What the test proves

check_allowlist_covers_source_reasons in tests/startup_triage_run_check.py now also scans input_view_token_refusal. A reason added there without an allowlist entry fails the check. It does not catch stale allowlist entries; that was already true before this PR.

Findings

MUST: none. SHOULD: none.

NIT:

  1. The comment at tools/startup/triage_run.py:66 names only d3d12_compute_dispatch.inl as the source of the reasons. The docstring of check_allowlist_covers_source_reasons lists the scanned functions without input_view_token_refusal. One line each would keep them in step with the scan.
  2. The PR body doesn't name the commit that was tested.

Run (AGENTS.md evidence)

  • Commit: 2a6e31a18f620fbd8ec319004a7008d1c314da33, a git archive export, run from a writable copy inside Windows Sandbox with networking disabled (an unreachability probe confirmed it).
  • Command, from the tree root: python -B tests/startup_triage_run_check.py (Python 3.14.8). The check is pure Python, so nothing was built.
  • Passed: startup_triage_run_check.py → startup triage_run checks: 0 failed, exit 0.
  • Failed: none. Skipped (77): none.
  • Adapter and driver: NVIDIA GeForce RTX 4090 via the sandbox vGPU, driver 10.0.26100.1150. Not used by this check.
  • Windows: 11 Enterprise build 26100 (sandbox). Debug layer: n/a (no D3D12).

Mutation and controls (scratch copy, never the PR branch)

Leg triage_run.py test Result
head PR PR exit 0, 0 failed
M1: revert the fix parent 1b8e2fee PR exit 1, FAIL source reasons missing from COMPUTE_DISPATCH_REASONS: listing exactly the 11 new strings
C2 PR parent exit 0
C3 parent parent exit 0: the gap the old test did not see
restored PR PR exit 0

The mutation is caught, and C3 shows that the test change is what catches it.

CI

Run 46291716924 at this head: the Linux "Run platform-independent Python checks" job ran tests/startup_triage_run_check.py (ok) with 0 failed. The check is listed in the python-linux job command in .github/workflows/windows.yml. The Windows PR job runs ctest --preset pr, whose filter does not include startup_triage_run, so CI ran this test on Linux only.

**@⁠Not-Saii** on GitHub · 2026-11-29 22:43 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3492#pullrequestreview-6105189834) · **approved these changes** Reviewed at head `2a6e31a18f620fbd8ec319004a7008d1c314da33`. It merges cleanly onto main `2ff74a6a`. **Verdict: approve.** No MUST or SHOULD findings, two NITs. ### What I checked - The 11 new entries, plus `'an input view token has an unrecognized slot'` already on main, match the 12 return literals of `input_view_token_refusal` (`src/startup_stubs/input_view_token.h:52-78`) character for character. That includes the two `token's` strings with an ASCII apostrophe. - The runtime emits them unchanged: - `indirect_table_buffer` returns `refuse(token_reason)` (`src/startup_stubs/d3d12_draw.inl:2603`). - Its `refuse` lambda stores the pointer into `*why` as-is (`d3d12_draw.inl:2569-2572`). - The compute path passes `&reason` (`src/startup_stubs/d3d12_compute_dispatch.inl:1235`) and logs it after `Dispatch(x, y, z) refused: ` (`d3d12_compute_dispatch.inl:1288`). - `RE_COMPUTE_DISPATCH_REFUSED` (`tools/startup/triage_run.py:239`) captures that text and counts it by exact set membership (`triage_run.py:641`), so the allowlist entries are all the parser needs. - The allowlist stays sorted. - All 12 literals pass `reason_start`, and none is in `labels`. - `function_body` finds the definition first in the header, and the brace walk handles the nested `if (slot == 17) { ... }`. - No runtime change. The check scans repository sources only; it reads no captured logs. ### What the test proves `check_allowlist_covers_source_reasons` in `tests/startup_triage_run_check.py` now also scans `input_view_token_refusal`. A reason added there without an allowlist entry fails the check. It does not catch stale allowlist entries; that was already true before this PR. ### Findings MUST: none. SHOULD: none. NIT: 1. The comment at `tools/startup/triage_run.py:66` names only `d3d12_compute_dispatch.inl` as the source of the reasons. The docstring of `check_allowlist_covers_source_reasons` lists the scanned functions without `input_view_token_refusal`. One line each would keep them in step with the scan. 2. The PR body doesn't name the commit that was tested. ### Run (AGENTS.md evidence) - Commit: `2a6e31a18f620fbd8ec319004a7008d1c314da33`, a `git archive` export, run from a writable copy inside Windows Sandbox with networking disabled (an unreachability probe confirmed it). - Command, from the tree root: `python -B tests/startup_triage_run_check.py` (Python 3.14.8). The check is pure Python, so nothing was built. - Passed: `startup_triage_run_check.py` → `startup triage_run checks: 0 failed`, exit 0. - Failed: none. Skipped (77): none. - Adapter and driver: NVIDIA GeForce RTX 4090 via the sandbox vGPU, driver 10.0.26100.1150. Not used by this check. - Windows: 11 Enterprise build 26100 (sandbox). Debug layer: n/a (no D3D12). ### Mutation and controls (scratch copy, never the PR branch) | Leg | `triage_run.py` | test | Result | |---|---|---|---| | head | PR | PR | exit 0, `0 failed` | | M1: revert the fix | parent `1b8e2fee` | PR | **exit 1**, `FAIL source reasons missing from COMPUTE_DISPATCH_REASONS:` listing exactly the 11 new strings | | C2 | PR | parent | exit 0 | | C3 | parent | parent | exit 0: the gap the old test did not see | | restored | PR | PR | exit 0 | The mutation is caught, and C3 shows that the test change is what catches it. ### CI Run 46291716924 at this head: the Linux "Run platform-independent Python checks" job ran `tests/startup_triage_run_check.py (ok)` with `0 failed`. The check is listed in the `python-linux` job command in `.github/workflows/windows.yml`. The Windows PR job runs `ctest --preset pr`, whose filter does not include `startup_triage_run`, so CI ran this test on Linux only.
github-bot changed target branch from main to gh-pr/3492/base 2026-11-30 02:22:21 +00:00
github manually merged commit 2a6e31a18f into gh-pr/3492/base 2026-11-30 02:22:22 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.