Use the benchmark card written by each mission run #383
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/383"
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 PastiiJay/klbf-lab. Originally posted by HandshakeHackin on 2026-11-30T20:32:43Z.
On v26.11.23, finish mission A and start B, then interrupt B before it saves a card. Returning to Missions takes the newest card from the past 20 minutes and credits A’s figures to B. In the synthetic replay, A and B both showed 26.9 FPS although B never finished.
The launcher now uses the card filename printed by the benchmark process after the files are written. An interrupted B or a play-only mission contributes no benchmark result. When B finishes, its own card wins even if a different PNG in the folder has a newer timestamp.
The replay and mission suite passed on Windows PowerShell 5.1 and PowerShell 7. The existing launcher logging suite also passed on 5.1. Windows verification
Imported from PastiiJay/klbf-lab. Originally posted by HandshakeHackin on 2026-11-30T20:56:08Z.
Retested on release v26.11.24 (
92aa6f4) with this change, #378, #381 and the depth-state correction from #27. The mission tests and report tests passed on Windows PowerShell 5.1 and PowerShell 7. The same job passed workspace Clippy and the Rust suite (1,311 passed, 48 ignored). The unmodified upstream PR check still fails at the depth-bounds draw test. Windows integration jobImported from PastiiJay/klbf-lab. Originally posted by HandshakeHackin on 2026-12-01T13:13:14Z.
Updated this PR for v26.12.1 at
f8b3e9df. Manual missions, Run all (A/B/A), and Test lab now read the card identified by the child process that ran the benchmark. An interrupted child that writes no card can no longer pick up a concurrent run’s result.I reproduced the issue by giving each child its own card and placing a newer, unrelated card in the same directory. With synthetic inputs of 10, 20 and 10, the unmodified launcher reported 70, 70 and 70. The updated launcher reported 10, 20 and 10. When B was interrupted or wrote a PARTIAL card, Run all stopped at B and kept only A.
The reproduction script passed 16/16 cases on this commit and 2/16 on unmodified v26.12.1. The matrix covers the default and a redirected benchmark directory. All 124 checks in
tests/missions.ps1also passed. I ran these on Linux with PowerShell 7.4.19, using the real launcher and a synthetic child in place of the game.To repeat against either checkout with Python 3 and
pwshon Linux, runpython3 verify_mission_cards.py /path/to/checkout --matrix.Imported from PastiiJay/klbf-lab. Originally posted by PastiiJay on 2026-12-01T13:19:07Z.
thank you, this is excellent work: a reproduction showing 70/70/70 instead of 10/20/10 makes the problem impossible to miss, and 16/16 plus the 124 mission checks on your branch is very convincing. passing it to the team now so they can review it.
Imported from PastiiJay/klbf-lab. Originally posted by PastiiJay on 2026-12-01T13:19:38Z.
a bit of context from the team: since v26.12.1 a card older than the start of the run is already refused, so the "interrupted B takes A's numbers" case no longer happens. your PR also covers a newer unrelated card landing in the folder during the run: rarer, but your approach (reading the card the bench itself wrote) is the right one. the team is reviewing it. thanks again for the depth of this work!
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.