Sitelet https://github.com/zkmopro/mopro/pull/709
Skip to content

fix(wasm): bump wasm nightly to 2025-02-20, stop silent wasm-build failures - #709

Merged
vivianjeng merged 1 commit into
mainfrom
fix/wasm-ci-nightly-and-silent-exit
May 28, 2026
Merged

vivianjeng merged 1 commit into
mainfrom
fix/wasm-ci-nightly-and-silent-exit

Conversation

@moven0831

@moven0831 moven0831 commented May 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Bump pinned wasm nightly toolchain nightly-2024-07-18 → nightly-2025-02-20 in mopro-ffi/rust-toolchain.toml, mopro-ffi/src/app_config/web.rs, and both .github/workflows/build-and-test.yml references.
  • Add -e to the Linux script -q -c "..." invocation in the Build Web step so a failing mopro build actually fails the step.
  • Add a post-build test -d MoproWasmBindings guard that exits with a ::error:: annotation if the wasm bindings weren't produced.

Why

Full diagnosis in #708. Short version:

  1. nightly-2024-07-18 (cargo 1.81.0-nightly) predates edition2024. A transitive dep — wit-bindgen 0.51.0 / wit-bindgen-rust-macro 0.51.0 — uses edition = "2024", so cargo refuses to parse its manifest and wasm-pack build exits non-zero.
  2. Util-linux script returns its own exit code (0) by default, not the child's, unless -e / --return is passed. So mopro exited 1, script exited 0, the Build Web step reported success with no MoproWasmBindings/ produced, actions/cache@v4 skipped the save (Path Validation Error: Path(s) ... do(es) not exist), and the downstream test_halo2_wasm_web job cache-missed and tried to yarn install in a directory that never existed.

The post-build guard is defense in depth: even if a future regression sneaks past the script -e change, we catch it at the step that introduced it instead of corrupting a downstream job.

Out of scope

  • The macOS script -q /dev/null cmd args form is left untouched — BSD script semantics differ and the macOS web path isn't currently in the failing matrix.
  • The underlying need for script (the # TODO: allow mopro CLI to run fully non-interactive comment) is unchanged; a proper fix in the CLI would let us drop the pseudo-TTY entirely. Tracked separately.

Test plan

  • CI: cli_build_web (halo2) succeeds and now actually produces MoproWasmBindings/.
  • CI: test_halo2_wasm_web (halo2) (which depends on the above) goes green — yarn install finds its working directory and the browser test runs.
  • Negative check (eyeballed from the diff): if some future change reintroduces a silent-exit, the new test -d MoproWasmBindings guard prints ::error::wasm build did not produce MoproWasmBindings/ and fails the step at the actual point of failure.

🤖 Generated with Claude Code

…ures

Two coupled bugs were making `test_halo2_wasm_web` red on every push to
main since 2026-03-16:

1. The pinned wasm toolchain `nightly-2024-07-18` (cargo 1.81.0-nightly)
   predates `edition2024`. A transitive dep — `wit-bindgen 0.51.0` /
   `wit-bindgen-rust-macro 0.51.0` — uses `edition = "2024"`, so cargo
   refuses to parse it and `wasm-pack build` exits non-zero.

2. The Build Web step wraps mopro in `script -q -c "..." /dev/null` on
   Linux to fake a TTY. Util-linux `script` returns its own exit code
   (0) by default, not the child's, unless `-e` / `--return` is passed.
   So mopro exited 1, but the step reported success — `cli_build_web`
   went green with no `MoproWasmBindings/` produced, the cache save was
   skipped, and the downstream `test_halo2_wasm_web` job cache-missed
   and tried to `yarn install` in a directory that never existed.

Fixes:
- Bump `nightly-2024-07-18` -> `nightly-2025-02-20` (around Rust 1.85
  stabilization, when `edition2024` became stable) in
  `mopro-ffi/rust-toolchain.toml`, `mopro-ffi/src/app_config/web.rs`,
  and both workflow references.
- Add `-e` to the Linux `script` invocation so a failing mopro build
  fails the step.
- Guard the Build Web step with a `test -d MoproWasmBindings` check so
  any future silent-exit class of bug surfaces at the step that
  introduced it rather than corrupting a downstream job.

Fixes #708
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying mopro with  Cloudflare Pages  Cloudflare Pages

Latest commit: 482e948
Status: ✅  Deploy successful!
Preview URL: https://2b4499e9.mopro.pages.dev
Branch Preview URL: https://fix-wasm-ci-nightly-and-sile.mopro.pages.dev

View logs

@moven0831 moven0831 changed the title fix(ci): bump wasm nightly to 2025-02-20, stop silent wasm-build failures fix(wasm): bump wasm nightly to 2025-02-20, stop silent wasm-build failures May 28, 2026
@vivianjeng
vivianjeng merged commit 80d8d49 into main May 28, 2026
56 checks passed
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.

ci(wasm): stale nightly toolchain

2 participants