fix(scripts): hardware_report.py counts a Steam Deck as one, by whole words #531
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
beanstalk: approved @ 1697603
beanstalk: approved @ 2c5a62e
beanstalk: approved @ 4fd82b7
beanstalk: approved @ 64d6d09
beanstalk: approved @ 6f91fae
beanstalk: approved @ 70a78f9
beanstalk: approved @ 8015c9a
beanstalk: approved @ 8d361dc
beanstalk: approved @ 9d8356e
beanstalk: approved @ abf2227
beanstalk: approved @ d82f202
beanstalk: approved @ e5f1e40
beanstalk: approved @ ee8ab5f
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!531
Loading…
Reference in a new issue
No description provided.
Delete branch "zeldaootr/Longshot:hardware-report-deck-class"
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?
Type: fix · Risk: low · Tested on: Linux, no GPU (game-free check) · Needs: none
Why
scripts/hardware_report.pyfeeds the reach numbers indocs/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
mainaa95d35fwith this PR's test added (aa2310b0), runpython -I -B tests/test_hardware_report.py; or giveclassify()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.classify()inscripts/hardware_report.pymatches 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/test_hardware_report.pyruns 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
mainand 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.pyat the test-only commitaa2310b0(mainaa95d35fplus the test) and atd34e96c8, twice each, alternating; the misreads it reportsHow to reproduce: check out each commit and run the command above
aa95d35f(with the test,aa2310b0)d34e96c8Flags and settings
None
Testing
Tested: Linux, game-free. The new test fails on the test-only commit
aa2310b0and passes atd34e96c8(this branch rebased ontomainaa95d35f), twice each, alternating, and undertests/run_all.pywith g++ 13.3 and with clang 23.1.5 asCXXat both commits (the check runs no compiler). The checks that readscripts/hardware_report.pypass at the tip (2 of 2). Before the rebase (on main543846eb) the same ata57cf490and2e3b461c.Not tested: The script against the live issue list (
hardware_report.pyneeds theghCLI signed in to the GitHub repository), so the counts indocs/workflow.mdare not recomputed here; whoever next runs it withghshould 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
type(scope): description) of the status line's type.main. Onto mainaa95d35f, no conflict; the test and fix commits are the same changes as before (git patch-id).python -I -B tests/run_all.pypasses (any failure that also fails onmainis named). The full suite on mainaa95d35f(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_keyandnx2/test_texture_init_barrier.py.third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.mainand passing here.hardware_report.pymisreads a Steam Deck and takes "finally" for an Ally a57cf490bfhardware_report.pycounts a Steam Deck as one, by whole wordsRebased onto
mainaa95d35fwith 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.2e3b461cdad34e96c8b3