fix(agent): a press the starting game has not read is pressed again #11

Merged
HumanBean merged 1 commit from HumanBean/Beanstalk:fix/press-while-starting into main 2026-11-15 18:25:36 +00:00
Owner

Closes #10.

Why

To load a save, the agent presses A about once a second until the game is in play. Each press waits up to 30 s for the game to read it.

On a PC whose driver shader cache starts empty, the game first spends minutes preparing its pipelines and reads no input during that time. The first unread press ended the run with "a step ran out of time: timeout: the game did not read the controller", about 34 s in. This happened on 5 jobs on @jabbaxipil's PC: Longshot #718, #461, #772 (twice) and #751.

What changed

  • PressWhileStarting: a press the game didn't read in time (the bridge's timeout) no longer ends the run, and the agent presses again. Any other bridge error still ends it.
    • Used for loading a save (IntoPlayAsync) and for starting a new game (NewGameAsync).
    • In a new game, a press that wasn't read doesn't count toward the every-fourth-press PLUS.
  • The time allowed to get into play rises from 600 s to 900 s (IntoPlayLimit). On that PC the pipeline preparation alone took over 560 s.

Testing

  • Agent core checks pass: 1557. The new checks cover a press read, a press not read (false, not an error), another bridge error (still thrown) and the limit.
  • Not run against a real game here.

Not in this PR

The issue's other suggestion: keep a driver shader cache between runs, so each start doesn't pay the whole preparation. That changes what a run measures (cold or warm start), so it belongs in its own PR. It would keep a cache per side (main, the PR) within a job, never shared between them.

Closes #10. ## Why To load a save, the agent presses A about once a second until the game is in play. Each press waits up to 30 s for the game to read it. On a PC whose driver shader cache starts empty, the game first spends minutes preparing its pipelines and reads no input during that time. The first unread press ended the run with "a step ran out of time: timeout: the game did not read the controller", about 34 s in. This happened on 5 jobs on @jabbaxipil's PC: Longshot #718, #461, #772 (twice) and #751. ## What changed - `PressWhileStarting`: a press the game didn't read in time (the bridge's `timeout`) no longer ends the run, and the agent presses again. Any other bridge error still ends it. - Used for loading a save (`IntoPlayAsync`) and for starting a new game (`NewGameAsync`). - In a new game, a press that wasn't read doesn't count toward the every-fourth-press PLUS. - The time allowed to get into play rises from 600 s to 900 s (`IntoPlayLimit`). On that PC the pipeline preparation alone took over 560 s. ## Testing - Agent core checks pass: 1557. The new checks cover a press read, a press not read (false, not an error), another bridge error (still thrown) and the limit. - Not run against a real game here. ## Not in this PR The issue's other suggestion: keep a driver shader cache between runs, so each start doesn't pay the whole preparation. That changes what a run measures (cold or warm start), so it belongs in its own PR. It would keep a cache per side (`main`, the PR) within a job, never shared between them.
fix(agent): a press the starting game has not read is pressed again
Some checks are pending
CI / Coordinator tests (pull_request) Waiting to run
CI / Agent build and checks (pull_request) Waiting to run
CI / Coordinator image (pull_request) Waiting to run
CI / Conventional Commit title (pull_request) Successful in 3s
CI / Workflow lint (actionlint) (pull_request) Successful in 4s
c2aca6c5f7
Closes #10. Loading a save (and starting a new game) presses A until the
game is in play, within a limit. Each press waits 30 s for the game to read
it, and a press not read ended the run with "the game did not read the
controller": on a PC whose driver cache starts empty the game spends minutes
preparing its pipelines first, so every save start failed after about 34 s.
A press not read is now pressed again, and only the limit ends the wait. The
limit is 900 s, up from 600 s: the preparation alone took over 560 s there.

Assisted-by: Claude Opus 5.5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign in to join this conversation.
No reviewers
No milestone
No project
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.

Dependencies

No dependencies set

Reference
MagicBeanDev/Beanstalk!11
No description provided.