fix(scripts): hardware_report.py counts a Steam Deck as one, by whole words #531

Merged
HumanBean merged 2 commits from zeldaootr/Longshot:hardware-report-deck-class into main 2026-11-15 18:41:25 +00:00
Contributor

Type: fix · Risk: low · Tested on: Linux, no GPU (game-free check) · Needs: none

Why

scripts/hardware_report.py feeds the reach numbers in docs/workflow.md, and it miscounts Steam Decks: a report naming the Deck by its Vulkan name lands in "AMD other", and reports whose title says "finally" or "really" are counted as handhelds. Work on handhelds is ranked from these counts, so they should be right.

How to reproduce

Seen on: Linux (Ubuntu 24.04), no GPU; any OS, it is a script
Settings and switches: none
Steps: on main aa95d35f with this PR's test added (aa2310b0), run python -I -B tests/test_hardware_report.py; or give classify() the report line "AMD Custom GPU 0932 (RADV VANGOGH)"
Expected: a Steam Deck is counted as "AMD APU / handheld" by each of its names, and "The game finally crashes" on an Intel card stays Intel
Actual: hardware_report.py misreads 7 answer(s): the Deck by its RADV name, as "Steamdeck" and as "Steamdeck OLED" (for the OS) is misread, and "finally", "really" and "totally" match "ally"

What changed

classify() matches whole words and knows the Steam Deck by the names its reports use, so the Deck and handheld counts the work is ranked by are right again.

  • scripts: classify() in scripts/hardware_report.py matches whole words, so "steamdeck" no longer counts as AMD only because it holds "amd", and "finally", "really" and "totally" no longer match "ally". It also knows a Deck by "steamdeck", "VANGOGH" and "Custom GPU 0405/0932" (the name RADV reports), for the card class and for the OS.
  • tests: tests/test_hardware_report.py runs the real classifier over report lines for a Deck (by each of its names), an Ally, and Intel and NVIDIA reports whose titles hold "finally" and "really".

Measurements

Verdict: fixed: the classifier misreads 7 of the test's report lines on main and none with this PR, in two interleaved rounds.

Hardware: Linux x86-64 PC (Ubuntu 24.04), no GPU used; Python 3.15
Scene: no game: the game-free check
Method: python3 -I -B tests/test_hardware_report.py at the test-only commit aa2310b0 (main aa95d35f plus the test) and at d34e96c8, twice each, alternating; the misreads it reports
How to reproduce: check out each commit and run the command above

Before: main @ aa95d35f (with the test, aa2310b0) After: this PR @ d34e96c8
report lines the classifier misreads, of those the test gives it (both rounds the same) 7 0
test result fails passes
aa2310b0 r1: hardware_report.py misreads 7 answer(s): AMD Custom GPU 0932 (RADV VANGOGH) Stutter in Hyrule Field; AMD Custom GPU 0405 (RADV VANGOGH) Crash at the title; Steamdeck Steamdeck locked at 6fps in anything but cutscenes; Intel Arc A770 The game finally crashes at the castle; Intel UHD 770 Really slow loading; Intel Arc B580 Audio totally gone after a while; Steamdeck OLED, 16 GB
d34e96c8 r1: ok   AMD Custom GPU 0932 (RADV VANGOGH) Stutter in Hyrule Field   -> ('AMD', 'AMD APU / handheld')
             ok   Intel Arc A770 The game finally crashes at the castle        -> ('Intel', 'Intel')
             ok   Steamdeck OLED, 16 GB                                        -> Linux / SteamOS
             (12 of 12 ok; round 2 the same on both commits)

Flags and settings

None

Testing

Tested: Linux, game-free. The new test fails on the test-only commit aa2310b0 and passes at d34e96c8 (this branch rebased onto main aa95d35f), twice each, alternating, and under tests/run_all.py with g++ 13.3 and with clang 23.1.5 as CXX at both commits (the check runs no compiler). The checks that read scripts/hardware_report.py pass at the tip (2 of 2). Before the rebase (on main 543846eb) the same at a57cf490 and 2e3b461c.

Not tested: The script against the live issue list (hardware_report.py needs the gh CLI signed in to the GitHub repository), so the counts in docs/workflow.md are not recomputed here; whoever next runs it with gh should refresh them.

Must be tested: None

Risks

What could break: only the counts the script prints: a report that named an AMD card with nothing but a word the old pattern matched inside another word would move class.

Turning it off: revert the commit

Compatibility: Nothing changes (a maintainer's script; the game does not run it)

Issues

None filed; found by auditing every Steam Deck and handheld code path.

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main. Onto main aa95d35f, no conflict; the test and fix commits are the same changes as before (git patch-id).
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named). The full suite on main aa95d35f (Linux, g++ 13.3, the Vulkan headers set): 528 passed, 15 failed, 50 skipped; on this branch the new test and the checks that read the changed script pass. The 15 fail on main and read nothing this PR changes: test_appimage_player_build, test_bake_portability, test_cpm_discovery, test_crash_dialog, test_env_on, test_lift_cache, test_lift_cleanup_error, test_make_game_cache, test_mods_size_table, test_options_budget_once, test_pipeline_tour, test_readback_late, test_vk_pgo, test_walk_key and nx2/test_texture_init_barrier.py.
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • Numbers from the same PC, scene and settings, at least 2 interleaved runs each, the median reported.
  • A game-free test added for the fix, failing on main and passing here.
**Type:** fix · **Risk:** low · **Tested on:** Linux, no GPU (game-free check) · **Needs:** none ## Why `scripts/hardware_report.py` feeds the reach numbers in `docs/workflow.md`, and it miscounts Steam Decks: a report naming the Deck by its Vulkan name lands in "AMD other", and reports whose title says "finally" or "really" are counted as handhelds. Work on handhelds is ranked from these counts, so they should be right. ## How to reproduce **Seen on:** Linux (Ubuntu 24.04), no GPU; any OS, it is a script **Settings and switches:** none **Steps:** on `main` aa95d35f with this PR's test added (aa2310b0), run `python -I -B tests/test_hardware_report.py`; or give `classify()` the report line "AMD Custom GPU 0932 (RADV VANGOGH)" **Expected:** a Steam Deck is counted as "AMD APU / handheld" by each of its names, and "The game finally crashes" on an Intel card stays Intel **Actual:** `hardware_report.py misreads 7 answer(s)`: the Deck by its RADV name, as "Steamdeck" and as "Steamdeck OLED" (for the OS) is misread, and "finally", "really" and "totally" match "ally" ## What changed `classify()` matches whole words and knows the Steam Deck by the names its reports use, so the Deck and handheld counts the work is ranked by are right again. - scripts: `classify()` in `scripts/hardware_report.py` matches whole words, so "steamdeck" no longer counts as AMD only because it holds "amd", and "finally", "really" and "totally" no longer match "ally". It also knows a Deck by "steamdeck", "VANGOGH" and "Custom GPU 0405/0932" (the name RADV reports), for the card class and for the OS. - tests: `tests/test_hardware_report.py` runs the real classifier over report lines for a Deck (by each of its names), an Ally, and Intel and NVIDIA reports whose titles hold "finally" and "really". ## Measurements **Verdict:** fixed: the classifier misreads 7 of the test's report lines on `main` and none with this PR, in two interleaved rounds. Hardware: Linux x86-64 PC (Ubuntu 24.04), no GPU used; Python 3.15 Scene: no game: the game-free check Method: `python3 -I -B tests/test_hardware_report.py` at the test-only commit aa2310b0 (main aa95d35f plus the test) and at d34e96c8, twice each, alternating; the misreads it reports How to reproduce: check out each commit and run the command above | | Before: main @ aa95d35f (with the test, aa2310b0) | After: this PR @ d34e96c8 | |---|---|---| | report lines the classifier misreads, of those the test gives it (both rounds the same) | 7 | 0 | | test result | fails | passes | ``` aa2310b0 r1: hardware_report.py misreads 7 answer(s): AMD Custom GPU 0932 (RADV VANGOGH) Stutter in Hyrule Field; AMD Custom GPU 0405 (RADV VANGOGH) Crash at the title; Steamdeck Steamdeck locked at 6fps in anything but cutscenes; Intel Arc A770 The game finally crashes at the castle; Intel UHD 770 Really slow loading; Intel Arc B580 Audio totally gone after a while; Steamdeck OLED, 16 GB d34e96c8 r1: ok AMD Custom GPU 0932 (RADV VANGOGH) Stutter in Hyrule Field -> ('AMD', 'AMD APU / handheld') ok Intel Arc A770 The game finally crashes at the castle -> ('Intel', 'Intel') ok Steamdeck OLED, 16 GB -> Linux / SteamOS (12 of 12 ok; round 2 the same on both commits) ``` ### Flags and settings None ## Testing **Tested:** Linux, game-free. The new test fails on the test-only commit aa2310b0 and passes at d34e96c8 (this branch rebased onto `main` aa95d35f), twice each, alternating, and under `tests/run_all.py` with g++ 13.3 and with clang 23.1.5 as `CXX` at both commits (the check runs no compiler). The checks that read `scripts/hardware_report.py` pass at the tip (2 of 2). Before the rebase (on main 543846eb) the same at a57cf490 and 2e3b461c. **Not tested:** The script against the live issue list (`hardware_report.py` needs the `gh` CLI signed in to the GitHub repository), so the counts in `docs/workflow.md` are not recomputed here; whoever next runs it with `gh` should refresh them. **Must be tested:** None ## Risks **What could break:** only the counts the script prints: a report that named an AMD card with nothing but a word the old pattern matched inside another word would move class. **Turning it off:** revert the commit **Compatibility:** Nothing changes (a maintainer's script; the game does not run it) ## Issues None filed; found by auditing every Steam Deck and handheld code path. ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. Onto main aa95d35f, no conflict; the test and fix commits are the same changes as before (`git patch-id`). - [x] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). The full suite on main aa95d35f (Linux, g++ 13.3, the Vulkan headers set): 528 passed, 15 failed, 50 skipped; on this branch the new test and the checks that read the changed script pass. The 15 fail on main and read nothing this PR changes: `test_appimage_player_build`, `test_bake_portability`, `test_cpm_discovery`, `test_crash_dialog`, `test_env_on`, `test_lift_cache`, `test_lift_cleanup_error`, `test_make_game_cache`, `test_mods_size_table`, `test_options_budget_once`, `test_pipeline_tour`, `test_readback_late`, `test_vk_pgo`, `test_walk_key` and `nx2/test_texture_init_barrier.py`. - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] Numbers from the same PC, scene and settings, at least 2 interleaved runs each, the median reported. - [x] A game-free test added for the fix, failing on `main` and passing here.
Assisted-by: Claude
fix(scripts): hardware_report.py counts a Steam Deck as one, by whole words
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 5s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
2e3b461cda
Assisted-by: Claude
Author
Contributor

Rebased onto main aa95d35f with no conflict (the same changes, git patch-id; commits now under the noreply identity) and the description moved to the current template.
The test was run again on the new base: it fails at the test-only commit and passes at the tip, two interleaved rounds, g++ and clang, with the same numbers as before, so the Measurements are now from aa95d35f.

Rebased onto `main` aa95d35f with no conflict (the same changes, `git patch-id`; commits now under the noreply identity) and the description moved to the current template. The test was run again on the new base: it fails at the test-only commit and passes at the tip, two interleaved rounds, g++ and clang, with the same numbers as before, so the Measurements are now from aa95d35f.
zeldaootr force-pushed hardware-report-deck-class from 2e3b461cda
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 5s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
to d34e96c8b3
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Successful in 4s
2026-11-15 16:43:35 +00:00
Compare
HumanBean deleted branch hardware-report-deck-class 2026-11-15 18:41:25 +00:00
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Successful in 4s
Some workflows are waiting to be reviewed.
Sign in to join this conversation.
No reviewers
No milestone
No project
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.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!531
No description provided.