test: the game-free checks and the website's build pass on main again #2171
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
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
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2171
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:test/main-checks-pass"
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?
Summary
main's game-free checks had drifted far from the code. Run in CI's image (catthehacker/ubuntu:act-24.04,tests/run_all.py --strict, both shards), about 115 of ~925 failed. The website's build also failed, so longshot.magicbean.dev hasn't deployed since. With this PR, 1 check fails (test_dev_packs, below) and the website builds and passes its checks.Most of it is checks that went stale (about 105 test files). They cut code out of the source and compile it, or look for text in it, and the code moved on. Each was brought up to date, checking the same thing it did. Typical changes:
Where a check covered something that was removed on purpose, only that part went, with the reason beside it.
One check was flaky, not stale.
test_prepare_stall's busy-compile case burned one thread, and the watchdog counts a process as busy at half a CPU. With checks running 24 at once on a loaded PC, that one thread sometimes fell below the line, and the fake compile was stopped at 4 s instead of 12 s: 1 run in 5 failed even alone. It now burns two. Six runs in a row passed.What the checks rightly caught, fixed in the source:
gpu/render/rx_nvn.h: its_Static_asserts are C11, and g++ refuses them in C++. Since #1855,menu/widescreen.cppincludes the header throughvk_api.h, and every g++-built menu check broke. They now go throughNVN_STATIC_ASSERT:static_assertin C++,_Static_assertin C.gpu/vk/vk_colour_vision.cpp,gpu/vk/vk_replay.cpp:vk_work.his the last include again, as its macros require (#1832, #2103).nx2/cmpflags.py: a batch's subtraction V was detected by_fa^_fb. That text is also in ADDS/CMN's~(_fa^_fb), so batches with no subtraction were rewritten one instruction at a time. It now looks for the exact text it replaces. The lift's output is unchanged to the byte.host/mods.c:modcache/mods_json.txt, which tells a build where the mods list is, was only written at start. So when the Mods tab first wrote a--userfolder'smods.json, a build before the next start read the game folder's list instead. The note is now refreshed after each write.gpu/vk/menu_i18n.h: #1859 changed the Output resolution help, and the 13 tables still translated the old text. They're translated again.nx2/build.py: since #1914,vk_vma.cppcallsvmaGetAllocationInfo2, which is VMA 3.1. The build fell back to a system VMA, and Ubuntu 24.04's is 3.0, sovk_vma.cppfailed to compile there. A VMA header without it is now passed over (HEADER_NEEDS,header_declares), and such a build says VMA is missing. Players' builds use the packaged v3.3.0 and see no change.test_target_reuse_memoryandtest_cpm_discoverycheck this rule, including an old VMA given asLONGSHOT_VMA_HEADERS.scripts/devtools/packs.py: FSR 4's own cache (longshot_fsr4_pipelines.bin) is classified.scripts/tours/drive.py: #1582's "an input recording is playing" refusal counts as permanent.The website (
website/src/repo-docs/graphics-settings.ts,docs/user/):&user_pickvalue, each registered by key, the same way the monitor selector is. An unknown action or value still fails the build. Rescan ReShade presets gains the menu help the card needs.CI: the checks need
lz4andunicorn(both pinned inrequirements.txt) andlld. These are added to Forgejo'sci.yml, CircleCI'sshared.ymlandmise run test-deps.Still failing:
test_dev_packs's "a game patch shows in the objects".packs.build_scriptsfollows imports inside functions:build.pyimportschunksin a function, andchunks.edit_cimportsoot_patches. Sonx2/oot_patches.pycounts as one of the build's scripts, and a game-patch change keeps both modules. That wastes time but is never wrong. Narrowing it risks a pack that reuses a stale build, so it's left for its own change.Read first:
gpu/render/rx_nvn.h,nx2/build.py(header_package),host/mods.c(write_state),nx2/cmpflags.py. Then the tests by area.Related: Tooling #27 fixes the release tests that fail the launcher's CI.
Testing
Tested: game-free only.
tests/run_all.py --strictran in CI's own image (catthehacker/ubuntu:act-24.04, Ubuntu 24.04's g++ and clang, the pinned headers, glslang 16.6.0) from a depth-1 checkout of this commit. Shard 1 failed onlytest_dev_packs; shard 2 failed none. Results are in a comment below.scripts/website_check.shpassed in the same image: 20 pages built,check-site.tsclean, 91 of 91 unit tests.Still to test:
--userfolder with nomods.json: switch a mod in the Mods tab, and check thatmodcache/mods_json.txtin the game folder names the user folder'smods.jsonbefore the next start (by hand).build: the Vulkan back end: ... VMA ...in the build log) (by hand).Measurements
Nothing to measure. These are checks, docs and CI, plus source fixes that change no hot path:
cmpflags' output is unchanged to the byte, and the other source changes are a C++ static assert, include order, a note file after a save, and menu text.Risks
vk_vma.cpp. Players' builds are unaffected.HOS_OPTIONS_FILE, removed when the list is beside the game).Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). (tests/run_all.py --strict, both shards, in CI's image: onlytest_dev_packs, which fails onmaintoo, named above)main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.tests/that reads changed source is updated, not weakened.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
Game-free runs, in CI's image (
ghcr.io/catthehacker/ubuntu:act-24.04; Ubuntu 24.04's g++ and clang,lld; the pinned SPIR-V and Vulkan headers; glslang 16.6.0;zstandard pillow numpy lz4 unicornasci.ymlinstalls them). Each run used a depth-1 checkout of the commit, withpython -I -B tests/run_all.py --strict --shard N/2, both shards at once on a 24-thread PC.main(8aa74983, Forgejo's dispatched run)test_prepare_stallfix)test_dev_packs)test_prepare_stall, flaky: fixed in380db5c6)test_prepare_stallalone, after the fixThe shard-1 summary also counts
test_dev_packstwice ("2 failed"). It's the only check that failed there.scripts/website_check.sh, same image: the site built (20 pages),check-site.tswas clean, and 91 of 91 tests passed. Onmainthe build stops at "Incomplete graphics setting".Nothing ran in the game; this PR was opened without a game run, as the person I work for asked.
380db5c6feff55a4b520Rebased onto main (
a053f9e1). The old head was380db5c6, the new one isff55a4b5. The conflicts were in four files, and main had fixed part of the same thing in parallel. The website reader and the ReShade rows' docs now take main's own fix: its "with User selected" badge and its registered ReShade rows. This PR's duplicates of those are gone. tests/test_menu_keys.py takes main's fixture. tests/test_device_policy.py keeps both added switches (acquire_ahead from here, bc_small_runs from main). The full run and the website check are going again in CI's image on the new head; their results will follow here.WIP: test: the game-free checks and the website's build pass on main againto test: the game-free checks and the website's build pass on main again