fix(web): CI-owned wasm artifacts + e2e harness fixes #95
Reference in New Issue
Block a user
Delete Branch "fix/web-ci-reproducible-and-e2e"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes the web build after the migration. Three commits.
1. Reproducible-ish wasm build (
9c473d6)build_wasm.shnow remaps the machine-specific source prefixes (cargo registry →/cargo, rustup std →/rustup, repo →/build) viaCARGO_ENCODED_RUSTFLAGS, re-stating thegetrandom_backendcfg (env rustflags replace.cargo/config.toml's). This removes embedded/home/<user>/...paths from the artifacts — good hygiene regardless of the gate.2. E2e harness fixes (
5b2b234)The e2e suite ran for the first time once #94 fixed the webServer timeout: 14 passed, 4 failed — both pre-existing latent bugs:
__FERROUS_DEBUG__.serialize is not a function— game.js's/play-classicbridge was missingserialize()(play.html's had it; they drifted). Added it.page.clock.tick is not a function— sinon name; Playwright's Clock API ispage.clock.runFor(). Fixed all 6 calls.3. CI owns wasm artifacts (
2328643) — replaces the #93 freshness gateThe rebuild-and-diff gate could never pass: the Bevy wasm isn't byte-reproducible across machines. Confirmed exhaustively — identical rustc 1.95.0 / LLVM 22.1.2, identical flags /
Cargo.lock/ remapped paths still produced a 248 KB-different artifact in CI, while same-machine rebuilds (even from different paths) are bit-identical. The remaining variable is the build host itself (a dependency build script reading the host env). Pinning tool versions and remapping paths is necessary but not sufficient.So CI becomes the single source of truth: the new
web-wasm-rebuildworkflow rebuildspkg/on every master change to a wasm-feeding crate and commits it back. The deployed artifacts can't silently rot, and contributors never hand-runbuild_wasm.sh. Thepkg/commit isn't in the rebuild workflow's trigger paths (no loop) but is indocker-build's, so the fresh wasm deploys. The false-failingweb-wasm-freshnessworkflow is removed.After merge
web-wasm-rebuildfires (build_wasm.sh changed), regeneratespkg/in the CI environment, and commits it — superseding the local-machine bytes here.web-e2ethen runs against the fresh wasm and should be 18/18.🤖 Generated with Claude Code
fix(web): reproducible wasm builds + e2e harness fixesto fix(web): CI-owned wasm artifacts + e2e harness fixes