fix(build): repair fuzz target and wasm decoder after upstream refactors - #301
Merged
Merged
Conversation
Two build breaks landed on main today and redden every PR that touches the fuzz path-filtered crates: - 637feea (refactor(mem): mandatory ScopedMemory) replaced SegmentWriter::plain() with SegmentWriter::new(profile_tag, ScopedMemory). The fuzz columnar_segment target still called the removed constructor. Adapt it to the new API with a governor-backed scope (the shape the columnar integration tests use) and the PROFILE_PLAIN tag, matching the production call sites in columnar_checkpoint/load.rs. - The workspace ruzstd bump 0.7 -> 0.9 moved the streaming decoder out of the crate root (it is re-exported from ruzstd::decoding). The WASM decompression path in nodedb-codec still imported ruzstd::StreamingDecoder, which no longer resolves — the 32-bit build check failed on it. Verified locally: `cargo build --manifest-path fuzz/Cargo.toml` on nightly compiles clean; nodedb-codec clippy is clean. The wasm32 check itself needs the CI runner's getrandom artifact cache (plain getrandom 0.3 lacks the wasm_js feature outside the aliased getrandom_03 entry), so it re-verifies in the 32-bit build check job.
farhan-syah
force-pushed
the
fix/fuzz-wasm-builds
branch
from
September 6, 2026 20:17
3bef64f to
e2e1d6c
Compare
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.
Problem
Two build breaks landed on main today (
637feea41mem refactor + the workspaceruzstd0.7 -> 0.9 bump) and redden the ASan-fuzz matrix and the 32-bit build check for every PR touching the path-filtered crates:fuzz/src/targets/columnar_segment.rsstill callsSegmentWriter::plain(), which637feea41replaced withSegmentWriter::new(profile_tag, ScopedMemory)— mandatory memory budgeting.nodedb-fuzzdoes not compile.nodedb-codec/src/zstd_codec.rs(WASM decompression path) importsruzstd::StreamingDecoderfrom the crate root; ruzstd 0.9 moved it toruzstd::decoding. The 32-bit build check fails on the unresolved import.Fix
SegmentWriter::new(PROFILE_PLAIN, fuzz_memory())with a governor-backedScopedMemory(the shape the columnar integration tests use), matching the production call sites incolumnar_checkpoint/load.rs. Adds thenodedb-memdependency to the fuzz crate.ruzstd::decoding::StreamingDecoder(verified present in vendored ruzstd 0.9.0).Verified
cargo build --manifest-path fuzz/Cargo.toml(nightly) compiles clean.cargo clippy -p nodedb-codec --all-targets --all-features -- -D warningsclean.cargo fmt --all -- --checkclean.The 32-bit build check (wasm32) runs in CI.
Local ASan smoke on the fix branch, all six targets with the CI flags
(`--sanitizer address`, `-max_total_time=60 -runs=0 -max_len=1048576
-timeout=10 -rss_limit_mb=2048` + dict): exit 0, no crash artifacts.
How to test