fix(agent): a teleport waits for the game to settle and moves an event's text on, and a long log keeps its rare lines #135

Merged
HumanBean merged 1 commit from HumanBean/Beanstalk:fix/settle-before-teleport into main 2026-11-21 18:12:31 +00:00
Owner

Summary

Teleports that never happen. Starts that ran out of time at a teleport from the Kokiri checkpoint (53 scenarios in 4 days, main and PRs alike) left cheats: teleport waits until the current event ends in the 3 logs that still had it. The save counts as in play the moment it first is (IntoPlayAsync), the teleport goes out a few frames later into an event that starts just then, and that event does not end by itself. Longshot's own resend (#1046) doesn't touch it: 7 of 7 reports on builds with it still had such a start. The farm's retries (3 over 9 s) and resends met the same event.

  • ScenarioRunner.SettleAsync, before a teleport or an age switch: in play, no load and no event, for 2 s in a row. An event in play that lasts 5 s is pressed through with A about once a second, as NewGameAsync already does for a new save's dialogue (while an event plays, A moves its text on and talks to no one). It never presses A during a load or out of play. After 60 s the step goes ahead as before.
  • Refused for an event: asked again once the game has settled (other refusals: 3 s, as before). Taken and not carried out: settled before it is sent again, and not sent again if it arrived meanwhile.
  • The decision is ScenarioRunner.Settle, a pure function of status and time.

Reports that don't say why. Every frame's vk: a submit's memory work line filled the 64 KB log_tail with the last minute of the run. Report.FoldRepeats: a log over the cap keeps the first and last 3 of each line repeated alike (but for its numbers), with one [beanstalk] N more lines like "..." left out from here line, so the tail reaches back over the whole run. A log under the cap is unchanged.

Docs: docs/test-plan.md (the teleport and age steps), docs/report-schema.md (log_tail). Nothing on screen changes.

Testing

Tested on the farm's server, in a container (dotnet/sdk:10.0): build, then test_agent_core.py --strict: 2386 checks passed. New checks: Settle (2 s to settle, A only after 5 s of an event in play, a new event starts its own 5 s, never A in a load or out of play, a status without event fields waits) and FoldRepeats (4000 alike lines around two rare ones fold to 9 lines that keep both, and the tail keeps them; a short log is untouched).

Still to test: in the game. No game was run here (this PC runs no farm jobs). The next nightly's reports: starts from save:kokiri-start that reach their map, and the cheats: lines in tails.

πŸ€– Generated with Claude Code

## Summary **Teleports that never happen.** Starts that ran out of time at a teleport from the Kokiri checkpoint (53 scenarios in 4 days, main and PRs alike) left `cheats: teleport waits until the current event ends` in the 3 logs that still had it. The save counts as in play the moment it first is (`IntoPlayAsync`), the teleport goes out a few frames later into an event that starts just then, and that event does not end by itself. Longshot's own resend (#1046) doesn't touch it: 7 of 7 reports on builds with it still had such a start. The farm's retries (3 over 9 s) and resends met the same event. - `ScenarioRunner.SettleAsync`, before a teleport or an age switch: in play, no load and no event, for 2 s in a row. An event in play that lasts 5 s is pressed through with A about once a second, as `NewGameAsync` already does for a new save's dialogue (while an event plays, A moves its text on and talks to no one). It never presses A during a load or out of play. After 60 s the step goes ahead as before. - Refused for an event: asked again once the game has settled (other refusals: 3 s, as before). Taken and not carried out: settled before it is sent again, and not sent again if it arrived meanwhile. - The decision is `ScenarioRunner.Settle`, a pure function of status and time. **Reports that don't say why.** Every frame's `vk: a submit's memory work` line filled the 64 KB `log_tail` with the last minute of the run. `Report.FoldRepeats`: a log over the cap keeps the first and last 3 of each line repeated alike (but for its numbers), with one `[beanstalk] N more lines like "..." left out from here` line, so the tail reaches back over the whole run. A log under the cap is unchanged. Docs: `docs/test-plan.md` (the `teleport` and `age` steps), `docs/report-schema.md` (`log_tail`). Nothing on screen changes. ## Testing **Tested** on the farm's server, in a container (`dotnet/sdk:10.0`): build, then `test_agent_core.py --strict`: 2386 checks passed. New checks: `Settle` (2 s to settle, A only after 5 s of an event in play, a new event starts its own 5 s, never A in a load or out of play, a status without event fields waits) and `FoldRepeats` (4000 alike lines around two rare ones fold to 9 lines that keep both, and the tail keeps them; a short log is untouched). **Still to test:** in the game. No game was run here (this PC runs no farm jobs). The next nightly's reports: starts from `save:kokiri-start` that reach their map, and the `cheats:` lines in tails. πŸ€– Generated with [Claude Code](https://claude.com/claude-code)
fix(agent): a teleport waits for the game to settle and moves an event's text on, and a long log keeps its rare lines
Some checks failed
CI / Conventional Commit title (pull_request) Successful in 9s
CI / Workflow lint (actionlint) (pull_request) Successful in 9s
CI / Agent build and checks (pull_request) Successful in 46s
CI / Coordinator tests (pull_request) Failing after 1m27s
CI / Coordinator image (pull_request) Successful in 14s
d8ec50c149
The starts that ran out of time at a teleport from the Kokiri checkpoint (53 scenarios in 4 days, on main and PRs
alike, and after Longshot #1046 too) logged "cheats: teleport waits until the current event ends": the save is taken
as in play the moment it is so once, the teleport goes out a few frames later into an event that starts then, and
that event never ends by itself. The farm's three retries over 9 s, and its resends, met the same event.

- A teleport or an age switch is asked once the game has been in play with no load and no event for 2 s. An event in
  play that lasts 5 s is pressed through with A about once a second, as a new save's dialogue already is: while an
  event plays, A moves its text on and talks to no one. After a minute the step goes ahead as before. Refused for an
  event, or taken and not carried out, it is asked again once the game has settled, unless it arrived meanwhile.
- Only 3 of 38 such reports kept the lines that said so: every frame's "vk: a submit's memory work" line filled the
  64 KB log tail with the last minute. A log over the cap now keeps the first and last 3 of each line repeated alike
  (but for its numbers), the ones between said in one line, so the tail reaches back over the whole run.

Assisted-by: Claude Code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
HumanBean changed title from WIP: fix(agent): a teleport waits for the game to settle and moves an event's text on, and a long log keeps its rare lines to fix(agent): a teleport waits for the game to settle and moves an event's text on, and a long log keeps its rare lines 2026-11-21 18:12:26 +00:00
HumanBean deleted branch fix/settle-before-teleport 2026-11-21 18:12:32 +00:00
Member

Possibly related, for context:

  • issue #112 Scenarios time out at the first map wait because the teleport right after a save loads doesn't take β€” Open issue describes the teleport/event failures and asks for settling before teleport and useful log tails.
  • PR #129 fix(agent): a teleport the game never carries out is sent again, MinGit comes before the self-test, and broken lifted C is built again β€” Merged agent teleport retry fix; this PR addresses the remaining event timing case.
  • PR #116 fix(agent): a step that ran out of time says which step, and where the game was then β€” Merged scenario timeout diagnostics; adjacent timeout handling, not overlapping fix.
Possibly related, for context: - issue #112 Scenarios time out at the first map wait because the teleport right after a save loads doesn't take β€” Open issue describes the teleport/event failures and asks for settling before teleport and useful log tails. - PR #129 fix(agent): a teleport the game never carries out is sent again, MinGit comes before the self-test, and broken lifted C is built again β€” Merged agent teleport retry fix; this PR addresses the remaining event timing case. - PR #116 fix(agent): a step that ran out of time says which step, and where the game was then β€” Merged scenario timeout diagnostics; adjacent timeout handling, not overlapping fix.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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!135
No description provided.