D3D12-PLAYER-SCHEDULE-FLOAT-DURATION: validate float delays and durations in player and player_find #2983
Open
bobcatchris wants to merge 3 commits from
upstream-pr/2983 into main
pull from: upstream-pr/2983
merge into: ProjectLeonida:main
ProjectLeonida:main
ProjectLeonida:claude/loop-total
ProjectLeonida:claude/pops-collision-seed
ProjectLeonida:claude/dstorage-hold-page-reads
ProjectLeonida:claude/host-image-copy-switch
ProjectLeonida:feat/gdk-lifecycle-window-hook
ProjectLeonida:claude/d16s8-uav-nvidia-fallback
ProjectLeonida:feat/mfplat-offline-shim
ProjectLeonida:claude/gameinput-slow-reader
ProjectLeonida:fix/rt-null-barrier-clear
ProjectLeonida:claude/depth-resolve-sample-positions
ProjectLeonida:integration/palmetto-parity
ProjectLeonida:claude/valu-literal-sext
ProjectLeonida:claude/slot74-pool-handle
ProjectLeonida:claude/rgb9e5-uint-alias-view
ProjectLeonida:claude/fssm-root-layout-tables
ProjectLeonida:feat/gdk-speech-display-lifecycle
ProjectLeonida:asset-audio-skip-current
ProjectLeonida:qemmhd/old-9940-rectangle-quad-lists
ProjectLeonida:feat/ws2-offline-shim
ProjectLeonida:qemmhd/rt-d16-unorm-uav
ProjectLeonida:feat/xs-device-stops-7-9
ProjectLeonida:qemmhd/rt-depth-same-base-shapes
ProjectLeonida:qemmhd/rt-lazy-attachment-variant
ProjectLeonida:feat/acphal-xma2-decoder
ProjectLeonida:asset-audio-skip
ProjectLeonida:codex/coord-claim-check-20261124-7e48
ProjectLeonida:feat/xs-frame-pacing-presentx
ProjectLeonida:feat/xs-device-vm-options
ProjectLeonida:old-pr/9844
ProjectLeonida:old-pr/9978
ProjectLeonida:old-pr/9815
ProjectLeonida:old-pr/10057
ProjectLeonida:old-pr/9874
ProjectLeonida:old-pr/9965
ProjectLeonida:old-pr/9863
ProjectLeonida:old-pr/10068
ProjectLeonida:old-pr/10066
ProjectLeonida:old-pr/10067
ProjectLeonida:old-pr/10007
ProjectLeonida:old-pr/10061
ProjectLeonida:old-pr/10065
ProjectLeonida:old-pr/10059
ProjectLeonida:old-pr/10063
ProjectLeonida:old-pr/10055
ProjectLeonida:old-pr/10062
ProjectLeonida:old-pr/10042
ProjectLeonida:old-pr/10041
ProjectLeonida:old-pr/10049
ProjectLeonida:old-pr/10047
ProjectLeonida:old-pr/10046
ProjectLeonida:old-pr/10045
ProjectLeonida:old-pr/10056
ProjectLeonida:old-pr/10043
ProjectLeonida:old-pr/10036
ProjectLeonida:old-pr/10034
ProjectLeonida:old-pr/9984
ProjectLeonida:old-pr/10052
ProjectLeonida:old-pr/10038
ProjectLeonida:old-pr/10033
ProjectLeonida:old-pr/10028
ProjectLeonida:old-pr/10050
ProjectLeonida:old-pr/9891
ProjectLeonida:old-pr/9889
ProjectLeonida:old-pr/10051
ProjectLeonida:old-pr/10019
ProjectLeonida:old-pr/10027
ProjectLeonida:old-pr/10029
ProjectLeonida:old-pr/10031
ProjectLeonida:old-pr/10026
ProjectLeonida:old-pr/9941
ProjectLeonida:old-pr/10030
ProjectLeonida:old-pr/10040
ProjectLeonida:old-pr/9990
ProjectLeonida:old-pr/10021
ProjectLeonida:old-pr/9962
ProjectLeonida:old-pr/10022
ProjectLeonida:old-pr/10020
ProjectLeonida:old-pr/10015
ProjectLeonida:old-pr/10025
ProjectLeonida:old-pr/9886
ProjectLeonida:old-pr/10048
ProjectLeonida:old-pr/10014
ProjectLeonida:old-pr/10011
ProjectLeonida:old-pr/9861
ProjectLeonida:old-pr/10010
ProjectLeonida:old-pr/10008
ProjectLeonida:old-pr/9860
ProjectLeonida:old-pr/10006
ProjectLeonida:old-pr/9920
ProjectLeonida:old-pr/9995
ProjectLeonida:old-pr/10000
ProjectLeonida:old-pr/10016
ProjectLeonida:old-pr/10004
ProjectLeonida:old-pr/10023
ProjectLeonida:old-pr/9982
ProjectLeonida:old-pr/9981
ProjectLeonida:old-pr/9983
ProjectLeonida:old-pr/9970
ProjectLeonida:old-pr/9969
ProjectLeonida:old-pr/9968
ProjectLeonida:old-pr/9971
ProjectLeonida:old-pr/9972
ProjectLeonida:old-pr/9942
ProjectLeonida:old-pr/9963
ProjectLeonida:old-pr/9960
ProjectLeonida:old-pr/9964
ProjectLeonida:old-pr/9985
ProjectLeonida:old-pr/9973
ProjectLeonida:old-pr/9862
ProjectLeonida:old-pr/9953
ProjectLeonida:old-pr/10017
ProjectLeonida:old-pr/9952
ProjectLeonida:old-pr/9955
ProjectLeonida:old-pr/9946
ProjectLeonida:old-pr/9954
ProjectLeonida:old-pr/9938
ProjectLeonida:old-pr/9956
ProjectLeonida:old-pr/9856
ProjectLeonida:old-pr/9947
ProjectLeonida:old-pr/9924
ProjectLeonida:old-pr/9961
ProjectLeonida:old-pr/9927
ProjectLeonida:old-pr/9979
ProjectLeonida:old-pr/10032
ProjectLeonida:old-pr/9926
ProjectLeonida:old-pr/5237
ProjectLeonida:old-pr/9951
ProjectLeonida:old-pr/9931
ProjectLeonida:old-pr/9902
ProjectLeonida:old-pr/9921
ProjectLeonida:old-pr/9994
ProjectLeonida:old-pr/9775
ProjectLeonida:old-pr/9768
ProjectLeonida:old-pr/9905
ProjectLeonida:old-pr/9936
ProjectLeonida:old-pr/9901
ProjectLeonida:old-pr/9904
ProjectLeonida:old-pr/9906
ProjectLeonida:old-pr/9988
ProjectLeonida:old-pr/9908
ProjectLeonida:old-pr/9909
ProjectLeonida:old-pr/9911
ProjectLeonida:old-pr/9912
ProjectLeonida:old-pr/9913
ProjectLeonida:old-pr/9887
ProjectLeonida:old-pr/9916
ProjectLeonida:old-pr/9919
ProjectLeonida:old-pr/9925
ProjectLeonida:old-pr/9933
ProjectLeonida:old-pr/9935
ProjectLeonida:old-pr/9918
ProjectLeonida:old-pr/9879
ProjectLeonida:old-pr/9880
ProjectLeonida:old-pr/9881
ProjectLeonida:old-pr/9996
ProjectLeonida:old-pr/9876
ProjectLeonida:old-pr/9892
ProjectLeonida:old-pr/9899
ProjectLeonida:old-pr/9915
ProjectLeonida:old-pr/9914
ProjectLeonida:old-pr/9872
ProjectLeonida:old-pr/9869
ProjectLeonida:old-pr/9866
ProjectLeonida:old-pr/9819
ProjectLeonida:old-pr/10012
ProjectLeonida:old-pr/9857
ProjectLeonida:old-pr/9893
ProjectLeonida:old-pr/9897
ProjectLeonida:old-pr/9928
ProjectLeonida:old-pr/9868
ProjectLeonida:old-pr/9917
ProjectLeonida:old-pr/9940
ProjectLeonida:old-pr/9873
ProjectLeonida:old-pr/9816
ProjectLeonida:old-pr/10009
ProjectLeonida:old-pr/9900
ProjectLeonida:old-pr/9966
ProjectLeonida:old-pr/9859
ProjectLeonida:old-pr/9843
ProjectLeonida:old-pr/9991
ProjectLeonida:old-pr/10058
ProjectLeonida:old-pr/9883
ProjectLeonida:old-pr/9838
ProjectLeonida:old-pr/9835
ProjectLeonida:old-pr/9959
ProjectLeonida:old-pr/9895
ProjectLeonida:old-pr/9837
ProjectLeonida:old-pr/9858
ProjectLeonida:old-pr/9865
ProjectLeonida:old-pr/9864
ProjectLeonida:old-pr/9840
ProjectLeonida:old-pr/9820
ProjectLeonida:old-pr/4669
ProjectLeonida:old-pr/9848
ProjectLeonida:old-pr/9850
ProjectLeonida:old-pr/9810
ProjectLeonida:old-pr/9799
ProjectLeonida:old-pr/9853
ProjectLeonida:old-pr/9875
ProjectLeonida:old-pr/9831
ProjectLeonida:old-pr/9796
ProjectLeonida:old-pr/9801
ProjectLeonida:old-pr/9813
ProjectLeonida:old-pr/9794
ProjectLeonida:old-pr/7417
ProjectLeonida:old-pr/9781
ProjectLeonida:old-pr/9806
ProjectLeonida:old-pr/9958
ProjectLeonida:old-pr/9809
ProjectLeonida:old-pr/9791
ProjectLeonida:old-pr/9792
ProjectLeonida:old-pr/10053
ProjectLeonida:old-pr/9784
ProjectLeonida:old-pr/9789
ProjectLeonida:old-pr/9849
ProjectLeonida:old-pr/9846
ProjectLeonida:old-pr/9773
ProjectLeonida:old-pr/9785
ProjectLeonida:old-pr/9803
ProjectLeonida:old-pr/9826
ProjectLeonida:old-pr/9839
ProjectLeonida:old-pr/9922
ProjectLeonida:old-pr/9948
ProjectLeonida:old-pr/7189
ProjectLeonida:old-pr/9957
ProjectLeonida:old-pr/9823
ProjectLeonida:old-pr/9807
ProjectLeonida:old-pr/9851
ProjectLeonida:old-pr/9774
ProjectLeonida:old-pr/9830
ProjectLeonida:old-pr/9836
ProjectLeonida:old-pr/9822
ProjectLeonida:old-pr/9783
ProjectLeonida:old-pr/9833
ProjectLeonida:old-pr/9890
ProjectLeonida:old-pr/9770
ProjectLeonida:old-pr/9769
ProjectLeonida:old-pr/9772
ProjectLeonida:old-pr/9787
ProjectLeonida:old-pr/9852
ProjectLeonida:old-pr/9834
ProjectLeonida:old-pr/9845
ProjectLeonida:old-pr/9871
ProjectLeonida:old-pr/9771
ProjectLeonida:old-pr/9776
ProjectLeonida:old-pr/10005
ProjectLeonida:old-pr/9949
ProjectLeonida:old-pr/9923
ProjectLeonida:old-pr/9805
ProjectLeonida:old-pr/9829
ProjectLeonida:old-pr/9790
ProjectLeonida:old-pr/9827
ProjectLeonida:old-pr/9929
ProjectLeonida:old-pr/9855
ProjectLeonida:old-pr/9934
ProjectLeonida:old-pr/9907
ProjectLeonida:old-pr/9910
ProjectLeonida:old-pr/9779
ProjectLeonida:old-pr/9780
ProjectLeonida:old-pr/9885
ProjectLeonida:old-pr/9882
ProjectLeonida:old-pr/9877
ProjectLeonida:old-pr/9998
ProjectLeonida:old-pr/4251
ProjectLeonida:old-pr/9987
ProjectLeonida:old-pr/9989
ProjectLeonida:old-pr/9950
ProjectLeonida:old-pr/9777
ProjectLeonida:old-pr/10044
ProjectLeonida:old-pr/9884
ProjectLeonida:old-pr/2906
ProjectLeonida:old-pr/5076
ProjectLeonida:old-pr/9937
ProjectLeonida:old-pr/9986
ProjectLeonida:old-pr/3014
ProjectLeonida:old-pr/9943
ProjectLeonida:old-pr/9939
ProjectLeonida:old-pr/4682
ProjectLeonida:old-pr/4765
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
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
ProjectLeonida/mandy!2983
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2983"
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?
Imported from ubiquitarianism/leonida. Originally posted by bobcatchris on 2026-12-01T22:26:06Z.
Summary
Claimed in the coordination issue as:
D3D12-PLAYER-SCHEDULE-FLOAT-DURATION(https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7325108548).Guards floating-point delay, duration, and schedule env parsing against
NaN,inf,-inf, and out-of-range values ind3d12/apps/leonida/src/:player.rs(parse_teleport): replaces rawDuration::from_secs_f32(delay)/ unvalidated floats forLEONIDA_TELEPORTwith finite checks andDuration::try_from_secs_f32(n[0].max(0.0))(rejecting non-finite coordinates orholdvalues too).player.rs+player_find.rs(parse_find_schedule,parse_probe_at):LEONIDA_FIND_PLAYERuses positional parsing withis_finite()+Duration::try_from_secs_f64fordelayandis_finite() && *s >= 0.0andDuration::try_from_secs_f64forseconds(preventing bothDurationpanics oninf/1e30and unbounded1e30/1e308/NaN/infsampling timeouts).LEONIDA_PLAYER_PROBEstoresOption<Duration>viaparse_probe_atand computesat.saturating_sub(config.started.elapsed()), preventingDuration::from_secs_f64panics oninf/1e30.parse_find_schedule/parse_probe_atunder#[cfg(any(feature = "diagnostics", test))]soplayer::testsexercises all three parsers in CI's defaultcargo test --workspacerun as well as--features diagnostics.Tests & Verification
parse_teleportandparse_probe_attoDuration::from_secs_f32/f64: 2/2 new tests FAIL (RED_BOTH_EXIT=101).cargo clippy --locked --no-deps -p leonida --all-targets -- -D warnings: 0 warnings, exit 0.cargo test --locked -p leonida --bin leonida -- player::tests: 4 passed, 0 failed.cargo test --locked -p leonida --bin leonida --features diagnostics -- player::tests: 4 passed, 0 failed.python -I tools/d3d12_switches.py --check d3d12/docs/switches.md: exit 0.python -I scripts/check_no_game_data.py d3d12/apps/leonida/src/player.rs d3d12/apps/leonida/src/player_find.rs: exit 0.AI Assistance
AI-assisted: Gemini 4 Neon (including separate read-only independent review passes, APPROVE).
Imported from ubiquitarianism/leonida. Originally posted by andrew-ai on 2026-12-01T22:30:49Z.
Two remaining edge cases in parse_teleport at
e74ca4752. I compiled the exact parse_numbers and parse_teleport functions into a standalone Rust harness:These behaviors carry over from the parent. A missing or mistyped coordinate is silently removed by filter_map, so the intended hold becomes Z. A finite but unrepresentable hold saturates at just under 50 days. The documented syntax is positional. Rejecting those inputs in the teleport-specific parser would preserve the existing tolerant parse_numbers helper for its other callers. Valid space- and semicolon-separated controls still parsed as expected. Parser-only verification, no game run. Codex-assisted for #2570.
Imported from ubiquitarianism/leonida. Originally posted by bobcatchris on 2026-12-01T22:45:51Z.
Updated in fast-forward commit
8278ef1b9to address both edge cases inparse_teleportfrom @andrew-ai:parse_teleportnow parses every field directly (splitting by,/;when present or whitespace otherwise) and requires4..=5finite floats instead of delegating toparse_numbers'sfilter_map, so5,1,typo,3,500and5,1,,3,500are rejected (None) rather than shifting coordinates/hold whileparse_numbersremains unchanged for its other callers.f64::from(h) <= f64::from(u32::MAX)before converting tou32, rejecting values such as1e30(andu32::MAX as f32which rounds up to2^32).Re-verified
cargo test --locked -p leonida --bin leonida -- player::tests(4 passed, plain and--features diagnostics),cargo clippy --locked --no-deps -p leonida --all-targets -- -D warnings,d3d12_switches.py --check,check_no_game_data.py, and an independent read-only review.AI-assisted
Imported from ubiquitarianism/leonida. Originally posted by andrew-ai on 2026-12-01T22:50:26Z.
Rechecked
e74ca4752and8278ef1b9with the same standalone Rust harness. Both malformed-coordinate reproductions and the 1e30 hold now return None. The semicolon-delimited 500 ms control and the whitespace-delimited default hold still give the original target and duration.One boundary regression: the literal hold 4294967295 (u32::MAX milliseconds) was accepted at the earlier head and now returns None. Parsing the fifth field as f32 first rounds that valid integer up to 4294967296 before the range check. The new round() also changes a 1.9 ms hold from 1 to 2 ms. Parsing the hold separately as f64 would preserve every u32 integer; retaining truncation would preserve existing fractional inputs. A useful boundary pair for the test is 4294967295 (accept exactly) and 4294967296 (reject). Parser-only verification, Codex-assisted.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T22:58:40Z.
The finder still accepts finite sampling lengths that cannot fit in a Duration.
I compiled the exact
parse_find_schedulefrom8278ef1b9integrated into002bd88f8, and compared it with the original argument parsing on that main.5,NaNand5,infnow fall back to(5 s, 240 s), which is the intended improvement.5,1e30and5,1e308still return(5 s, 1e30 s)and(5 s, 1e308 s). Both values failDuration::try_from_secs_f64. The finder compares floating-point elapsed seconds withconfig.seconds, so there is no immediate conversion panic here, but the normal elapsed-time check provides no usable stop for these inputs. The finite overflow cases are unchanged from main.A focused regression case is
assert_eq!(parse_find_schedule("5, 1e30"), (Duration::from_secs(5), 240.0));. The sampling length could use the same representability check as the delay while preserving valid fractional seconds. The parser-only controls5,2.5,5,0, and1e30,30give(5 s, 2.5 s),(5 s, 0 s), and(90 s, 30 s). Independently rechecked from the raw matrix. Synthetic inputs only. AI-assisted with OpenAI Codex.Imported from ubiquitarianism/leonida. Originally posted by imShangLi on 2026-12-02T05:17:33Z.
VERIFY-2983 — Linux, Fedora 45, Rust 1.98.1 (the pinned toolchain), cross-compiled for x86_64-pc-windows-gnu, Wine 11.21, no GPU device, no game files
Verdict: PASS. The pull request pulls the three environment-variable parsers of the
leonidabinary out of the code that uses them and makes them total: a value that is not a finite number in range is refused instead of being carried into aDuration(where it panics) or into the title's memory (where it is garbage). The two new unit tests cover the parsers, every other test of the crate still passes, and the bugs the change fixes are real - I reproduced them on the base.Head
8278ef1b, base the currentmain(8422def7), merge base66c79286, 2 files, +101/−20:d3d12/apps/leonida/src/player.rs,d3d12/apps/leonida/src/player_find.rs.1. What it changes
LEONIDA_TELEPORT,LEONIDA_FIND_PLAYERandLEONIDA_PLAYER_PROBEare parsed withf32::parse/f64::parse, which acceptnan,infand1e30, and the results went straight intoDuration::from_secs_f32/from_secs_f64(which panic on a value that is too big or NaN) and into the title's memory (which takes NaN coordinates).The change gives the three parsers their own functions, and each one refuses what it cannot use:
parse_find_schedulefalls back to the defaults (90 s, 240 s) for a delay or a duration that is not finite or not in range, andparse_probe_atanswersNonefor one.Config::probe_atbecomes aDurationinstead of anf64, and the probe waitsat.saturating_sub(elapsed)instead of subtracting twof64s.2. The new test checks the property that matters
Two unit tests in
player::tests:parse_teleport_rejects_non_finite_and_out_of_range_durationsandfind_schedule_and_probe_at_handle_non_finite_and_out_of_range. They cover the values that used to hurt:nan,inf,1e30, a negative number, a non-number in the middle, a missing field and one field too many.The red side cannot be built - the tests call functions the pull request adds - so the tool fell back to comparing the merge base with the head. The old code's behaviour is what the tests are about, so I reproduced it directly (a scratch program with the base's expressions):
So on the base:
LEONIDA_TELEPORT=1e30,1,2,3panics in the teleport thread (the teleport never happens),LEONIDA_TELEPORT=5,1,2,3,1e30holds the key for 49.7 days (f32 as u32saturates), andLEONIDA_FIND_PLAYER=1e30panics in the finder thread the same way (player_find.rs:241on the base), so the player is never found. With the change all three are refused, and the defaults are used instead.3. What the tests do here
leonida-gpuand therefore theleonidaapp do not compile on Linux (6 errors inleonida-gpu), so the crate was cross-compiled forx86_64-pc-windows-gnuand its tests were run under Wine 11.21.The 45 tests that pass on both sides are the crate's unit tests (
agility,census,game_actions,leonida,player,player_context,run,translate); they are pure logic and need neither a device nor a title, so nothing here is a test that returned early and tested nothing.4. Any failure I saw, and why it is not this pull request
None. Both sides are green, and the two new tests are the only difference.
One behaviour change worth naming: the base ignored any field after the fifth (
LEONIDA_TELEPORT=5,1,2,3,500,600was accepted, with the extra ignored), while the change refuses it, since the format is<delay s>,<x>,<y>,<z>[,<hold ms>]. That is stricter, and the pull request's own test says so.5. What I did not check
LEONIDA_TELEPORTis read when the title's image is known, so the end-to-end panic (a bad value in the environment at startup) was not reproduced through the program; I showed it with the base's own expressions in a scratch program instead.mingw64GNU toolchain, not MSVC: the crate is Windows-only, so this is the closest thing to the CI'swindows-latestrun available here; the numbers above are from the cross-compiled build.Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T12:34:17Z.
This pull request touches the render path, so it needs an in-game run before it can be merged: unit tests and CI do not catch rendering regressions (a device loss after an earlier merge is why this gate exists).
Could you, or anyone with a working setup, post a run report on the current head merged onto current
main:mainSHA it was merged onto;mainalone for comparison, if you can.Please do not attach logs or screenshots that show game content. If a run on this exact head is already posted, a link to it in a reply is enough.
AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T18:02:42Z.
Code review only, not built (Windows-only
leonidaapp). Ready, with one small follow-up.8278ef1b9, merge base66c79286f, 342 behind currentmain45dc41f95. A trial merge is clean. CI on the head: all 6 checks pass.Review of
d3d12/apps/leonida/src/player.rsandplayer_find.rs:parse_teleport,parse_find_scheduleandparse_probe_atare pulled out and made total, sonan,infand out-of-range values no longer reachDuration::from_secs_f*, which panics on them, or the title's memory.probe_at: Option<Duration>withsaturating_subremoves the float subtraction.parse_teleportnow requires 4 to 5 finite fields and a hold that fits inu32, checked inf64becauseu32::MAX as f32rounds to 2^32.Follow-up, open since merzleckeier's comment:
parse_find_schedule("5, 1e30")still returns a sampling length of1e30s (likewise1e308). It does not panic, because the finder comparesf64seconds, so this is unchanged frommain. But the elapsed-time stop never fires. Applying the sameDuration::try_from_secs_f64representability check tosecondsas to the delay, with the suggestedassert_eq!(parse_find_schedule("5, 1e30"), (Duration::from_secs(5), 240.0)), would make the parser total for both fields.Verdict: ready. The follow-up is optional, a diagnostics switch only.
AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.
Generated by Claude Code
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T18:21:29Z.
RUN (in game, batch of seventeen render-path pull requests), each head merged with
git merge --no-ffonto main3c106eb2f, in one build: #311115b579756, #29485284c6eae, #26981f188c4f7, #294644bf554fe, #3001d924cbb65, #28320c861595a, #291558e8535cf, #2822d359a2f85, #2896c9c6b103d, #29838278ef1b9, #3115ba5121192, #2945d2c08c14f, #297574512d658, #295126da88e8e, #2800b6ebcedd4, #28937c7e99b48, #3113fa1460b6b(and #30970d7a451ab, merged since). RTX 4060 8 GB, driver 610.88, Windows 11. Series S,-Resolution 1080, frame generation 2x, the same walking route as the other runs on this machine, 330 s after reaching the world.The drops under 5 fps line up with shaders being translated while walking (about 500 translations in the last 330 s): this batch changes the shader translation, so the shader cache built by earlier runs did not apply and the pipeline precompile alone took about 45 minutes. The batch-5 run on the same machine and route had no sample under 5 fps (median 16.4). I read this as cold-cache stutter, not as a regression of a single pull request, but this run cannot tell them apart.
Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it.
Limits: one run; arrival in the world was driven by keys and not checked on pictures. A first attempt of this batch is not counted: the run script gave up waiting for the game window after 40 minutes of precompile.
AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by bobcatchris on 2026-12-02T21:03:57Z.
@andrew-ai @merzleckeier @MoonEyes Updated in fast-forward commit
0c06251a0to address all three remaining points:u32::MAX& fractional truncation inparse_teleport(d3d12/apps/leonida/src/player.rs): Parse fields0..4as finitef32and the optional 5thholdfield directly asf64(finite,<= f64::from(u32::MAX)) with truncation (h.max(0.0) as u32), so4294967295returnsSome(..., u32::MAX),4294967296returnsNone, and1.9truncates to1(addressing@andrew-ai).parse_find_schedule: RequireDuration::try_from_secs_f64(*s).is_ok()onsecondsso5, 1e30and5, 1e308fall back to240.0(matching the doc comment and addressing@merzleckeier/@MoonEyes).4294967295,4294967296,1.9,-inf, and5, 1e30/5, 1e308.Note for
@MoonEyes: new commit0c06251a0advances the head past8278ef1b9, so#2983will need re-inclusion in a batch in-game run.Verified on Windows 11 (Rust 1.98.1):
cargo test --locked -p leonida --bin leonida -- player::tests(default and--features diagnostics): 4 passed, 0 failedcargo clippy --locked --no-deps -p leonida --all-targets -- -D warnings: 0 warnings, exit 0python -I tools/d3d12_switches.py --check d3d12/docs/switches.md&python -I scripts/check_no_game_data.py d3d12/apps/leonida/src/player.rs: exit 0APPROVEAI-assisted: Gemini 4 Neon
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T05:08:31Z.
VERIFY-2983 — 115 líneas en
player.rsy 1 test en todo el binario, que es el número que quiero mirarEl título:
D3D12-PLAYER-SCHEDULE-FLOAT-DURATION: validate float delays and du…— validar retrasos en coma flotante y duraciones.Y el cambio es de los que se prueban solos: un jugador de grabación que recibe un
floatde un fichero y lo usa como espera —NaN,inf, negativo, cero, o un valor absurdo. Eso es una función pura sobre un número, y se prueba con cinco valores.El binario entero tiene un test. No digo que este PR deba traer la suite; digo que con 115 líneas de validación de un valor, el caso que el PR arregla es exactamente el que no está en ese único test.
Lo que verifiqué: el binario compila y su único test pasa — lo cual, para un cambio de validación de entrada, no dice casi nada.
Lo que no puedo verificar: un fichero de jugador con un
NaNdentro, porque eso requiere el título y una grabación; pero la función que lo valida no.Y la pregunta, en una línea: ¿qué hace el jugador con
inf? Si la respuesta es «lo que hiciera antes», el cambio cubreNaNy deja el otro caso abierto.Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T05:17:17Z.
Rechecked
0c06251amerged cleanly ontod9b618f10. I cross-built the Windows MSVCleonidatest binary and ranplayer::tests::under Wine, both with the default features and with--features diagnostics. Each run executed all four tests, with zero skips or failures. The tests cover theinfand-infcases, the1e30/1e308sampling lengths from my earlier review, the exactu32::MAXhold boundary, and fractional hold truncation.main.rsincludes theplayermodule only for Windows targets, so Windows-target output is the relevant test count for the parser. This verifies the current head’s parser follow-up using synthetic inputs. AI-assisted with OpenAI Codex.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.