fix(tours): a teleport the game did not take is asked again after 5 s, not 60 s, so dev.py ab runs no longer fail at the first one #1922
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1922
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:fix/tour-teleport-not-taken"
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
dev.py abruns were failing at their first teleport, and the ones that didn't lost a minute there. The runs teleport right after the save loads, and at that moment the game's event manager often turns the first request down (the bridge answerssent,accepted: false).map_change(scripts/tours/drive.py) then waited the fullarrive_s(60 s) for an arrival that can't come before it asked again. The teleport's budget is in frames (7,200: two minutes at 60 fps); uncapped at ~90 fps that is ~80 s, so the 60 s wait plus the retry ran past it and the run failed: 3 of 8 runs in two Market A/Bs on my PC, which threw both write-ups away.A send the game did not take is now waited for
NOT_TAKEN_S(5 s) before asking again; a request the game took still getsarrive_s. The refused first teleport now costs ~7 s, and a map that is never left (the Haunted Wasteland case: sent, not taken) still fails after five sends, in ~35 s instead of ~5 min.Read first:
map_changeinscripts/tours/drive.py.Testing
Tested: Linux, RTX 3090 (NVIDIA 620.x), Ryzen 9 7900X:
dev.py ab --a RX_VK_ACQUIRE_AHEAD=0 --b RX_VK_ACQUIRE_AHEAD=1 --scene market --seconds 30 --runs 2from this branch (on #1574's runtime): all four runs measured, two of them after a refused first teleport (~7 s lost each); each run 84-91 s from start to the end of its measurement. Before, from main's driver, the same A/B twice: 3 of 8 runs failed withteleport {'to': 3}: not done after ~7500 frames, each after a 60 s wait followingsent, not moved (accepted False, ...).tests/test_pipeline_tour.pygains a check: five sends to a map that is never left, with the usualarrive_s=60, must take under5 x 60 x (NOT_TAKEN_S + 10)frames (main's driver takes 18,000+, so it fails there); I haven't run it on my PC (CI runs it).Still to test:
mise run test,tests/test_pipeline_tour.pyamong it, expecting a pass (by hand: CI on this pull request)Measurements
Nothing to measure in the game: this changes the test driver's waits, not the game. The time it saves: ~55 s a run that hits a refused first teleport, and no failed runs from it (3 of 8 before).
Risks
A request the game takes late (after 5 s of
accepted: false) is now asked for again sooner, up to five times; a request never taken fails after ~35 s instead of ~5 min, with the same message. Only the tours anddev.py abuse it; nothing changes for players.Checklist
Ready for review
main; the title is a Conventional Commit.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.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
https://claude.ai/code/session_017vw8e3aEPBsd7QfUkaatjP
Tested in game: Linux, RTX 3090, Ryzen 9 7900X: dev.py ab Market A/B, 4 of 4 runs measured (2 after a refused first teleport, ~7 s lost each); before, 3 of 8 failed at it.
Recommendation: Request changes. A refused same-map reload can be reported as successful after five seconds without a reload, corrupting the tour's underwater results. The regression test also cannot demonstrate the claimed behavioral failure on the base because it references a constant that does not exist there.
The change shortens waits after rejected teleport and age requests, which can save tour and A/B runs time. It also needs to handle same-map reloads correctly and make the regression test independent of the new implementation.
Does it help: Unproven: the author reports 3 of 8 base-driver runs failed after a 60-second wait, while 4 branch runs completed, including 2 with roughly 7 seconds lost to a rejected request. Those runs are useful evidence, but the description does not establish matched, interleaved runs at the named base and head or report the new test passing on head and failing for the bug on base.
Other systems: The shared driver also handles age switches and same-map underwater reloads; the latter can falsely succeed after a rejected request. The change does not run in the player game or change GPU, save, audio or input code. The fake bridge test is Linux-only; the requested Linux and Windows suite results and CI results are pending.
Switches: None.
Reviewed:
f7722d5098againsta106df16b2: Read AGENTS.md, CONTRIBUTING.md, the PR template, the diff, commit, changed driver, relevant fake bridge test and bridge acceptance and reload paths. Skimmed the rest of the large test file, standards and bridge documentation. docs/review-checklist.md and the adjacent Tooling checkout were absent; no recorded runs or generated files were included.; nothing run (a code review).Checked and fine:
Blocking (to change before merge)
Suggestions (the author may take or leave)
Testing: Read-only review; no scripts, builds or tests were run. The author reports the new test and suite have not yet been run.
Overlaps and merge order: Not checked: the network is closed and no overlapping pull requests were supplied.
Automated code review by BeanBot (gpt-6.1-terra), on the pull request's opening. Nothing was run; a maintainer decides.
@ -229,3 +233,3 @@# (reload: a teleport to the map Link is in, whose wait for that map is met at once: the load's end instead)wait = {"event": "map", "map": r.get("map")} if cmd == "teleport" and not reload else {"event": "loading_end"}w = g.ask("wait", timeout=arrive_s, **wait)w = g.ask("wait", timeout=arrive_s if r.get("accepted", True) else min(arrive_s, NOT_TAKEN_S), **wait)For reload=true, the caller's want predicate is always true. If this request is not accepted, the five-second timeout falls through to that predicate and reports success without a reload, so the underwater tour records the wrong state. Please require evidence of the load and retry or fail when it was not taken.
@ -668,0 +673,4 @@except drive.Failed as e:if "five times" not in str(e):raiseif fake.frame - start > 5 * 60 * (drive.NOT_TAKEN_S + 10):This constant does not exist on the base, so the test raises AttributeError there instead of failing on the long wait. Please use an independent behavior limit and verify the test fails for the wait on base and passes on head.
WIP: fix(tours): a teleport the game did not take is asked again after 5 s, not 60 s, so dev.py ab runs no longer fail at the first oneto fix(tours): a teleport the game did not take is asked again after 5 s, not 60 s, so dev.py ab runs no longer fail at the first one