feat(agent): a save start loads the save with Longshot's HOS_BOOT_SAVE, with no presses (carries #91) #136

Merged
HumanBean merged 4 commits from HumanBean/Beanstalk:feat/boot-save-rebased into main 2026-11-21 18:34:12 +00:00
Owner

Carries #91 (by dyst) onto current main, unchanged but for the rebase. dyst's four commits apply with no conflict, and the switch is Longshot's current name, HOS_BOOT_SAVE (MagicBeanDev/Longshot#1577 renamed it from HOS_OOT_BOOT_SAVE; #91's last commit already follows it). Opened from a fork because #91's branch couldn't be updated from here.

Tested on the rebased head, on the farm's server in containers: the coordinator suite (python:3.13-alpine, Postgres 17), 619 passed, 1 skipped; the agent (dotnet/sdk:10.0), build, then test_agent_core.py --strict, 2420 checks passed.

Longshot#1577 is still open, so no build has status.boot_save yet: until it merges, every save start presses through the title as now.


#91's description:

A farm run that starts from a repository save gets into play by pressing A through the title screen and the save list
about once a second, which races the game's start. Longshot's new HOS_BOOT_SAVE
(MagicBeanDev/Longshot#1577) starts the game straight in the save with no title screen and no presses; this makes it
the agent's start for save:<name>, and keeps the presses for builds that don't have it.

What changed

  • ScenarioRunner.StartEnv: a save:<name> start sets HOS_BOOT_SAVE=slot_00 for the game (the repository save is
    the run's only slot). It is the agent's own: a plan may not set it (Plan.cs's and plan.py's deny lists, the
    planner's text, docs/test-plan.md), so a title start stays a title start.
  • ScenarioRunner.PressIntoPlay: IntoPlayAsync presses no A while the game's own start carries it, which its bridge's
    status.boot_save says (waiting, picked, loaded). A build without the switch has no boot_save (and reads no
    such switch), and one whose start let go says off, refused or failed: A is pressed through the title as
    before. So both sides of an A/B get into play whichever has the switch, and IntoPlayLimit still bounds the wait.
  • docs/test-plan.md: the save:<name> start says how it gets into play.

Nothing changes for title and new starts, the steps, the probes or the reports.

How it was tested

  • python -I agent/tests/test_agent_core.py --strict (Windows): 1957 checks, with new ones in the scenario isolation
    checks: StartEnv for each start, PressIntoPlay over each boot_save value and with none.

  • coordinator/tests/test_plan.py: 186 passed, with the new refusal of HOS_BOOT_SAVE in a plan. The planner's
    database tests need Postgres on Linux and were not run here (only its prompt text changed).

  • In the game (Windows 11, RTX 3080, 621.14), the agent's rule driven through the control bridge with the
    kokiri-start save (HOS_BOOT_SAVE=slot_00, A only when PressIntoPlay would press), twice against each side
    of an A/B packed over the same base:

    side runs presses status.boot_save in play
    Longshot#1577 at aa1948c7 2 0, 0 loaded Kokiri Forest, both
    its base 310e7c9d (no switch) 2 16, 12 (none) Kokiri Forest, both

    All four ended at the same position and facing. Time from the first frame to play: 12.5 and 18.8 s with the switch,
    25.5 and 16.1 s pressed: no difference resolved, so this is about a start with no presses, not speed (the first run
    with the switch also spent 71 s starting a freshly copied runtime before its first frame).

  • Two cold reviews by a second agent; their fixes are in 9537048 and 8f924b8:

    • the game's environment is checked per start through the real RunScenarioAsync;
    • a plan's value is left out and the start's wins;
    • fixtures put the switch in [scenario.env], [matrix] and [matrix.pr_only], and both readers must refuse each for that switch (removing the agent's deny entry now fails the checks);
    • bridge strings and flags are read with TryGetValue;
    • boot_save "failed" ends the start with its own reason;
    • a timeout says the state and boot_save it ended in.
      With these the agent's checks pass: 1981.
  • Not run: a whole beanstalk-agent run --pr (it builds both sides and wants 150 GB free; this PC had 59 GB).

Depends on

MagicBeanDev/Longshot#1577 for the switch itself. Merged before it, this changes nothing a tester sees: no build has
boot_save yet, so every start presses as now.

🤖 Generated with Claude Code

Carries #91 (by dyst) onto current `main`, unchanged but for the rebase. dyst's four commits apply with no conflict, and the switch is Longshot's current name, `HOS_BOOT_SAVE` (MagicBeanDev/Longshot#1577 renamed it from `HOS_OOT_BOOT_SAVE`; #91's last commit already follows it). Opened from a fork because #91's branch couldn't be updated from here. **Tested** on the rebased head, on the farm's server in containers: the coordinator suite (python:3.13-alpine, Postgres 17), 619 passed, 1 skipped; the agent (`dotnet/sdk:10.0`), build, then `test_agent_core.py --strict`, 2420 checks passed. Longshot#1577 is still open, so no build has `status.boot_save` yet: until it merges, every save start presses through the title as now. --- #91's description: A farm run that starts from a repository save gets into play by pressing A through the title screen and the save list about once a second, which races the game's start. Longshot's new `HOS_BOOT_SAVE` (MagicBeanDev/Longshot#1577) starts the game straight in the save with no title screen and no presses; this makes it the agent's start for `save:<name>`, and keeps the presses for builds that don't have it. ## What changed - `ScenarioRunner.StartEnv`: a `save:<name>` start sets `HOS_BOOT_SAVE=slot_00` for the game (the repository save is the run's only slot). It is the agent's own: a plan may not set it (`Plan.cs`'s and `plan.py`'s deny lists, the planner's text, `docs/test-plan.md`), so a `title` start stays a title start. - `ScenarioRunner.PressIntoPlay`: `IntoPlayAsync` presses no A while the game's own start carries it, which its bridge's `status.boot_save` says (`waiting`, `picked`, `loaded`). A build without the switch has no `boot_save` (and reads no such switch), and one whose start let go says `off`, `refused` or `failed`: A is pressed through the title as before. So both sides of an A/B get into play whichever has the switch, and `IntoPlayLimit` still bounds the wait. - `docs/test-plan.md`: the `save:<name>` start says how it gets into play. Nothing changes for `title` and `new` starts, the steps, the probes or the reports. ## How it was tested - `python -I agent/tests/test_agent_core.py --strict` (Windows): 1957 checks, with new ones in the scenario isolation checks: `StartEnv` for each start, `PressIntoPlay` over each `boot_save` value and with none. - `coordinator/tests/test_plan.py`: 186 passed, with the new refusal of `HOS_BOOT_SAVE` in a plan. The planner's database tests need Postgres on Linux and were not run here (only its prompt text changed). - In the game (Windows 11, RTX 3080, 621.14), the agent's rule driven through the control bridge with the `kokiri-start` save (`HOS_BOOT_SAVE=slot_00`, A only when `PressIntoPlay` would press), twice against each side of an A/B packed over the same base: | side | runs | presses | `status.boot_save` | in play | |---|---|---|---|---| | Longshot#1577 at aa1948c7 | 2 | 0, 0 | `loaded` | Kokiri Forest, both | | its base 310e7c9d (no switch) | 2 | 16, 12 | (none) | Kokiri Forest, both | All four ended at the same position and facing. Time from the first frame to play: 12.5 and 18.8 s with the switch, 25.5 and 16.1 s pressed: no difference resolved, so this is about a start with no presses, not speed (the first run with the switch also spent 71 s starting a freshly copied runtime before its first frame). - Two cold reviews by a second agent; their fixes are in 9537048 and 8f924b8: - the game's environment is checked per start through the real `RunScenarioAsync`; - a plan's value is left out and the start's wins; - fixtures put the switch in `[scenario.env]`, `[matrix]` and `[matrix.pr_only]`, and both readers must refuse each for that switch (removing the agent's deny entry now fails the checks); - bridge strings and flags are read with `TryGetValue`; - `boot_save` "failed" ends the start with its own reason; - a timeout says the state and `boot_save` it ended in. With these the agent's checks pass: 1981. - Not run: a whole `beanstalk-agent run --pr` (it builds both sides and wants 150 GB free; this PC had 59 GB). ## Depends on MagicBeanDev/Longshot#1577 for the switch itself. Merged before it, this changes nothing a tester sees: no build has `boot_save` yet, so every start presses as now. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A save:<name> start sets HOS_OOT_BOOT_SAVE=slot_00 for the game (the repository save is its only slot). A Longshot
that has the switch (MagicBeanDev/Longshot#1577) goes from its start-up straight to the save's load, and its bridge's
status.boot_save says so: IntoPlayAsync presses no A while it is "waiting", "picked" or "loaded". A build without
it has no boot_save and reads no such switch, so it, and one whose start let go ("off", "refused", "failed"), gets
A pressed through the title as before: both sides of an A/B get in, whichever has the switch.

The switch is the start's own: a plan may not set it (agent and coordinator deny lists, the planner's text,
docs/test-plan.md).

Checks: ScenarioIsolationChecks (StartEnv, PressIntoPlay over each boot_save), test_plan.py's refusal.

Assisted-by: Claude Code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
From a cold review:
- the game's environment for each start is checked as the sandbox gets it (save:x has HOS_OOT_BOOT_SAVE=slot_00,
  title and new none), the start's value wins over a plan's in RunEnv, and IntoPlayAsync decides with PressIntoPlay
  (a source check);
- plans setting the switch in [scenario.env], [matrix] or [matrix.pr_only] are refused by both readers (fixtures), so
  the agent's and the coordinator's deny lists are held to each other;
- status strings are read with TryGetValue: another JSON type is "none", never an exception;
- boot_save "failed" (the title changed, the save not picked: the save the game loads is not known) ends the run with
  that reason instead of measuring it; a timeout says the state and boot_save it ended in;
- docs/test-plan.md: an A/B where only one side has the switch reaches play two ways (boot_time_s, a start's shader_*).

Assisted-by: Claude Code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
From the second cold review:
- a start that ends on boot_save "failed" is reported with its own reason, not as "the game refused a step";
- InPlay reads state, loading and event with TryGetValue: another JSON type is not in play, never an exception;
- BootSaveCarries' comment says "failed" ends the start; the press table no longer lists it;
- the bad-plan fixtures for the switch must be refused for HOS_OOT_BOOT_SAVE, not for some other reason;
- a source check that IntoPlayAsync throws the failed start as "failed".

Assisted-by: Claude Code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
refactor(agent): Longshot's boot-save switch is HOS_BOOT_SAVE
Some checks failed
CI / Conventional Commit title (pull_request) Successful in 6s
CI / Workflow lint (actionlint) (pull_request) Successful in 7s
CI / Coordinator tests (pull_request) Has been cancelled
CI / Agent build and checks (pull_request) Has been cancelled
CI / Coordinator image (pull_request) Has been cancelled
f2952bfc44
Longshot#1577 renamed HOS_OOT_BOOT_SAVE to HOS_BOOT_SAVE before it merged; the agent's start, the plans' deny list,
the checks and the fixtures follow. The two links this branch adds point at Longshot's moved docs
(docs/dev/developing.md, "Scripted input"; docs/dev/reference/control-bridge.md).

Checks: agent/tests/test_agent_core.py --strict, 2271 passed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
HumanBean changed title from WIP: feat(agent): a save start loads the save with Longshot's HOS_BOOT_SAVE, with no presses (carries #91) to feat(agent): a save start loads the save with Longshot's HOS_BOOT_SAVE, with no presses (carries #91) 2026-11-21 18:28:59 +00:00
Member

Possibly related, for context:

  • PR #89 feat(agent): load disposable checkpoints and label test captures — Merged change establishes default save-start scenario; overlapping runner/test context
  • issue #112 Scenarios time out at the first map wait because the teleport right after a save loads doesn't take — Open issue reports save-load startup timing affecting first gameplay step
Possibly related, for context: - PR #89 feat(agent): load disposable checkpoints and label test captures — Merged change establishes default save-start scenario; overlapping runner/test context - issue #112 Scenarios time out at the first map wait because the teleport right after a save loads doesn't take — Open issue reports save-load startup timing affecting first gameplay step
HumanBean force-pushed feat/boot-save-rebased from f2952bfc44
Some checks failed
CI / Conventional Commit title (pull_request) Successful in 6s
CI / Workflow lint (actionlint) (pull_request) Successful in 7s
CI / Coordinator tests (pull_request) Has been cancelled
CI / Agent build and checks (pull_request) Has been cancelled
CI / Coordinator image (pull_request) Has been cancelled
to d31838dfb7
Some checks failed
CI / Conventional Commit title (pull_request) Successful in 8s
CI / Workflow lint (actionlint) (pull_request) Successful in 9s
CI / Coordinator tests (pull_request) Failing after 1m30s
CI / Agent build and checks (pull_request) Successful in 1m29s
CI / Coordinator image (pull_request) Successful in 15s
2026-11-21 18:33:58 +00:00
Compare
HumanBean deleted branch feat/boot-save-rebased 2026-11-21 18:34:14 +00:00
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!136
No description provided.