ci: add wasm-validate, determinism diff, cargo clippy, MSRV pin#59
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four lower-cost CI gates, each independently valuable.
What ships
1.
wasm-validateon emitted modulesCompiler job installs
wabt(apt-get install wabt), compiles each example marked "yes" inexamples/README.md, runswasm-validateon the output. Today that's justcounter-mvp.cv; the list grows as more example shapes parse.Catches: structurally invalid modules that slip past our byte-level codegen unit tests. The kind of bug that would have surfaced earlier this session if we had this gate (e.g. the OSAKA-spec REVM precompile issue, the locals-declaration off-by-one).
2. Determinism check
Compile
examples/counter-mvp.cvtwice in CI.cmp -sthe outputs. Fail on any difference.Catches: nondeterminism leaking in from HashMap iteration order, pointer addresses captured in output, build timestamps, locale-sensitive sorts. Cheap and high-signal.
3.
cargo clippy --all-targets --release -- -D warningsRuns as the first runtime step, before the full Wasmtime + Cranelift compile. Fail-fast for style + correctness issues.
One existing lint surfaced and is fixed in this PR:
runtime/src/main.rs::hex_decodenow usess.len().is_multiple_of(2)instead ofs.len() % 2 != 0(clippy::manual_is_multiple_ofwarning).4. MSRV pin
rust-version = "1.95"inruntime/Cargo.toml. Locks the floor after the v0.3 bump (revm 40 + ruint 1.18 require rustc >= 1.91). If anyone tries to downgrade, cargo's resolver complains immediately instead of failing deep inside the dependency tree.Local verification
Not in this PR (filed as their own issues)
cargo auditon the runtime: would have been gate (5) but the Wasmtime + REVM dep tree is large and noisy; defer until someone wants to own the noise