fix(agent): Rust prefetch imports the deleted renhdrum helper #184

Open
opened 2026-12-05 05:19:41 +00:00 by futondestroyer · 2 comments
Member

What fails

Beanstalk's Rust prefetch stops with ModuleNotFoundError: No module named 'renhdrum' before building either side of these approved Longshot jobs:

The jobs share Longshot base 8c058ddbb91b4eacc261682bb931bcb69ef4a6f6. Longshot #3044 moved the Rust bootstrap to scripts/rust_toolchain.py, which takes its pins from tools.lock. Beanstalk nightly 303 still imports renhdrum unconditionally. Beanstalk #183 fixed the earlier tools.lock parser error.

Expected behavior

The worker should prefetch Rust and crate archives using the helper in the pinned trusted base, keeping legacy Longshot pins supported and the sandboxed builds offline. The legacy import and the replacement helper were checked against exact source snapshots without running a game or fetching dependencies. On the Farm base, the legacy import fails and the replacement helper reads Rust 1.99.1 and 717 checksum-pinned crates.

Retry the existing approved hardware jobs once a compatible signed agent is on those workers and the intended base passes a game-free prefetch check.

## What fails Beanstalk's Rust prefetch stops with `ModuleNotFoundError: No module named 'renhdrum'` before building either side of these approved Longshot jobs: - [Longshot #1184](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1184), [Linux prefetch log](https://beanstalk.magicbean.dev/jobs/jb_63f19ce5139013a2/log) - [Longshot #1539](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1539), [Windows AMD log 1](https://beanstalk.magicbean.dev/jobs/jb_977288e17508c75e/log), [Windows AMD log 2](https://beanstalk.magicbean.dev/jobs/jb_b049fea28a386c56/log), [Steam Deck log](https://beanstalk.magicbean.dev/jobs/jb_e9530f27717809e8/log) The jobs share Longshot base `8c058ddbb91b4eacc261682bb931bcb69ef4a6f6`. [Longshot #3044](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/3044) moved the Rust bootstrap to `scripts/rust_toolchain.py`, which takes its pins from `tools.lock`. [Beanstalk nightly 303](https://git.magicbean.dev/MagicBeanDev/Beanstalk/releases/tag/nightly-303-adde94bc) still imports `renhdrum` unconditionally. [Beanstalk #183](https://git.magicbean.dev/MagicBeanDev/Beanstalk/pulls/183) fixed the earlier `tools.lock` parser error. ## Expected behavior The worker should prefetch Rust and crate archives using the helper in the pinned trusted base, keeping legacy Longshot pins supported and the sandboxed builds offline. The legacy import and the replacement helper were checked against exact source snapshots without running a game or fetching dependencies. On the Farm base, the legacy import fails and the replacement helper reads Rust 1.99.1 and 717 checksum-pinned crates. Retry the existing approved hardware jobs once a compatible signed agent is on those workers and the intended base passes a game-free prefetch check.
Member

Checked: this looks like a valid bug, and its cause is visible in the code.

The agent unconditionally imports renhdrum during Rust prefetch. If the pinned Longshot base no longer contains that module, prefetch fails before the build, as reported. I could not inspect the Longshot base or the linked job logs in this checkout, so I could not independently verify their contents or the reported crate count.


For maintainers

Longshot PR #3044 merged 2026-12-04 and removed scripts/renhdrum.py; its first release is nightly-1080-ca830e89. Beanstalk PR #183 merged 2026-12-05 and fixes tools.lock parsing, but its description states Rust fetching still uses scripts/renhdrum.py. Current Beanstalk code references that old path in agent/Core/WorkspaceBuilder.cs (Rust fetch) and its comments/tests; agent/Core/Workspace.cs reads the old helper at a pinned commit. The new issue supplies the exact base SHA, affected farm job links and error, and reports that snapshots were checked without running game/dependency fetches.

Blame attributes the unconditional import to ab08da84. The checked-out HEAD is nightly-303's adde94bc, and there are no changes to the two workspace files since that tag. The local history contains the #183 merge, but it is not in this checkout's HEAD. Check both prefetch and Rust pin comparison when adding support for the replacement helper; retain compatibility with older bases and the offline sandbox.

Seen in the code:

  • agent/Core/Workspace.cs:422 — The new builder flow calls Rust prefetch before proceeding.
  • agent/Core/WorkspaceBuilder.cs:123 — Prefetch runs the embedded Python with the Longshot checkout as its working directory and reports a nonzero exit as a prefetch failure.
  • agent/Core/WorkspaceBuilder.cs:170 — The embedded Python unconditionally imports renhdrum from the checkout's scripts directory.
  • agent/Core/WorkspaceBuilder.cs:172 — The prefetch then depends on renhdrum for the toolchain and crate metadata.
  • agent/Core/Workspace.cs:690 — Rust pin comparison also reads the old scripts/renhdrum.py path at each commit.

Automated triage by BeanBot (gpt-6-luna). Nothing was run; a maintainer decides.

**Checked: this looks like a valid bug**, and its cause is visible in the code. The agent unconditionally imports `renhdrum` during Rust prefetch. If the pinned Longshot base no longer contains that module, prefetch fails before the build, as reported. I could not inspect the Longshot base or the linked job logs in this checkout, so I could not independently verify their contents or the reported crate count. --- **For maintainers** Longshot PR #3044 merged 2026-12-04 and removed `scripts/renhdrum.py`; its first release is nightly-1080-ca830e89. Beanstalk PR #183 merged 2026-12-05 and fixes tools.lock parsing, but its description states Rust fetching still uses `scripts/renhdrum.py`. Current Beanstalk code references that old path in `agent/Core/WorkspaceBuilder.cs` (Rust fetch) and its comments/tests; `agent/Core/Workspace.cs` reads the old helper at a pinned commit. The new issue supplies the exact base SHA, affected farm job links and error, and reports that snapshots were checked without running game/dependency fetches. Blame attributes the unconditional import to `ab08da84`. The checked-out HEAD is nightly-303's `adde94bc`, and there are no changes to the two workspace files since that tag. The local history contains the #183 merge, but it is not in this checkout's HEAD. Check both prefetch and Rust pin comparison when adding support for the replacement helper; retain compatibility with older bases and the offline sandbox. Seen in the code: - agent/Core/Workspace.cs:422 — The new builder flow calls Rust prefetch before proceeding. - agent/Core/WorkspaceBuilder.cs:123 — Prefetch runs the embedded Python with the Longshot checkout as its working directory and reports a nonzero exit as a prefetch failure. - agent/Core/WorkspaceBuilder.cs:170 — The embedded Python unconditionally imports `renhdrum` from the checkout's `scripts` directory. - agent/Core/WorkspaceBuilder.cs:172 — The prefetch then depends on `renhdrum` for the toolchain and crate metadata. - agent/Core/Workspace.cs:690 — Rust pin comparison also reads the old `scripts/renhdrum.py` path at each commit. --- <sub>Automated triage by BeanBot (gpt-6-luna). Nothing was run; a maintainer decides.</sub>
Member
@review
Sign in to join this conversation.
No milestone
No project
No assignees
3 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#184
No description provided.