Skip to content

release/v0.5.0 PR-C: spec-feature corpus fixtures (8 post-MVP features)#90

Merged
avrabe merged 1 commit intomainfrom
release/v0.5.0-pr-c-spec-features
May 2, 2026
Merged

release/v0.5.0 PR-C: spec-feature corpus fixtures (8 post-MVP features)#90
avrabe merged 1 commit intomainfrom
release/v0.5.0-pr-c-spec-features

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented May 2, 2026

Summary

Closes the v0.4.0 audit gap: zero fixtures exercised post-MVP wasm features. Adds 8 minimal .wat fixtures covering SIMD/v128, reference types, bulk memory, tail calls, exception handling, multi-memory, sign-extension ops, and saturating-trunc — plus a test harness that pins the contract "parser must never panic on any wasm input."

What ships

  • tests/fixtures/spec-features/ with 8 minimal fixtures.
  • loom-core/tests/spec_features.rs with three buckets:
    • Unsupported (SIMD, ref types, tail calls, EH): assert clean rejection — never panic.
    • Partial (bulk memory, multi memory): assert clean rejection or successful round-trip — never panic.
    • Supported (sign-extension, saturating-trunc): assert full optimize + encode round-trip succeeds and re-parses cleanly.

All 8 tests pass on main + on v0.5.0 PR-B's branch.

Provenance

Authored by a parallel agent that hit a watchdog timeout before pushing. The 8 .wat fixtures and 156-line test harness survived in the working tree; this PR ships them as-is after verifying they build and pass.

v0.5.0 release sequence

PR Theme Status
#88 PR-A: VerificationResult strict mode + gale measurement Open
#89 PR-B: hoist guard for Return/Br + CSE soundness fix Open
(this) PR-C: spec-feature corpus fixtures Open
- PR-D: FusedOptimization.v in BUILD.bazel Pending
- PR-E: Tag v0.5.0 Pending

🤖 Generated with Claude Code

@temper-pulseengine
Copy link
Copy Markdown

Automated review for PR #90

pulseengine/loom:release/v0.5.0-pr-c-spec-features → pulseengine/loom:main

Verdict: 💬 Comment

Summary: The patch adds new test cases for various post-MVP wasm features, ensuring that the parser correctly rejects them and that they can be optimized and round-tripped cleanly. The changes are well-documented in the commit message.

Findings: 0 mechanical (rivet) · 6 from local AI model.

Findings (6):

  1. tests/fixtures/spec-features/simd_v128_minimal.wat:1

    ;; SIMD/v128 minimal fixture (post-MVP wasm feature)
    

    The parser must reject the SIMD/v128 feature cleanly.

  2. tests/fixtures/spec-features/ref_types_minimal.wat:1

    ;; Reference types minimal fixture (post-MVP wasm feature)
    

    The parser must reject the reference types feature cleanly.

  3. tests/fixtures/spec-features/exception_handling_minimal.wat:1

    ;; Exception handling minimal fixture (post-MVP wasm feature)
    

    The parser must reject the exception handling feature cleanly.

  4. tests/fixtures/spec-features/multi_memory_minimal.wat:1

    ;; Multi-memory minimal fixture (post-MVP wasm feature, partial LOOM support)
    

    The parser must reject the multi-memory feature cleanly.

  5. tests/fixtures/spec-features/sign_extension_ops.wat:1

    ;; Sign-extension operators (wasm 1.1 / standardized feature, LOOM-supported)
    

    The parser must reject the sign-extension operators feature cleanly.

  6. tests/fixtures/spec-features/bulk_memory_minimal.wat:1

    ;; Bulk memory ops minimal fixture (post-MVP wasm feature, partial LOOM support)
    

    The parser must reject the bulk memory operations feature cleanly.


Generated by a local AI model and post-validated against a strict JSON contract. Each finding includes the verbatim line being criticised — verify by reading the file at the cited location.

Reviewed at addeeb4

Closes audit gap: v0.4.0 corpus had zero fixtures using post-MVP
WebAssembly features. The parser is supposed to reject unsupported
instructions cleanly (Err, never panic), but no test exercised the
rejection paths. Per CLAUDE.md: rejection paths matter as much as
happy paths.

Adds tests/fixtures/spec-features/ with 8 minimal .wat fixtures:
- simd_v128_minimal.wat — v128 ops, lane shuffles
- ref_types_minimal.wat — ref.null, ref.func, table.get
- bulk_memory_minimal.wat — memory.copy/fill/init, data.drop
- tail_calls_minimal.wat — return_call, return_call_indirect
- exception_handling_minimal.wat — try/catch/throw/throw_ref
- multi_memory_minimal.wat — two memories with memarg mem index
- sign_extension_ops.wat — i32.extend8_s, etc.
- saturating_trunc.wat — i32.trunc_sat_f32_s, etc.

loom-core/tests/spec_features.rs runs each through three buckets:
- Unsupported (SIMD, ref types, tail calls, EH): assert clean
  rejection — never panic.
- Partial (bulk memory, multi memory): same; either reject or
  succeed, never panic.
- Supported (sign-extension, saturating-trunc): assert full
  optimize + encode round-trip succeeds and re-parses cleanly.

All 8 tests pass on main + v0.5.0-pr-b. Pins LOOM's contract
that no post-MVP feature crashes the parser.

This work was authored by a parallel agent that hit a watchdog
timeout before pushing — picked up the surviving artifacts in
the working tree and shipped them here.

Trace: REQ-3, REQ-9, REQ-12
@avrabe avrabe force-pushed the release/v0.5.0-pr-c-spec-features branch from addeeb4 to 92f1982 Compare May 2, 2026 14:38
@avrabe avrabe merged commit e21f888 into main May 2, 2026
12 of 18 checks passed
@avrabe avrabe deleted the release/v0.5.0-pr-c-spec-features branch May 2, 2026 14:38
@avrabe avrabe mentioned this pull request May 2, 2026
3 tasks
avrabe added a commit that referenced this pull request May 2, 2026
Bump workspace version 0.4.0 → 0.5.0 and add CHANGELOG section.

This release ships the v0.5.0 audit follow-ups across five PRs:

- #88 PR-A: VerificationResult strict-mode helpers (is_skip,
  skip_reason, verify_or_revert_strict) + gale v0.4.0 measurement
  report documenting the CSE soundness bug on production
  kernel-scheduler code.
- #89 PR-B: Close hoist hole on early-exit (Return/Br) patterns.
  Per-pass tracing showed reordering happens in constant_folding's
  terms-IR roundtrip; the function ends up with the if-guard moved
  to the function tail and the load/store sequence hoisted to the
  function head. Fix: extend has_dataflow_unsafe_control_flow to
  flag nested Return/Br; constant_folding and
  optimize_advanced_instructions skip such functions entirely.
  Defense-in-depth guards on simplify_locals, remove_unused_branches,
  optimize_added_constants. Regression test pinned.
- #90 PR-C: 8 minimal post-MVP wasm fixtures + spec_features.rs
  test harness. Pins the "parser must never panic" contract for
  SIMD, ref types, bulk memory, tail calls, exception handling,
  multi-memory, sign-extension, saturating-trunc.
- #91 PR-D: FusedOptimization.v wired into BUILD.bazel. Closes
  audit D1; the 7 axioms remain (discharge is future work).
- #92 chore: top-level concurrency: block on every workflow.
  Closes the org-wide CI queue backlog; superseded PR runs now
  cancelled in ~30s, runs on main / tags / releases / scheduled
  events never cancelled.

CHANGELOG.md adds a v0.5.0 section documenting all of the above
plus the deferred work for the next release.

Trace: REQ-1, REQ-3, REQ-5, REQ-7, REQ-9, REQ-12, REQ-14
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