Skip to content

fix(build): pin Rust 1.98.1 to unblock macOS 27 agent builds - #529

Merged
wesbillman merged 1 commit into
mainfrom
upgrade-rust
Oct 2, 2026
Merged

wesbillman merged 1 commit into
mainfrom
upgrade-rust

Conversation

@matt2e

@matt2e matt2e commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Upgrade the Hermit Rust pin and tool symlinks from 1.97.1 to 1.98.1, fixing stripped proc-macro loading failures (mis-aligned LINKEDIT string pool) during Goose agent-runtime builds on macOS 27. See rust-lang/rust#157750.
  • Adopt the new Clippy as_chunks suggestion in secret parsing without changing behavior.
  • Update the documented toolchain version; Windows CI already derives it from the Hermit package filename.

Validation

  • Hosted Linux CI, security checks, and DCO Check pass at 9c1d1288; git diff --check passes.
  • No additional local builds/tests run for this PR update. macOS 27 runtime-build acceptance, Windows validation, agent review, and human confirmation remain unverified in this session.

🤖 Generated with Claude Code

Building the Goose agent runtime on macOS 27 failed loading the stripped
sqlx proc-macro: "mis-aligned LINKEDIT string pool". The llvm-objcopy
bundled with Rust <= 1.97 does not 8-byte align the Mach-O string table
when stripping, and macOS 27's dyld now rejects such dylibs on dlopen.
Goose's `lean` profile strips symbols, which Cargo applies to proc-macros
too. Fixed upstream by rust-lang/rust#158410 (Rust 1.98.0), see
rust-lang/rust#157750.

Bump the Hermit pin to 1.98.1 and adopt the one new Clippy suggestion
(`chunks_exact_to_as_chunks`) it raises. Windows CI reads the pin from
the `bin/.rust-*.pkg` filename, so no workflow change is needed.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Matt Toohey <[email protected]>
@matt2e
matt2e marked this pull request as ready for review October 2, 2026 04:18
@matt2e
matt2e requested review from a team, comp615 and wesbillman as code owners October 2, 2026 04:18

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No changes requested. The Rust tool symlinks consistently select 1.98.1, the inspected build/CI consumers use that pin, and the guarded 64-byte hex-parser change preserves decoding and identity validation.

Star Lord’s automated source review via Wes’s account; head 9c1d1288fe729d7df1b4cd4492b99aaee56d9509, base 75e6dc396431f188901b671975a9d4d3ae9f5599. Source-only: no builds/tests or macOS 27 reproduction performed; the CI snapshot was incomplete, and native/cross-platform runtime behavior remains unverified.

@matt2e matt2e changed the title Pin Rust 1.98.1 so the agent runtime builds on macOS 27 fix(build): pin Rust 1.98.1 to unblock macOS 27 agent builds Oct 2, 2026
@wesbillman
wesbillman merged commit 5684bb8 into main Oct 2, 2026
22 checks passed
@wesbillman
wesbillman deleted the upgrade-rust branch October 2, 2026 17:55
johnmatthewtennant pushed a commit that referenced this pull request Oct 2, 2026
* origin/main: (21 commits)
  Add remote agent owner attestation fn to host service (#532)
  fix(build): pin Rust 1.98.1 to unblock macOS 27 agent builds (#529)
  main fix: Pi model test ETXTBSY flake (#513)
  fix(composer): remove phantom text-field focus outlines (#519)
  fix(relay): use writer reads for channel confirmations (#501)
  feat(channels): unify header actions and inline details editing (#487)
  Show app-managed agents working in the sidebar (#539)
  Add recoverable hosted community deletion (#403)
  Add verified Inbox evidence and exact edit closure (#495)
  Animate Buzz startup through initial content readiness (#534)
  Polish profile avatar picker and custom colors (#533)
  Add Send to channel for authored thread replies (#531)
  Allow plugins to send managed-agent registration events (kind 30177) (#535)
  Fix Pi and Goose environment overrides (#517)
  feat(ui): Switch shared icons to Tabler (#523)
  Improve message media contrast and thumbnail fill (#521)
  Document unified inventory and verify focused import and compact-row acceptance (#293)
  fix(ux): clarify Pi installation and setup errors (#511)
  Count unread replies only in conversations you are part of (#471)
  Animate the terminal welcome with a compact hex wordmark (#508)
  ...

Signed-off-by: Sol <49aa1f65411fd096d2e2ec144f1e7aa36fdc76d1b907cfdf7be000c66f9d3b8e@buzz.block.builderlab.xyz>
matt2e added a commit to block/buzz that referenced this pull request Oct 26, 2026
…#8598)

## Summary

Bump the pinned Rust toolchain from 1.95.0 to 1.98.1 so release builds
work on macOS 27 hosts.

Rust ≤ 1.97 strips Apple-target artifacts with its bundled
`llvm-objcopy`, which leaves the Mach-O `LC_SYMTAB` string pool
(`__LINKEDIT`) only 4-byte aligned. macOS 27's dyld refuses to `dlopen`
such images (`mis-aligned LINKEDIT string pool`). Because cargo applies
the release profile's default `strip = "debuginfo"` to proc-macro dylibs
too, `cargo build --release` of any crate that uses sqlx macros
(`buzz-db`, `buzz-relay`, `buzz-admin`, …) fails on macOS 27: rustc
cannot load `libsqlx_macros-*.dylib`. Dev builds pass because the dev
profile does not strip, which is why this only shows up as a
release/packaging failure.

The fix (llvm/llvm-project#203680, pulled into rustc by
rust-lang/rust#158410 for rust-lang/rust#157750) first shipped in Rust
1.98.0 and was never backported to 1.97.x. `block/buzz-app` pinned
1.98.1 for the same failure in block/buzz-app#529. With this bump the
`CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_STRIP=none` / custom-linker
workarounds people have been using locally are no longer needed.

### What changes

Two commits: the toolchain bump (with the desktop clippy fixes), then
the workspace clippy fixes.

| Location | Change |
|---|---|
| `rust-toolchain.toml` | `channel = "1.95.0"` → `"1.98.1"` (profile
unchanged) |
| `Dockerfile`, `Dockerfile.push-gateway` | `ARG RUST_VERSION=1.95` →
`1.98` |
| `Dockerfile.sprig` | `rust:1.98-alpine3.22` with the manifest-list
digest verified on Docker Hub (shared by the `1.98` and `1.98.1` tags) |
| `.github/workflows/release.yml` | `dtolnay/rust-toolchain` pinned to
the tip of its `1.98.1` branch (`18f04874`) for the Windows desktop
release job |
| `benchmarks/harbor-buzz-orchestra` | `RUST_IMAGE = rust:1.98-alpine` |
| `_ci-rust.yml`, `windows-canary.yml`, `app_state_tests.rs` | stale
"1.95" comments reworded; the `unknown_lints` allow stays with a
version-agnostic rationale |
| `desktop/src-tauri` | lints clippy 1.98 newly raises under `-D
warnings`: `chunks_exact_to_as_chunks` at five fixed-width PCM/UTF-16
decoders, `needless_borrows_for_generic_args` on the `Copy` `norm`
closure in `config_bridge/reader.rs`, and a redundant `Engine as _`
import in `hpke_key_backup_tests.rs` that `use super::*` already
provides |
| Workspace crates (9) | the 30 lints clippy 1.98 newly raises in `cargo
clippy --workspace --all-targets -- -D warnings`, listed below |

Workspace lint fixes:

| Lint | Sites | Fix |
|---|---|---|
| `result_large_err` (20) | `buzz-relay` `api/git/transport.rs` (8),
`api/git/settings.rs` (6), `api/gifs.rs`, `api/workflows.rs`,
`api/profiles.rs`; `buzz-push-gateway` `verify_installation_assertion` |
Clippy 1.98 now checks `async fn`s, so every `async fn … -> Result<_,
axum::response::Response>` trips it. These follow the existing allow
pattern in `api/media.rs` and `nip_fi_http.rs` ("Response is the natural
error type for axum handlers"): module-level in the two git files,
per-function elsewhere. Boxing `Response` would touch every handler for
no runtime benefit. |
| `chunks_exact_to_as_chunks` (3) | `buzz-media` MP4 brand scan;
`buzz-voice` npy f32 reader and stereo test fixture | `chunks_exact(N)`
→ `as_chunks::<N>().0` |
| `question_mark` (3) | `buzz-acp` queue flush fallback and
slash-command mention skip; `buzz-agent` `find_git_root` | `match … {
None => return None }` → `?` |
| `useless_format` (2) | `buzz-auth` nip_fi startup test policies |
`format!("…")` → `"…".to_string()` |
| `useless_borrows_in_formatting` (1) | `buzz-pairing-cli` secret print
| drop the borrow |
| `manual_noop_waker` (1) | `buzz-sdk` broker test `block_on` |
`Waker::noop()` (stable since 1.85) |

All `as_chunks` rewrites keep `chunks_exact`'s remainder-dropping
semantics, and `as_chunks` is stable since 1.88, which is the MSRV.

One change in `api/git/transport.rs` is not a lint fix. Staging that
file trips the pre-commit secret scanner on its existing test-only ES256
fixture (`GIT_TEST_EC_PEM`), and the scanner only honours a suppression
marker on the flagged line. So the `\`-continued string literal is
rewritten as a byte-identical `concat!` whose `BEGIN` line carries
`sadscan:disable kingfisher.privkey.2`.

Left as is on purpose: `Cargo.toml` `rust-version = "1.88.0"` (MSRV
floor, a separate concern), the README/CONTRIBUTING "1.88+" text, Hermit
(no Rust packages there), the lockfiles, and the `(1.95.0)` comment in
`scripts/start-isolated-test-relay.sh` (the pre-commit secret scanner
flags that file's pre-existing dev-only `DATABASE_URL` whenever it is
staged).

### Related issue
Fixes #8074

### Testing
All under rustc/clippy 1.98.1 on a macOS 27 host (Darwin 27.0.0,
aarch64), with no `RUSTFLAGS` / `SDKROOT` / strip overrides in the
environment:

- `cargo build --release -p buzz-db` (the #8074 repro: the release
profile strips the proc-macro dylib): **builds**. The resulting
`libsqlx_macros-*.dylib` (14 MB) has `LC_SYMTAB stroff % 8 == 0` per
`otool -l`. The same build on 1.95.0 died with `mis-aligned LINKEDIT
string pool`.
- `just clippy` (workspace, `-D warnings`) and `cargo fmt --check`
(workspace and `desktop/src-tauri`): pass
- `just desktop-tauri-clippy` (default and `mesh-llm` feature sets):
pass
- `just test-unit`: every crate passes. The `buzz-acp` binary failed
only under pre-push lane contention; rerun solo it is 1060 passed, 0
failed.
- `just desktop-tauri-test`: 3422 passed, 0 failed
- After the lint fixes: lib/bin unit tests for `buzz-acp`, `buzz-agent`,
`buzz-auth`, `buzz-media`, `buzz-voice`, `buzz-sdk`, `buzz-pairing-cli`,
and `buzz-relay`'s `api::git::transport` tests, including the
Postgres-backed
`enforce_mode_git_pack_routes_missing_assertion_exact_bytes`, which
parses the rewritten PEM: pass

`cfg(windows)` code was not linted locally (no Windows target
installed). CI's Windows Rust job runs workspace clippy for
`x86_64-pc-windows-msvc`, and that passes on this branch. CI also builds
the relay, push-gateway and sprig images on the new `rust:1.98` bases
for amd64 and arm64.

No runtime behavior changes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Matt Toohey <[email protected]>
Co-authored-by: Claude Fable 5.1 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants