fix(agent): isolate gameplay saves, with Windows gameplay opt-in #7

Merged
HumanBean merged 4 commits from HumanBean/Beanstalk:fix/windows-gameplay into main 2026-11-15 17:37:28 +00:00
Owner

Carries HumanBean/Beanstalk#1 (by @futondestroyer, three commits kept as they were) onto main, since its base (#3's branch) is merged, plus one commit with the fixes from its review.

From #1

  • Every scenario starts the game with --user <run>/data/longshot, on Linux and Windows, so saves stay in that run.
  • The coordinator checks a Windows agent's isolated_gameplay before offering gameplay.
  • The agent core checks run on Windows (named-pipe fake bridge, path expectations).
  • The Python locks are --universal (Windows-only tzdata/colorama, behind markers: the coordinator image installs nothing new).

The fixes

  • Windows gameplay is opt-in until a real Windows gameplay job passes. windows_gameplay = true in policy.toml, or the new "Run gameplay tests too (early)" checkbox in Settings on Windows; off by default. Only then does a Windows agent send isolated_gameplay; Linux always sends it.
    • Without it, a Windows run skips new and save:<name> starts as before. The coordinator offers it no plan made only of those. A mixed plan, such as the default one, still reaches it for its title scenarios. As #1 had it, Windows PCs without the opt-in would have lost the default plan entirely.
    • The planner and docs go back to tags = ["linux"] when gameplay matters. When someone asks for gameplay on Windows they use ["windows"], which waits for an opted-in tester.
  • The options file is also written into the run's --user folder. A Longshot with --user (Longshot #729) reads it there, and copies the game folder's file only into an empty folder.
  • A sandbox start that throws no longer leaks the run's socket folder.
  • The isolation check now tests real things: that the saves' folder is outside the reusable runtime, and that the new game's options are in the user folder. The old "no saves beside the runtime" check could not fail.
  • Housekeeping:
    • The coordinator test moved into test_scheduler.py.
    • The lock headers and # via lines name the files relative to coordinator/, as the .in files say.
    • docs/volunteer-isolation.md is removed: nothing linked to it, and it described things the code does not do. The acceptance steps that matter are in agent/README.md's Windows section.

Testing

  • Coordinator tests pass: 390, with 1 skipped.
  • Agent core checks pass on Linux: 1553.
  • The Windows-only checks from #1 (named pipe) are not run here.
  • Not run on a real Windows gameplay job: that is what the opt-in is for. The first should be futondestroyer's #792 request, after a build with this.
Carries HumanBean/Beanstalk#1 (by @futondestroyer, three commits kept as they were) onto `main`, since its base (#3's branch) is merged, plus one commit with the fixes from its review. ## From #1 - Every scenario starts the game with `--user <run>/data/longshot`, on Linux and Windows, so saves stay in that run. - The coordinator checks a Windows agent's `isolated_gameplay` before offering gameplay. - The agent core checks run on Windows (named-pipe fake bridge, path expectations). - The Python locks are `--universal` (Windows-only `tzdata`/`colorama`, behind markers: the coordinator image installs nothing new). ## The fixes - **Windows gameplay is opt-in until a real Windows gameplay job passes.** `windows_gameplay = true` in `policy.toml`, or the new "Run gameplay tests too (early)" checkbox in Settings on Windows; off by default. Only then does a Windows agent send `isolated_gameplay`; Linux always sends it. - Without it, a Windows run skips `new` and `save:<name>` starts as before. The coordinator offers it no plan made only of those. A mixed plan, such as the default one, still reaches it for its title scenarios. As #1 had it, Windows PCs without the opt-in would have lost the default plan entirely. - The planner and docs go back to `tags = ["linux"]` when gameplay matters. When someone asks for gameplay on Windows they use `["windows"]`, which waits for an opted-in tester. - **The options file is also written into the run's `--user` folder.** A Longshot with `--user` (Longshot #729) reads it there, and copies the game folder's file only into an empty folder. - **A sandbox start that throws no longer leaks the run's socket folder.** - **The isolation check now tests real things:** that the saves' folder is outside the reusable runtime, and that the new game's options are in the user folder. The old "no saves beside the runtime" check could not fail. - **Housekeeping:** - The coordinator test moved into `test_scheduler.py`. - The lock headers and `# via` lines name the files relative to `coordinator/`, as the `.in` files say. - `docs/volunteer-isolation.md` is removed: nothing linked to it, and it described things the code does not do. The acceptance steps that matter are in `agent/README.md`'s Windows section. ## Testing - Coordinator tests pass: 390, with 1 skipped. - Agent core checks pass on Linux: 1553. - The Windows-only checks from #1 (named pipe) are not run here. - Not run on a real Windows gameplay job: that is what the opt-in is for. The first should be futondestroyer's #792 request, after a build with this.
Use named pipes for the Windows bridge fixture and host-native expected paths for simulated homes. Validate Linux bubblewrap paths using Linux absolute-path syntax on either test host; Windows drive paths remain refused.

Assisted-by: Codex

Co-Authored-By: Codex <[email protected]>
Generate universal hash-pinned locks so Windows installs include psycopg timezone data and pytest console dependencies. Existing dependency versions stay pinned.

Assisted-by: Codex

Co-Authored-By: Codex <[email protected]>
Pass --user for every scenario start, enable Windows new-game and checkpoint runs, and gate coordinator offers on isolated_gameplay so older Windows agents cannot claim scenarios they skip. Document a local-build rollout that does not require distributing game files.

Assisted-by: Codex

Co-Authored-By: Codex <[email protected]>
fix(agent): Windows gameplay is the volunteer's opt-in until a real job passes
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 12s
CI / Workflow lint (actionlint) (pull_request) Successful in 14s
99082635b8
On top of HumanBean/Beanstalk#1 (futondestroyer's commits, kept as they are):

- Windows agents send isolated_gameplay only with windows_gameplay = true in
  policy.toml (a Settings checkbox on Windows, off by default); Linux always
  sends it. Without it a Windows run skips new and save:<name> starts, as
  before, and the coordinator offers it no plan made only of them. A mixed
  plan, as the default one, still reaches it for its title scenarios.
- The planner and docs go back to tags = ["linux"] for gameplay, and use
  ["windows"] when someone asks for gameplay on Windows.
- The options file is written into the run's --user folder too: a Longshot
  with --user reads it there and copies the game folder's only into an empty
  folder.
- A sandbox start that throws no longer leaks the run's socket folder.
- The isolation check tests the saves' folder against the runtime and the
  options file in the user folder (the old check could not fail).
- The coordinator check moves into test_scheduler.py; the lock headers name
  the files from coordinator/ as the .in files say to run it;
  docs/volunteer-isolation.md goes (linked from nowhere, and it described
  what the code does not do).

Assisted-by: Claude Opus 5.5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign in to join this conversation.
No reviewers
No labels
ci: approved
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!7
No description provided.