Skip to content

[ISSUE #7563] Harden wasm fixture verification. - #7581

Merged
Aias00 merged 1 commit into
apache:masterfrom
yangjj-iso:fix/7567-wasm-fixture-verification
Oct 17, 2026
Merged

Aias00 merged 1 commit into
apache:masterfrom
yangjj-iso:fix/7567-wasm-fixture-verification

Conversation

@yangjj-iso

@yangjj-iso yangjj-iso commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

WASM fixture verification can silently accept missing fixture families and omit newly added WAT directories. Require the base module's wasm-gateway and the API module's wasm-concurrent, discover every wasm-* directory in both modules, and reject missing, malformed, empty or byte-mismatched families.

Rebased onto upstream master at ad89a887a after the instance-pool rewrite in #7582. Preserve the merged pool implementation and concurrent fixture coverage; the WasmLoader change remains Javadoc only. Remove Cargo's forced offline mode and document the clean-checkout requirement and cleanup limits after forced process termination.

This is the focused prerequisite for #7569; merge this fixture-verification follow-up first. The bridge PR will need its own synchronization with the current instance-pool implementation afterward.

Validation on the rebased head:

  • All 14 Python verifier regression checks passed, including five checks for the API/concurrent fixture family and additional API fixture directories.

  • All 55 WASM Java tests passed on Java 21 against committed fixtures, with zero failures, errors or skips; the affected 33-module reactor passed Checkstyle.

  • Apache RAT passed across the affected reactor; git diff --check passed.

  • The pinned WABT/Rust rebuild workflow has been triggered for this head. Full local WAT/Rust rebuilds and a full-repository Maven install were not repeated for this update.

  • Read the contribution guidelines.

  • Add regression tests.

  • Full-repository Maven install; affected-reactor validation is recorded above.

@yangjj-iso

Copy link
Copy Markdown
Contributor Author

@wy471x This focused fixture-verification follow-up is ready for review before #7569.

I verified that #7569 contains this exact prerequisite commit and that the shared verifier, verifier regressions, workflow and WasmLoader file are identical between the two branches. Combined validation with the current upstream master passes all nine Python verifier regressions and all 102 WASM Java tests against the committed fixtures, with zero failures/errors/skips and no Checkstyle violations. The export-lookup policy remains the merged strict policy; the production loader difference here is documentation only.

Please review this focused prerequisite first. The subsequent #7569 synchronization is prepared locally; its publication and follow-up review remain gated on this PR landing, preserving the documented merge order.

Aias00
Aias00 previously approved these changes Oct 15, 2026

@Aias00 Aias00 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: APPROVE

Good hardening of the WASM fixture verification pipeline (issue #7563), with offline coverage added.

What's good

  • verify-wasm-fixtures.py now requires the wasm-gateway family and iterates every wasm-* directory (failing fast when one is not a directory), so newly added families like wasm-concurrent (from #7582) are automatically verified byte-for-byte without modifying committed files.
  • verify_rust drops the --offline flag, so Cargo may fetch dependencies in CI (the verifier still restores original resource bytes after success, ordinary failure, or KeyboardInterrupt).
  • A new test-wasm-fixtures.py provides offline regression tests for the verification logic itself (mocking subprocess), covering missing/extra/empty families, directory-type checks, and resource restoration on partial build / maven / keyboard-interrupt failures. wasm-fixtures.yml wires this into both pull_request and push triggers.
  • WasmLoader.java only gains a clarifying Javadoc on findWasmExtern; README.md documents the new behavior.

Non-blocking note

  • None blocking. The WasmLoader Javadoc-only change here overlaps with #7582's body rewrite of the same method — see the cross-PR note on #7582 for merge-order guidance.

Clean and well-tested — approving.

@Aias00

Aias00 commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

@yangjj-iso This PR currently has merge conflicts with master and cannot be merged.

Root cause: the conflict is in WasmLoader.java. #7582 (ISSUE #7558, the instance-pool rewrite of WasmLoader) was merged first and rewrote that file, while this PR only added javadoc to it.

Please rebase this PR onto the latest master and re-apply the javadoc additions on top of the rewritten WasmLoader, then make sure CI is green. Once resolved it can be merged. Thanks!

@Aias00 Aias00 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Hardens wasm fixture verification (#7563). The verifier now requires the base module's wasm-gateway and the API module's wasm-concurrent families, validates every wasm-* directory byte-for-byte (rejecting non-directories and empty families), and a new offline test script covers the failure/cleanup paths.

What the change does

  • verify-wasm-fixtures.py: family-existence checks for wasm-gateway/wasm-concurrent, then iterates glob("wasm-*") in both roots with explicit RuntimeErrors for non-directories / empty output.
  • test-wasm-fixtures.py (new): offline regression tests for verify_wat() and verify_rust() (missing/empty/non-dir families, resource restoration on success, partial build failure, Maven failure, KeyboardInterrupt).
  • wasm-fixtures.yml: runs the new test script and triggers on its changes.
  • WasmLoader.java: javadoc-only change.

Verification

  • CI green (pr_build, Analyze (java), rat_check, check-license-header, scope, sql-matrix).
  • The Rust build drops --offline; the README documents that cargo may fetch dependencies and that no pre-populated offline cache is required.

Notes (non-blocking)

  • Removing --offline means the wasm-fixtures job now needs network access to the cargo registry; documented and acceptable, but a potential source of CI flakiness worth watching.

Conclusion

APPROVE.

@Aias00
Aias00 merged commit e50646a into apache:master Oct 17, 2026
29 checks passed
@Aias00 Aias00 added this to the 2.7.2 milestone Nov 13, 2026
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.

2 participants