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

Open
dyst wants to merge 4 commits from dyst/Beanstalk:feat/boot-save into main
Member

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_OOT_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_OOT_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_OOT_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_OOT_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

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_OOT_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_OOT_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_OOT_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_OOT_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)
feat(agent): a save start loads the save with Longshot's HOS_OOT_BOOT_SAVE, with no presses
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
eb88ee89c0
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]>
Member

Possibly related, for context:

  • PR #89 feat(agent): load disposable checkpoints and label test captures — Overlapping save-start scenario/runner work; coordinate changes
Possibly related, for context: - PR #89 feat(agent): load disposable checkpoints and label test captures — Overlapping save-start scenario/runner work; coordinate changes
fix(agent): the boot-save start's wiring checked, its JSON read safely, a failed start ended with its reason
Some checks failed
CI / Conventional Commit title (pull_request) Successful in 4s
CI / Workflow lint (actionlint) (pull_request) Successful in 5s
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
953704882f
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]>
fix(agent): a failed boot-save start reported as the start's, bridge flags read safely, the fixtures refused for the switch
Some checks failed
CI / Conventional Commit title (pull_request) Successful in 4s
CI / Workflow lint (actionlint) (pull_request) Successful in 4s
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
8f924b81c6
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]>
Author
Member

Two cold reviews by a second agent, fixed in 9537048 and 8f924b8: the start's environment checked as the sandbox gets it for each start, a plan's value left out, three bad-plan fixtures (scenario env, matrix, pr_only) refused by both readers for HOS_OOT_BOOT_SAVE, JSON read with TryGetValue (no exception on another type), boot_save failed ends the start with its own reason (Longshot#1577's failed now means no title and an unknown save), a timeout says how the start stood. Agent checks: 1981 passed. Longshot#1577's head fe0c661b with this rule in the game: 3 of 3 starts in play with 0 presses.

Two cold reviews by a second agent, fixed in 9537048 and 8f924b8: the start's environment checked as the sandbox gets it for each start, a plan's value left out, three bad-plan fixtures (scenario env, matrix, pr_only) refused by both readers for HOS_OOT_BOOT_SAVE, JSON read with TryGetValue (no exception on another type), boot_save failed ends the start with its own reason (Longshot#1577's failed now means no title and an unknown save), a timeout says how the start stood. Agent checks: 1981 passed. Longshot#1577's head fe0c661b with this rule in the game: 3 of 3 starts in play with 0 presses.
dyst changed title from WIP: feat(agent): a save start loads the save with Longshot's HOS_OOT_BOOT_SAVE, with no presses to feat(agent): a save start loads the save with Longshot's HOS_OOT_BOOT_SAVE, with no presses 2026-11-18 15:27:43 +00:00
Author
Member

On the overlap with #89: they complement each other. #89 makes the default plan's gameplay scenario start from save:kokiri-start; with this PR every such start sets HOS_OOT_BOOT_SAVE=slot_00, so the default plan reaches play with no presses on builds that have MagicBeanDev/Longshot#1577 (and is pressed through the title as now on builds that don't). The two touch the same lines as text only: both add entries to RunSessionAsync's own environment (#89 RX_VK_TEST_AGENT/RX_VK_TEST_LABEL, this PR the StartEnv line after it) and both add checks in ScenarioIsolationChecks' per-start loop. Either order works; whichever merges second keeps both sides. If #89 lands first I'll rebase this one onto it.

On the overlap with https://git.magicbean.dev/MagicBeanDev/Beanstalk/pulls/89: they complement each other. #89 makes the default plan's gameplay scenario start from save:kokiri-start; with this PR every such start sets HOS_OOT_BOOT_SAVE=slot_00, so the default plan reaches play with no presses on builds that have MagicBeanDev/Longshot#1577 (and is pressed through the title as now on builds that don't). The two touch the same lines as text only: both add entries to RunSessionAsync's own environment (#89 RX_VK_TEST_AGENT/RX_VK_TEST_LABEL, this PR the StartEnv line after it) and both add checks in ScenarioIsolationChecks' per-start loop. Either order works; whichever merges second keeps both sides. If #89 lands first I'll rebase this one onto it.
dyst force-pushed feat/boot-save from 8f924b81c6
Some checks failed
CI / Conventional Commit title (pull_request) Successful in 4s
CI / Workflow lint (actionlint) (pull_request) Successful in 4s
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 5abfdf15df
Some checks failed
CI / Conventional Commit title (pull_request) Successful in 24s
CI / Workflow lint (actionlint) (pull_request) Successful in 21s
CI / Coordinator tests (pull_request) Failing after 1m21s
CI / Agent build and checks (pull_request) Successful in 41s
CI / Coordinator image (pull_request) Successful in 12s
2026-11-20 22:59:10 +00:00
Compare
Some checks failed
CI / Conventional Commit title (pull_request) Successful in 24s
CI / Workflow lint (actionlint) (pull_request) Successful in 21s
CI / Coordinator tests (pull_request) Failing after 1m21s
CI / Agent build and checks (pull_request) Successful in 41s
CI / Coordinator image (pull_request) Successful in 12s
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'feat/boot-save:dyst-feat/boot-save'
git switch 'dyst-feat/boot-save'
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!91
No description provided.