tooling: pin evidence label and failed cell wording in hardware_reports_check #1822

Merged
Asimmimx merged 1 commit from upstream-pr/1829 into main 2026-11-24 20:28:29 +00:00
Asimmimx commented 2026-11-24 19:18:58 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Asimmimx on 2026-11-24T19:18:58Z.


Change

tests/hardware_reports_check.py did not check four branches that produce the
suggested README cells in tools/hardware_reports.py:

  • evidence_label falls back to Hardware report when the report prints
    driver=unavailable via DXGI (the line offscreen_check prints when the
    driver version query fails);
  • evidence_label appends , adapter filter <name> when
    Run-GpuCheck.ps1 -AdapterFilter wrote an Adapter filter: line. The README
    already uses this wording, for example adapter filter RX 590;
  • wave64_cell returns Failed for a failed bvh_wave64 section;
  • bvh_cell returns plain Skipped for a skipped BVH differential at
    dxr_tier=11 (DXR 1.1 is supported, so the skip has another cause and the
    cell names no tier).

Hand-applied single-point mutants of tools/hardware_reports.py, each run
against the check and then reverted:

Mutant Existing check With the new cases
tier < 11 -> tier <= 11 in bvh_cell survived killed
not driver.startswith("unavailable") -> True survived killed
drop the , adapter filter ... suffix survived killed
wave64_cell returns None for FAIL survived killed
lane_range ... < 64 -> <= 64 killed killed
drop the dxr_tier == 0 branch killed killed
number <= after -> number < after killed killed
keep quoted (>) lines killed killed
Shader Model < 0x66 -> <= 0x66 killed killed
sum only the first comparisons= killed killed
drop the translation-layer check when sections exist killed killed
drop the , debug layer enabled suffix killed killed
prefer the first reason over the duplicate-section reason killed killed

The new cases read:

  • test_evidence_label_follows_the_readme_wording: a generated report with
    driver=unavailable via DXGI gives Hardware report; the same report with
    Adapter filter: GPU 100 after the backend line gives
    1.0 report, adapter filter GPU 100.
  • Two more rows in test_cells_use_the_readme_wording: bvh_wave64 FAIL
    gives ("32", "Failed", "408 queries passed"), and bvh_differential SKIP
    with dxr_tier=11 gives ("32", "Skipped, lane range 32–32", "Skipped").

Verification

Based on origin/main 813045b3. Windows 11 Pro 26300.9974, Python 3.12.10.

> python -B tests/hardware_reports_check.py
Ran 13 tests in 0.042s
OK

> python -B tests/docs_links_check.py
Self-test passed.
Checked 18 Markdown files and 369 links.

> python -B tests/bidi_controls_check.py
Self-test passed.
Checked 1320 tracked source, script and build/CI files: no bidirectional controls.

With each of the four targeted mutants applied to tools/hardware_reports.py,
python -B tests/hardware_reports_check.py exits nonzero; on the unmodified tool
it passes. No GPU or build step is involved.

Evidence and follow-up

These mutants also survive and are not pinned here, to keep this PR to the
suggested cell wording:

  • dropping the sections name more than one backend note;
  • dropping the native lanes or BVH differential difference notes in
    row_differences (the existing difference case only exercises the wave64 note);
  • preferring a general row over a (device NNNN) row when both share an adapter
    name (exact or general -> general or exact);
  • either single trigger of the edited report layout note (short commit,
    non-hyphen dash), since the existing edited case sets both;
  • dropping the skipped: or failed: lists from the Markdown Tests: line.

The tool is not changed.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I updated README/docs when a capability or build requirement changed. (No capability or build requirement changed.)
  • I did not include game files, dumps, distribution links or secrets.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6589541210 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1829). Originally posted by [Asimmimx](https://github.com/Asimmimx) on 2026-11-24T19:18:58Z. --- ## Change `tests/hardware_reports_check.py` did not check four branches that produce the suggested README cells in `tools/hardware_reports.py`: - `evidence_label` falls back to `Hardware report` when the report prints `driver=unavailable via DXGI` (the line `offscreen_check` prints when the driver version query fails); - `evidence_label` appends `, adapter filter <name>` when `Run-GpuCheck.ps1 -AdapterFilter` wrote an `Adapter filter:` line. The README already uses this wording, for example `adapter filter RX 590`; - `wave64_cell` returns `Failed` for a failed `bvh_wave64` section; - `bvh_cell` returns plain `Skipped` for a skipped BVH differential at `dxr_tier=11` (DXR 1.1 is supported, so the skip has another cause and the cell names no tier). Hand-applied single-point mutants of `tools/hardware_reports.py`, each run against the check and then reverted: | Mutant | Existing check | With the new cases | |---|---|---| | `tier < 11` -> `tier <= 11` in `bvh_cell` | survived | killed | | `not driver.startswith("unavailable")` -> `True` | survived | killed | | drop the `, adapter filter ...` suffix | survived | killed | | `wave64_cell` returns `None` for `FAIL` | survived | killed | | `lane_range ... < 64` -> `<= 64` | killed | killed | | drop the `dxr_tier == 0` branch | killed | killed | | `number <= after` -> `number < after` | killed | killed | | keep quoted (`>`) lines | killed | killed | | Shader Model `< 0x66` -> `<= 0x66` | killed | killed | | sum only the first `comparisons=` | killed | killed | | drop the translation-layer check when sections exist | killed | killed | | drop the `, debug layer enabled` suffix | killed | killed | | prefer the first reason over the duplicate-section reason | killed | killed | The new cases read: - `test_evidence_label_follows_the_readme_wording`: a generated report with `driver=unavailable via DXGI` gives `Hardware report`; the same report with `Adapter filter: GPU 100` after the backend line gives `1.0 report, adapter filter GPU 100`. - Two more rows in `test_cells_use_the_readme_wording`: `bvh_wave64` `FAIL` gives `("32", "Failed", "408 queries passed")`, and `bvh_differential` `SKIP` with `dxr_tier=11` gives `("32", "Skipped, lane range 32–32", "Skipped")`. ## Verification Based on `origin/main` 813045b3. Windows 11 Pro 26300.9974, Python 3.12.10. ```text > python -B tests/hardware_reports_check.py Ran 13 tests in 0.042s OK > python -B tests/docs_links_check.py Self-test passed. Checked 18 Markdown files and 369 links. > python -B tests/bidi_controls_check.py Self-test passed. Checked 1320 tracked source, script and build/CI files: no bidirectional controls. ``` With each of the four targeted mutants applied to `tools/hardware_reports.py`, `python -B tests/hardware_reports_check.py` exits nonzero; on the unmodified tool it passes. No GPU or build step is involved. ## Evidence and follow-up These mutants also survive and are not pinned here, to keep this PR to the suggested cell wording: - dropping the `sections name more than one backend` note; - dropping the `native lanes` or `BVH differential` difference notes in `row_differences` (the existing difference case only exercises the wave64 note); - preferring a general row over a `(device NNNN)` row when both share an adapter name (`exact or general` -> `general or exact`); - either single trigger of the `edited report layout` note (short commit, non-hyphen dash), since the existing edited case sets both; - dropping the `skipped:` or `failed:` lists from the Markdown `Tests:` line. The tool is not changed. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the exact command and result for every check I ran. - [x] I considered a negative control or failure case for a new fixture. - [ ] I updated README/docs when a capability or build requirement changed. (No capability or build requirement changed.) - [x] I did not include game files, dumps, distribution links or secrets. AI-assisted (Claude Code).
tedin7 commented 2026-11-24 20:00:51 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T19:29:59Z.

Review: COMMENTED


Reviewed at commit 4ee1780f85153a023aef2f95b03bf0c5b41d3bea (tests/hardware_reports_check.py):

  • Diff review against tools/hardware_reports.py: pins evidence_label() fallback to "Hardware report" when driver begins with "unavailable", adapter-filter suffix parsing/formatting (Adapter filter: GPU 100), wave64_cell() "Failed" wording, and bvh_cell() plain "Skipped" wording for dxr_tier=11. Clean-room, title-neutral, no defects found (0 P1, 0 P2).
  • Linux checks:
    • git diff --check origin/main...HEAD: PASS
    • /root/.local/share/x2w-rev-venv/bin/python -B tests/bidi_controls_check.py: PASS (1320 files checked)
    • /root/.local/share/x2w-rev-venv/bin/python -B tests/hardware_reports_check.py: PASS (Ran 13 tests in 0.085s, OK)
  • Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP):
    • Windows Python checks: tests/hardware_reports_check.py PASS (0.2s, wall 9.4s)
  • Local mutation checks (restored via git checkout -- .):
    • Dropped not driver.startswith("unavailable") guard in tools/hardware_reports.py: tests/hardware_reports_check.py FAILED (rc=1)
    • Changed tier < 11 to tier <= 11 in bvh_cell() (tools/hardware_reports.py): tests/hardware_reports_check.py FAILED (rc=1)

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6045949664 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1829#pullrequestreview-6045949664). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T19:29:59Z. **Review:** COMMENTED --- Reviewed at commit `4ee1780f85153a023aef2f95b03bf0c5b41d3bea` (`tests/hardware_reports_check.py`): - Diff review against `tools/hardware_reports.py`: pins `evidence_label()` fallback to `"Hardware report"` when `driver` begins with `"unavailable"`, adapter-filter suffix parsing/formatting (`Adapter filter: GPU 100`), `wave64_cell()` `"Failed"` wording, and `bvh_cell()` plain `"Skipped"` wording for `dxr_tier=11`. Clean-room, title-neutral, no defects found (0 P1, 0 P2). - Linux checks: - `git diff --check origin/main...HEAD`: PASS - `/root/.local/share/x2w-rev-venv/bin/python -B tests/bidi_controls_check.py`: PASS (1320 files checked) - `/root/.local/share/x2w-rev-venv/bin/python -B tests/hardware_reports_check.py`: PASS (`Ran 13 tests in 0.085s, OK`) - Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP): - Windows Python checks: `tests/hardware_reports_check.py` PASS (`0.2s`, wall `9.4s`) - Local mutation checks (restored via `git checkout -- .`): - Dropped `not driver.startswith("unavailable")` guard in `tools/hardware_reports.py`: `tests/hardware_reports_check.py` FAILED (`rc=1`) - Changed `tier < 11` to `tier <= 11` in `bvh_cell()` (`tools/hardware_reports.py`): `tests/hardware_reports_check.py` FAILED (`rc=1`) AI-assisted; commands listed were executed locally.
ChazY11 commented 2026-11-24 20:01:21 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T19:52:49Z.


Ran it; two of the three branches I tried are pinned

At the PR head, Windows 11 build 26300.9974:

out/pe-env/Scripts/python.exe -B tests/hardware_reports_check.py
OK      exit 0

Three mutations to tools/hardware_reports.py, each reverted:

mutation result
return "Failed" if status == "FAIL" else None → "Passed" caught
the "Hardware report" fallback label → "Hardware results" caught
[name for name, status in report.results.items() if status == "FAIL"] → if status in ("FAIL", "SKIP") not caught

So the label and the fallback are pinned, and the membership of the failed list is not: widening it to include skipped
tests keeps every case green.

Why that one is worth a case

tools/hardware_reports.py already distinguishes the three statuses (parse yields PASS|FAIL|SKIP, and SKIP gets its own
wording at lines 236–259), and tests/hardware_reports_check.py already builds rows whose GPU cell says Skipped, … — but
I could not find a report fixture whose per-test results contain a SKIP entry. With one, the widening above would put a
skipped test into the "failed: …" cell and be caught.

That is the difference between "the wording of a failed cell" (what the PR's title says) and "which tests are listed as
failed": the second is the one that would silently mis-report a driver regression as a skip.

The rest of the patch

The driver=unavailable via DXGI fallback and the four branches it names look right, and both behaviours I could break are
guarded. No objection to the change as it stands; the SKIP membership is the only thing I would add, and it can be a
follow-up if you prefer to keep this PR to wording.

Verdict

Reviewed. Two of three edits are load-bearing today; one (failed membership) is not.

Notes

  • AI-assisted review.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7142718081 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1829#issuecomment-7142718081). Originally posted by [ChazY11](https://github.com/ChazY11) on 2026-11-24T19:52:49Z. --- ## Ran it; two of the three branches I tried are pinned At the PR head, Windows 11 build 26300.9974: ```powershell out/pe-env/Scripts/python.exe -B tests/hardware_reports_check.py OK exit 0 ``` Three mutations to `tools/hardware_reports.py`, each reverted: | mutation | result | |---|---| | `return "Failed" if status == "FAIL" else None` → `"Passed"` | **caught** | | the `"Hardware report"` fallback label → `"Hardware results"` | **caught** | | `[name for name, status in report.results.items() if status == "FAIL"]` → `if status in ("FAIL", "SKIP")` | **not caught** | So the label and the fallback are pinned, and the *membership* of the failed list is not: widening it to include skipped tests keeps every case green. ## Why that one is worth a case `tools/hardware_reports.py` already distinguishes the three statuses (`parse` yields `PASS|FAIL|SKIP`, and `SKIP` gets its own wording at lines 236–259), and `tests/hardware_reports_check.py` already builds rows whose GPU cell says `Skipped, …` — but I could not find a **report fixture** whose per-test results contain a `SKIP` entry. With one, the widening above would put a skipped test into the "failed: …" cell and be caught. That is the difference between "the wording of a failed cell" (what the PR's title says) and "which tests are listed as failed": the second is the one that would silently mis-report a driver regression as a skip. ## The rest of the patch The `driver=unavailable via DXGI` fallback and the four branches it names look right, and both behaviours I could break are guarded. No objection to the change as it stands; the `SKIP` membership is the only thing I would add, and it can be a follow-up if you prefer to keep this PR to wording. ## Verdict Reviewed. Two of three edits are load-bearing today; one (`failed` membership) is not. ## Notes - AI-assisted review.
upstream-sync closed this pull request 2026-11-24 21:00:53 +00:00
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!1822
No description provided.