Skip to content

Harden parser, renderer, and input pipelines - #96

Merged
dsafdsaf132 merged 5 commits into
mainfrom
fix/project-review-hardening
Jul 10, 2026
Merged

Harden parser, renderer, and input pipelines#96
dsafdsaf132 merged 5 commits into
mainfrom
fix/project-review-hardening

Conversation

@dsafdsaf132

@dsafdsaf132 dsafdsaf132 commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Bound Gerber step-and-repeat, polygon, aperture-macro, and generated-region workloads before expansion.
  • Enforce remote download, ZIP expansion, repeat, and layer limits while making upload cleanup reliable.
  • Make framebuffer, shader, and context-restoration resource replacement transactional.
  • Abort failed browser PNG streams while preserving the original export error.
  • Pin Rust and wasm-pack versions, expand JavaScript and Rust quality gates, validate rendered PNG pixels, and add macOS x64 build-only compatibility coverage.
  • Update renderer platform and streaming documentation in every maintained language.

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 passed
  • cargo fmt --manifest-path wasm/Cargo.toml --all -- --check
  • cargo clippy --manifest-path wasm/Cargo.toml --all-targets -- -D warnings
  • npm run check in packages/wasm-gerber-renderer: 34 passed
  • ./scripts/vercel-build.sh with Rust 1.97.0 and wasm-pack 0.14.0
  • npm pack --dry-run: 15 package files
  • Recursive JavaScript syntax and workflow YAML validation
  • Drill smoke fixture parsed through the generated WASM package

Remaining 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.

@dsafdsaf132
dsafdsaf132 marked this pull request as ready for review July 9, 2026 23:51
@dsafdsaf132
dsafdsaf132 merged commit 15c1e47 into main Jul 10, 2026
10 checks passed
@dsafdsaf132
dsafdsaf132 deleted the fix/project-review-hardening branch July 10, 2026 04:22
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.

1 participant