Skip to content

ci: build rust-beta on beta, not the pinned channel - #166

Merged
plusky merged 1 commit into
mainfrom
fix/beta-toolchain-160
Aug 30, 2026
Merged

ci: build rust-beta on beta, not the pinned channel#166
plusky merged 1 commit into
mainfrom
fix/beta-toolchain-160

Conversation

@plusky

@plusky plusky commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Closes #160.

rust-beta installed beta and then compiled the pinned channel: the
toolchain action only sets the rustup default (and that step is even
continue-on-error), which rust-toolchain.toml outranks. So the
early-warning job has been re-testing 1.98.0. Same mechanism #137 fixed for
rust-msrv; this is its counterpart.

Verified against live CI, not just locally — the last green main run shows
rust-beta installing rustc 1.99.0-beta.3 while the compile steps
inherit 1.98.0. rustup names the culprit itself: "the toolchain '1.98.0'
is currently in use (overridden by rust-toolchain.toml)"
.

The job now exports RUSTUP_TOOLCHAIN: beta and asserts the effective
rustc is a beta build before compiling.

Why the assert keys on the channel suffix

Beta has no fixed version string, so a literal match is impossible and
rustc -vV has no channel: field — the -beta/-beta.N suffix is the
only signal, and every beta build carries it while no stable release does.
Attacked with fabricated toolchains: stable, nightly, 1.99.0-betarc,
empty output, missing rustc, and a toolchain that prints a beta string
then exits non-zero all fail, each for an identifiable reason. It cannot
pass merely because some string came back.

It lands green

Ran the job's own legs on 1.99.0-beta.3: clippy -D warnings clean, full
test suite 0 failed. No new-lint noise today — and nothing was quieted to
achieve that: the diff touches no .rs file and adds no #[allow].

The job stays non-gating — continue-on-error: true survives, and
rust-beta is confirmed absent from main's nine required contexts, so a
future beta failure reports without blocking merges.

Note for the first run

rust-cache keys on the effective rustc, so this job's cache flips from
the stable hash to the beta one and the first run rebuilds cold. Expected,
self-healing after the first main run, and cache-on-failure: true was
already set.

AGENTS.md's toolchain paragraph said rust-beta does not override the
toml — true before this change, false after; updated. Adversarial review
returned MERGE-SAFE with no findings.

Same mechanism #137 fixed for rust-msrv: the pinned dtolnay action only
runs `rustup default`, which rust-toolchain.toml outranks, so
`toolchain: beta` installed beta and the job then compiled 1.98.0 — the
early-warning purpose was never served. Export RUSTUP_TOOLCHAIN, which
does outrank the toml; a job-level `env:` rather than rust-msrv's
`$GITHUB_ENV` step, there being no value to read out of a manifest here.

The assert cannot match a literal the way rust-msrv's does — beta's
version moves every six weeks — so it matches the `-beta`/`-beta.N`
suffix, which every beta build carries and no stable one does. That
still fails on the exact regression it guards (silently falling back to
the pinned 1.98.0), and on a nightly or an unparseable version line;
`set -euo pipefail` covers a missing rustc.

Left non-gating: `continue-on-error: true`, and not among main's
required contexts. Verified on 1.99.0-beta.3 — clippy -D warnings and
the test leg are both clean, so this lands green rather than red.

Closes #160
@plusky plusky added bug Something isn't working github_actions Pull requests that update GitHub Actions code ai-assisted Authored or substantially written with an AI coding agent labels Aug 30, 2026
@plusky
plusky merged commit 63f4421 into main Aug 30, 2026
14 checks passed
@plusky
plusky deleted the fix/beta-toolchain-160 branch August 30, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted Authored or substantially written with an AI coding agent bug Something isn't working github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rust-beta job compiles the pinned toolchain, not beta (same mechanism as #137)

1 participant