fix(agent): main's tools.lock as longshot-builder reads it, not as we guess it #183

Merged
HumanBean merged 1 commit from omgitsgela/Beanstalk:fix/agent-reads-tools-lock-as-lock-rs-does into main 2026-12-05 00:03:11 +00:00
Member

Every PC of the test farm has refused its build since 3 Dec 2026, before any scenario ran. The agent rebuilt each tool's store URL from the tool's own name, and Longshot's tools.lock renamed the tool sdl2 to sdl that day while the store's package kept its old name. Longshot's own reader, builder/crates/build-tools/src/lock.rs, takes the file from whatever package it sits in: the agent was stricter than the code it says it mirrors.

What the file asked and the agent refused

  • main's line 32: tool sdl 2.32.10 linux-x64 … tools/sdl - …/generic/sdl2-linux-x64/2.32.10/09c8eb7a…-sdl.tar.zst. The package kept its old name when MagicBeanDev/Longshot#2822 renamed the tool (d984fd704, 3 Dec 2026 05:48 UTC). The last scheduled run that built was nightly-981 vs nightly-1000; the next, nightly-1007 vs nightly-1022, reported "All nine PCs encountered the same tools.lock SDL URL error on main before any scenarios ran", and the run after that, all nine again.
  • The same file's Rust and glslang lines: upstream's own places, a .tar.xz, a .tar.gz, and glslang's Windows .zip. The agent required .tar.zst and Longshot's store for every line.
  • Rust's three archives of one tool (rustc, cargo, rust-std, one dest, consecutive lines), which lock.rs reads as one tool with several parts and this agent refused as "rust for linux-x64 twice". Both of the last two would have stopped the farm the moment the SDL line was fixed.
  • Behind all of it: Builder.ToolVars still asked for the Linux SDL at tools/sdl2, so even a build that got past the parse would have had no LONGSHOT_SDL2. main's tool is at tools/sdl, and build-driver's tools/mod.rs names it the same way.

What changed

  • ParseBuilder reads a URL the way lock.rs does: the store's place, or the one upstream place allowed for that tool; plain path names; one archive kind per line; and a tool of the store has its edge's copy then the store's own first, each naming the line's version and pinned SHA-256. What the package is called is nobody's business: main's Windows headers sit in a package named cpm-linux-x64.
  • A tool's several archives are grouped as lock.rs groups them. The upstream tools still validate and are still not the agent's to fetch: longshot-builder takes its toolchain's tools from their own projects, Rust through main's scripts/renhdrum.py.
  • Builder.ToolVars: ("linux-x64", "sdl", "LONGSHOT_SDL2").
  • The checks read main's real tools.lock when a Longshot checkout is beside this one (LONGSHOT_CHECKOUT), in both readers.

How it was tested

python -I agent/tests/test_agent_core.py --dotnet ~/dotnet/dotnet --strict: 3136 checks with LONGSHOT_CHECKOUT pointed at a checkout of main, 3125 without it, which is what CI runs; the six python tests pass. dotnet build agent/App/Beanstalk.Agent.csproj -c Release -warnaserror: no warnings. Nothing was run on a farm PC.

The new cases are main's own lines rather than invented ones: sdl published in sdl2-linux-x64, Windows headers in cpm-linux-x64, Rust's three archives, glslang's .tar.gz and its Windows .zip, and that a store archive stays a .tar.zst. Against main's real file the checks require: every store line of that system is installed and no others, sdl at tools/sdl, Rust and glslang absent from what the agent fetches, and every tool a build takes a variable from present under the name the build asks it by. That last one is what was quietly wrong on the Linux side.

Not tested

No farm PC has run this, and no farm job can until it merges: the proof is the next scheduled run building at all. Until then every job fails exactly as before, on any PC, for any plan.

Two things left as they were

The agent still installs one archive per tool, its whole dest. Only Rust is several archives today and Rust is upstream's, so nothing needs more; if a tool of the store ever is, ParseBuilder now says so plainly rather than unpacking two into one folder.

WindowsTools.Parse, the reader for the pre-#2286 Windows game tools, has no caller left in the agent, only tests, and its real-checkout check asked for python, emsdk, cpm, wgpu-native and third_party, which main's lock no longer carries. I pointed that check at the reader builds actually use; whether Parse itself should go is your call.

Every PC of the test farm has refused its build since 3 Dec 2026, before any scenario ran. The agent rebuilt each tool's store URL from the tool's own name, and Longshot's `tools.lock` renamed the tool `sdl2` to `sdl` that day while the store's package kept its old name. Longshot's own reader, `builder/crates/build-tools/src/lock.rs`, takes the file from whatever package it sits in: the agent was stricter than the code it says it mirrors. ## What the file asked and the agent refused - main's line 32: `tool sdl 2.32.10 linux-x64 … tools/sdl - …/generic/sdl2-linux-x64/2.32.10/09c8eb7a…-sdl.tar.zst`. The package kept its old name when https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2822 renamed the tool (`d984fd704`, 3 Dec 2026 05:48 UTC). The last scheduled run that built was `nightly-981 vs nightly-1000`; the next, `nightly-1007 vs nightly-1022`, reported "All nine PCs encountered the same tools.lock SDL URL error on main before any scenarios ran", and the run after that, all nine again. - The same file's Rust and glslang lines: upstream's own places, a `.tar.xz`, a `.tar.gz`, and glslang's Windows `.zip`. The agent required `.tar.zst` and Longshot's store for every line. - Rust's three archives of one tool (`rustc`, `cargo`, `rust-std`, one dest, consecutive lines), which lock.rs reads as one tool with several parts and this agent refused as "rust for linux-x64 twice". Both of the last two would have stopped the farm the moment the SDL line was fixed. - Behind all of it: `Builder.ToolVars` still asked for the Linux SDL at `tools/sdl2`, so even a build that got past the parse would have had no `LONGSHOT_SDL2`. main's tool is at `tools/sdl`, and build-driver's `tools/mod.rs` names it the same way. ## What changed - `ParseBuilder` reads a URL the way `lock.rs` does: the store's place, or the one upstream place allowed for that tool; plain path names; one archive kind per line; and a tool of the store has its edge's copy then the store's own first, each naming the line's version and pinned SHA-256. What the package is called is nobody's business: main's Windows `headers` sit in a package named `cpm-linux-x64`. - A tool's several archives are grouped as `lock.rs` groups them. The upstream tools still validate and are still not the agent's to fetch: longshot-builder takes its toolchain's tools from their own projects, Rust through main's `scripts/renhdrum.py`. - `Builder.ToolVars`: `("linux-x64", "sdl", "LONGSHOT_SDL2")`. - The checks read main's real `tools.lock` when a Longshot checkout is beside this one (`LONGSHOT_CHECKOUT`), in both readers. ## How it was tested `python -I agent/tests/test_agent_core.py --dotnet ~/dotnet/dotnet --strict`: **3136 checks** with `LONGSHOT_CHECKOUT` pointed at a checkout of main, **3125** without it, which is what CI runs; the six python tests pass. `dotnet build agent/App/Beanstalk.Agent.csproj -c Release -warnaserror`: no warnings. Nothing was run on a farm PC. The new cases are main's own lines rather than invented ones: `sdl` published in `sdl2-linux-x64`, Windows `headers` in `cpm-linux-x64`, Rust's three archives, glslang's `.tar.gz` and its Windows `.zip`, and that a store archive stays a `.tar.zst`. Against main's real file the checks require: every store line of that system is installed and no others, `sdl` at `tools/sdl`, Rust and glslang absent from what the agent fetches, and every tool a build takes a variable from present under the name the build asks it by. That last one is what was quietly wrong on the Linux side. ## Not tested No farm PC has run this, and no farm job can until it merges: the proof is the next scheduled run building at all. Until then every job fails exactly as before, on any PC, for any plan. ## Two things left as they were The agent still installs one archive per tool, its whole dest. Only Rust is several archives today and Rust is upstream's, so nothing needs more; if a tool of the store ever is, `ParseBuilder` now says so plainly rather than unpacking two into one folder. `WindowsTools.Parse`, the reader for the pre-#2286 Windows game tools, has no caller left in the agent, only tests, and its real-checkout check asked for `python`, `emsdk`, `cpm`, `wgpu-native` and `third_party`, which main's lock no longer carries. I pointed that check at the reader builds actually use; whether `Parse` itself should go is your call.
fix(agent): main's tools.lock as longshot-builder reads it, not as we guess it
Some checks failed
CI / Conventional Commit title (pull_request) Successful in 5s
CI / Workflow lint (actionlint) (pull_request) Successful in 6s
CI / Coordinator tests (pull_request) Failing after 1m48s
CI / Agent build and checks (pull_request) Successful in 2m38s
CI / Coordinator image (pull_request) Successful in 15s
d70632770e
Every PC of the test farm has refused its build since 3 Dec 2026, on main's tools.lock line 32:
"its first URLs are not Longshot's store's". The agent rebuilt each store URL out of the tool's own
name, and Longshot renamed the tool `sdl2` to `sdl` that day while the store's package kept its old
name, `sdl2-linux-x64`. Longshot's own reader, builder/crates/build-tools/src/lock.rs, takes the file
from whatever package it sits in. Three more shapes of that same file were refused the same way: the
upstream tools Rust and glslang, published at their own places in a .tar.xz, .tar.gz or .zip, and
Rust's three archives of one tool, which lock.rs reads as one tool on consecutive lines while this
agent called the second line "rust for linux-x64 twice".

- ParseBuilder reads a URL by lock.rs's rules: the store's place, or the one upstream place for that
  tool; plain names after it; one archive kind per line; and for a tool of the store, its edge's copy
  then its own, each naming the line's version and the pinned SHA-256, whatever the package is called.
- A tool's several archives are grouped the way lock.rs groups them. The upstream tools still
  validate, and are still not the agent's to fetch: longshot-builder takes its toolchain's tools from
  their own projects, Rust through main's scripts/renhdrum.py.
- Builder.ToolVars: main's SDL tool is at `tools/sdl`, not `tools/sdl2`, so a Linux build's
  LONGSHOT_SDL2 finds it again. This was hidden behind the refusal above.
- The checks now read main's real tools.lock when a Longshot checkout is beside this one
  (LONGSHOT_CHECKOUT), in both readers; WindowsChecks' real-lock check asked for the pre-#2286 tools.

Tested: `python -I agent/tests/test_agent_core.py --dotnet ~/dotnet/dotnet --strict` - 3136 checks with
LONGSHOT_CHECKOUT at a checkout of main, 3125 without (what CI runs), and the python tests. The new
cases are main's own lines: `sdl` in `sdl2-linux-x64`, Windows `headers` in `cpm-linux-x64`, Rust's
three archives, glslang's .tar.gz and .zip. `dotnet build agent/App/Beanstalk.Agent.csproj
-warnaserror`: no warnings. Nothing was run on a farm PC: this is what they were failing on.

Assisted-by: Hermes Agent
Co-Authored-By: Hermes Agent <[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!183
No description provided.