Harden parser, renderer, and input pipelines - #96
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.
Summary
Why
The project review identified resource-exhaustion paths for untrusted files, partial WebGL state after allocation failures, incomplete browser stream cleanup, and CI checks that could miss blank renderer output or overstate platform validation.
Impact
Malformed or highly amplified inputs now fail with bounded errors instead of consuming unbounded browser or WASM resources. Renderer recovery leaves the previous state intact until replacement resources are complete. Browser exports close on success and abort on failure.
The compatibility matrix runs native context and renderer smoke tests on Linux x64/arm64, macOS arm64, and Windows x64/arm64. macOS x64 validates installation and native module loading only because the GitHub-hosted Intel runner cannot create an ANGLE EGL display.
Validation
cargo test --manifest-path wasm/Cargo.toml --all-targets: 161 passedcargo fmt --manifest-path wasm/Cargo.toml --all -- --checkcargo clippy --manifest-path wasm/Cargo.toml --all-targets -- -D warningsnpm run checkinpackages/wasm-gerber-renderer: 34 passed./scripts/vercel-build.shwith Rust 1.97.0 and wasm-pack 0.14.0npm pack --dry-run: 15 package filesRemaining validation
The updated native compatibility matrix will run on this pull request. Direct mock-based WebGL allocation failure injection remains a future testability improvement because the renderer currently owns a concrete
web_sys::WebGl2RenderingContext.