fix: main's game-free checks pass again, and the Custom fog percentage rows show their % #3294
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!3294
Loading…
Reference in a new issue
No description provided.
Delete branch "llun/Longshot:fix/tests-failing-on-main-de091ae"
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
On
main(de091ae29) many game-free checks failed on Windows: 16 oftests/, andtest_lifterat three steps(rustfmt, clippy and
cargo test). Most were checks left behind by merges that changed the code they cut or stand infor. Once cargo no longer stopped at its first failing crate,
cargo testshowed nine more failing Rust tests. This PRbrings every one of them up to the current source, none of them weakened. It is one pull request on purpose: main's
broken tests fixed together.
One of them was a real bug players see. On Graphics → Detail → Volumetric Fog with the Custom preset, Scattering
strength and Emission attenuation show their value as
0.0or100.0, without the%. #3241 gave those rows atextWhen(the "Previous value" text). A slider with atextWhenhas texts of its own and is sent to the menu with nounit (
unitnull, the rule since #2822), so the fog row's label lost its%. The row now shows its value's text as thegame words it, as its options already do:
0%,100%(game/mods/menu/src/rows.tsx). The menu's own fog test (#3241's)caught it once it ran; it now expects
0%.How to see the bug on
main: open Graphics → Detail → Volumetric Fog, choose Preset Custom, and move Scatteringstrength one step right of Game's: the value reads
0.0.The checks, each brought to the source it reads now:
test_aim_invert: the Sprint enum in its cut ofnn_hid.c(#2038).test_cheat_items:INVENTORY_ITEMSnamesRUPEE_ITEMby its constant (#2814); the check reads such a constant'svalue from
travel.rs, and fails when one is not there.test_dlssg: the stand-in isui_modal, asvk_dlssg.cppcalls since #3208.test_fallback_depth_hold: the cut ends atfallback_list_held, not atdraw().test_i18n_complete: Fill title screen (#3016) and its help in the 13 languages.test_input_background,test_walk_key:hos_mouse_native_held(#352). The hold case checks the new rule: ZR keepsthe native camera, only L and R give the mouse to the stick, and ZR and L are told as held.
test_nvn_bind_span,test_nvn_watch_tex:hos_ctx_stack(#1954); the watch's cut ends beforebind_array(#2018).test_present_image_free,test_present_held_image,test_present_acquire_ahead,test_present_semaphores:VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXTand the Fullscreen mode row's stand-ins (#3247).test_settings_area_keys:mouse_aim_sensitivityis system/controls' (an area mod):&opts.in FROZEN (#352).test_thread_lookup:HosThread.ctxandhos_setjmp_forget, now also checked: a destroyed thread's context is forgotten.test_vk_draw_overhead_lean:skin_check_needed's MAKO row (#3211), with a broken variant of its own.test_lifter:cargo fmt --all(drift from several merges); api's clippy (flag_exps.rs,settings_host.rs's test);build-driver's test's calls (#3168; modtool's, #3165, was fixed on
mainmeanwhile by #3280), then:longshot_astc_kinds.bin(#3259) is listed as the cache folder's own. Unlisted it was already treatedso; whether runtimes should share it instead is #3259's author's call.
inside, and the "two headers disagree" check is tested on a parsed module (the raw case is still checked, refused
at the read); the frame-header case leaves
.text's hash unchecked, as it edits MOD0 there.settings_now's test reads RETIRED's keys fromtest_menu_ini_keys.py(#3241's Rayleigh keys, writtenone a line there), and leaves out the old absolute fog values that a percentage replaces when the file is read.
Fullscreen mode (#3247) and Invincible (#3255); the settings table lists Volumetric Fog before Ray tracing (#2966).
Left out:
sysmod-widescreen'sthe_renderer_names_no_program_of_ours. It says the renderer names none of thewidescreen mod's programs, and #2966 names the fog composite's key
1a7482c0ec9991eaingpu/vk/vk_rt_gi.cpp,vk_rt_refl.cpp,vk_rt_lamps.cppandvk_rt_scene.cpp. Exempting those files would weaken the check; giving the RTcode the key another way is a ray tracing design change, left for #2966's author.
ffi-gen'sthe_repositorys_files_are_current(host/game_host.h'srx_menu_openhas no doc comment) stays as it is too.Read first:
game/mods/menu/src/rows.tsx(the fog label), then the test changes one by one.See #3241
See #2822
See #2966
Testing
Tested: Windows 11 (build 26300), RTX 5080, driver 621.47, headless through the PC's job queue, this branch's
runtime over the shared base (
de091ae29) andmain's (rt --empty), from the repository savekokiri-start:Fog:
mainshows0.0and100.0, this branch0%and100%(pictures below).did not start in either log.
main8c0beeec5, which brought only #3288 (content) and#3280 (the UI kit's Section, a modtool test): the same menu and fog code.
The checks, on Windows (llvm-mingw, gnullvm Rust):
mise run test -- --jobs 12, before the rebase (38e67bb92onde091ae29): 898 passed, 3 failed, 55 skipped:test_lifteratffi-genonly (left out above; cargo stops there, so widescreen's test, also left out, comes afterit), and
test_fallback_buffer_cleanupandtest_recorder_own_idle, which timed out under the load (a fixture's10 s) and pass alone (2 of 2). The first full run, on this PR's first commit, had 899 passed and 2 failed:
test_lifterandtest_renderer_new_handler(a 30 s timeout; passes alone in 0.9 s).cargo fmt --all --checkandcargo clippy --locked --workspace --all-targets -- -D warningspass;cargo test --release --no-fail-fastof modtool, content, api and longshot-game passes but for modtool'sthe_fps_counter_passes_its_tests, a timing check ("every frame well under the script budget", 2 ms): 2.73 ms and 2.23 ms with another session's tests running on the PC, then 2.05 ms, pass, pass. Nothing it reads (game/mods/fps-counter,game/modapi) differs frommain.cargo test --locked --release --workspace --no-fail-fast: every crate passes butffi-genandsysmod-widescreen,the two left out above.
cargo clippy --locked --workspace --all-targets -- -D warningsandcargo fmt --all --check: pass.test_menu_ini_keyspass;test_vk_draw_overhead_leanskips there (no Vulkan headers), it passes on Windows.
mainthe 16 checks fail as listed, andtest_lifterfails at rustfmt, clippy and (with--no-fail-fast) theRust tests named above.
Still to test:
0%and100%(by hand, or @Beanstalk on Linux: open Graphics → Detail →Volumetric Fog, Preset Custom, move Scattering strength one step right of Game's, expecting
0%).Measurements
Nothing to measure: test fixes, translations and a menu label.
Risks
The fog label is the only change players see; the other changes are tests, docs and translations (machine-written,
13 languages). A revert is enough. Nothing changes in saves or
settings.toml.Checklist
Ready for review
main; the title is a Conventional Commit. (main's broken checks, together on purpose)mise run testpasses (any failure that also fails onmainis named).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here. (the menu's fog test,menu.test.ts, run bycargo test -p modtool)tests/that reads changed source is updated, not weakened.mainand here, for a change that shows on screen.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
Tested in game: Windows 11 (26300), RTX 5080, driver 621.47, headless through the job queue, from kokiri-start: Graphics > Detail > Volumetric Fog, Preset Custom: main shows Scattering strength 0.0 and Emission attenuation 100.0, this branch 0% and 100%. Menu in German: Graphics > Bildschirm > Titelbildschirm füllen and its help shown. Both runs reached play and the menu, no FATAL, exception or system mod failure in the logs.
The pictures Testing names (in-game, headless, kokiri-start). 1: main
de091ae29, Custom fog: Scattering strength 0.0, Emission attenuation 100.0. 2: this branch, the same rows: 0% and 100%. 3: this branch with the menu in German: Titelbildschirm füllen and its help.@review
Recommendation: Approve. The Windows comparison shows the fog percentages correctly, but the Linux menu check named in the pull request and the head CI checks are still outstanding. Nothing blocking is left. Recommend approval; not approved on the forge.
The change restores stale game-free fixtures, adds missing translations, and shows percentage units on Custom fog rows. It improves the menu and test suite, though one test no longer checks preservation of legacy fog values.
Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Yes for the reported menu bug: the author's Windows comparison shows 0.0 and 100.0 on main versus 0% and 100% on the branch. This is not a performance change.
Other systems: The menu formatting is shared across operating systems and GPUs; Windows was tested in game, while the requested Linux check remains open. The remaining changes principally affect test fixtures, translations and documentation.
Switches: None added, changed or removed.
Reviewed:
99e4dd268bagainst8c0beeec5d: Read the repository rules, PR template, standards, commit messages and diff; read rows.tsx and the relevant settings, fog and test code around the changes. Skimmed translations and the remaining changed files; did not read every changed code file in full. docs/review-checklist.md and the adjacent Tooling checkout were absent.; nothing run (a code review).Checked and fine:
Testing: No commands from the project or tests were run, as requested. The author reports Windows game and game-free runs; CI is still running and the PR lists a Linux fog check as still to test.
Overlaps and merge order: Not checked; network access is closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.