Skip to content

ci(freebsd): restore wasm-cross E2E parity on the x86_64 FreeBSD lanes - #2871

Open
gertybotbot wants to merge 2 commits into
hew-lang:mainfrom
gertybotbot:fix/1960-freebsd-rustup-wasm-parity
Open

ci(freebsd): restore wasm-cross E2E parity on the x86_64 FreeBSD lanes#2871
gertybotbot wants to merge 2 commits into
hew-lang:mainfrom
gertybotbot:fix/1960-freebsd-rustup-wasm-parity

Conversation

@gertybotbot

Copy link
Copy Markdown
Contributor

Closes #1960.

What was wrong

The FreeBSD jobs install the rust pkg, which is not rustup-managed and therefore ignores rust-toolchain.toml. That file already pins the channel and lists wasm32-wasip1 under targets, so every rustup platform provisions the WASI target automatically. FreeBSD was the sole outlier, so the eval_wasm_* / wasi_run_e2e E2E tests were filtered out with an -E expression to work around it.

Worth noting: the issue's suggested restore path was "install a rustup toolchain, then rustup target add wasm32-wasip1". The rustup target add step turns out to be unnecessary — targets in rust-toolchain.toml covers it.

What this does

On the two x86_64 FreeBSD lanes (release-gate.yml and freebsd.yml — the CI workflow had the same exclusion, so fixing only the gate would have left the issue half-done):

  • install rustup instead of the rust pkg (curl added, rust dropped)
  • drop the -E exclusion so the lanes build the WASI runner from source and run it under the pkg wasmtime, like the other platforms
  • assert rustup target list --installed | grep -qx wasm32-wasip1 before the suite relies on it, so a provisioning regression fails loudly instead of silently reverting to reduced coverage

LLVM_SYS_221_PREFIX still points at the pkg llvm22; only the Rust toolchain source changes.

Availability, verified against the pinned channel

rust-toolchain.toml pins 1.96.0. Against channel-rust-1.96.0.toml, all of rust, clippy-preview, rustfmt-preview for x86_64-unknown-freebsd and rust-std for wasm32-wasip1 are available = true, and rustup-init for x86_64-unknown-freebsd returns HTTP 200.

The aarch64 lane keeps the exclusion — permanently

Upstream Rust ships no aarch64-unknown-freebsd host at all: rustup-init 404s and there is no rust entry in the channel manifest. This fix cannot apply there at any version, so that lane keeps the filter and its comment now records the reason as permanent rather than pending #1960. The issue did not distinguish the two architectures; that asymmetry is the main finding here.

Verification

  • scripts/check-preflight-ci-parity.sh → exit 0 (32/32 checks, 28/28 steps, 5/5 lane→gate)
  • scripts/check-gate-reachability.py → exit 0; A3d drops 8 → 6 filtered nextest runs, all still compensated
  • both workflow files parse as YAML

CI on this PR does not exercise the FreeBSD release-gate lane, so the FreeBSD legs are proven by the release-gate workflow rather than here.

The FreeBSD jobs installed the `rust` pkg, which is not rustup-managed and
therefore ignores rust-toolchain.toml. That file already pins the channel and
lists wasm32-wasip1 under `targets`, so every rustup platform provisions the
WASI target automatically -- FreeBSD was the sole outlier, and the eval_wasm_*
/ wasi_run_e2e E2E tests were filtered out of the run to work around it.

Install rustup instead of the pkg toolchain on the two x86_64 FreeBSD lanes
(release-gate.yml and freebsd.yml) and drop the `-E` exclusion, so those lanes
now build the WASI runner from source and execute it under the pkg wasmtime
like the other platforms. The run asserts wasm32-wasip1 is actually installed
before relying on it, so a provisioning regression fails loudly rather than
silently reverting to reduced coverage.

Upstream publishes rustup-init and all pinned components (rust, clippy,
rustfmt, rust-std wasm32-wasip1) for x86_64-unknown-freebsd, verified against
the 1.96.0 channel manifest.

The aarch64 gate keeps the exclusion: upstream Rust ships no
aarch64-unknown-freebsd host at all -- no rustup-init and no `rust` entry in
the channel manifest -- so this fix cannot apply there at any version. Its
comment now records that as permanent rather than pending hew-lang#1960.

Verified: scripts/check-preflight-ci-parity.sh and
scripts/check-gate-reachability.py both exit 0 (A3d drops 8 -> 6 filtered
nextest runs, all still compensated).

Closes hew-lang#1960
The oracle pinned ONE canonical form across all FreeBSD jobs: a single nextest
command carrying the wasm-cross `-E` exclusion, and a tool set containing the
`rust` pkg. The preceding commit makes the x86_64 lanes legitimately differ, so
the oracle had to learn the split rather than be loosened.

Adds a RUSTUP_JOBS set (build-and-test, gate-freebsd-x86_64) and makes the two
existing per-job helpers architecture-aware:

- `_expected_nextest_command()` returns the unfiltered command for rustup lanes
  and keeps the `-E` filtered command for aarch64.
- `_expected_pkg_phases()` swaps `rust` for `curl` on rustup lanes.
- rustup provisioning (rustup-init, `rustup show active-toolchain`, and the
  `rustup target list --installed | grep -qx wasm32-wasip1` probe) is now
  REQUIRED on those lanes and covered by the comment-out mutation test.

The mutation tests that hard-coded the old constants now derive the install
line and nextest command from the job under test, so they keep biting per job
instead of silently passing.

Verified the oracle still rejects, each confirmed by a non-zero exit:
- removing the wasm32-wasip1 target probe from the x86_64 gate
- re-adding the `-E` exclusion to the x86_64 gate (a coverage regression)
- removing the `-E` exclusion from the aarch64 gate (unsupported target)

Full set green: freebsd-workflow-contract-check 23/23,
test-release-workflow-contract 20/20, check-preflight-ci-parity.sh,
check-gate-reachability.py.
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.

FreeBSD release gate scopes out the wasm-cross eval E2E (no wasm32-wasip1 in the pkg rust toolchain)

1 participant