test: pin every shader reason token in the triage classifier #2002
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2009"
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 ChazY11 on 2026-11-24T23:00:16Z.
What
SHADER_REASONSintools/startup/triage_run.pymaps a.failfirst line to an allowlisted report token. The suite never fed the table a lineof its own, so two kinds of change went unnoticed:
SHADER_REASONS"SDWA UNUSED_SEXT"label →"SDWA UNUSED_SEXTX"mask from descriptor datapattern → one that cannot matchsampler operandpattern → one that cannot matchEach of those folds a known cause into
other(or reports a token nobody allows), which is the failure the module's own docstring says thetable exists to prevent.
Change
One function in
tests/startup_triage_run_check.py, registered inmain(): 16 sample lines, one per token, asserted againstclassify_shader_reason. The samples are also matched back to the table, so a new entry added without a sample fails here:Plus the negative control that an unmodelled reason still returns
OTHER(other (text omitted)downstream depends on it).Test file only. No production change, no CMake change, no new file.
Tested
Fail-first, with each mutation applied to
tools/startup/triage_run.pyand reverted:Two things I got wrong first, and fixed
SDWA dst_unusedwasv_add_f32 SDWA dst_unused:…, which the mnemonic rule matches first (correctly — it is av_*line). TheSDWA dst_unusedentry only matches lines that begin withSDWA, so the sample starts there.is what actually matters, and allows two samples for the one entry that has two forms (
image_load_mip tfe,… a16).Notes
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T23:02:15Z.
Review: COMMENTED
Review of head
13745b1b8f4c773ba9ec154b583c21a6cfa38734.Scope: one test file,
tests/startup_triage_run_check.py(+40). No production code, no CMake change, no new dependency. Clean-room: only the project's own classifier table is exercised.Findings: P1 = 0, P2 = 0. Nit only: one blank line before
def main(PEP 8 wants two).Commands executed locally (Linux):
python3 tests/startup_triage_run_check.py->0 failedpython3 tests/docs_links_check.py-> passpython3 tests/bidi_controls_check.py-> passgit diff --check origin/main...HEAD-> cleanWin2025 (
x2w_pipe.py win2025 2009 --wait 900): Debug (dev preset)startup_triage_run1/1 passed; Release /O2startup_triage_run1/1 passed.Mutations (each reverted with
git checkout -- .):SDWA UNUSED_SEXTlabel inSHADER_REASONS: the test fails (classify_shader_reason('SDWA UNUSED_SEXT') -> 'SDWA UNUSED_SEXTX').undecodable wordpattern: the test fails 3 ways, includingSHADER_REASONS[4] ... has no sample line.Both killed.
CI on GitHub was still pending for the Windows jobs when this was written.
AI-assisted; commands listed were executed locally.