Skip to content

test(resource): #305 — opaque-rep construct+drop runtime oracle (resolved, no meld fix)#309

Merged
avrabe merged 1 commit into
mainfrom
fix/305-opaque-rep-drop
Jun 23, 2026
Merged

test(resource): #305 — opaque-rep construct+drop runtime oracle (resolved, no meld fix)#309
avrabe merged 1 commit into
mainfrom
fix/305-opaque-rep-drop

Conversation

@avrabe

@avrabe avrabe commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Drove #305 to ground by building the repro and running it, rather than editing Tier-5 resource code blind.

Outcome: #305 is resolved; meld needs no change

  • Built resource_floats_opaque.wasm from the wit-bindgen fork feat/opaque-rep-attribute (51eca6b6 — "user-supplied dtor for opaque-rep export resources").
  • meld fuses the 3-component re-exporter chain (--output component, 163 KB, 695 funcs, 4 adapters) and construct+drop runs cleanly on wasmtime.
  • The original drop-teardown trap was the wit-bindgen-side opaque-rep destructor (missing inner-handle forwarding); the fork's dtor fixes it. The suspected meld handle-table discrimination (merger.rs/fact.rs) was not required — verified empirically by running the repro.

What this lands

  • test_runtime_wit_bindgen_resource_floats_opaque — fuses + construct+drop regression oracle. Fixture is gitignored (~11 MB; recipe added to tests/wit_bindgen/README.md), so it skips in CI when absent and is the load-bearing local oracle (same posture as other large fixtures).
  • SR-43 proposed → verified.
  • Cargo.lock synced to 0.34.0 (v0.34 release bumped Cargo.toml only).

No meld code change ⇒ this is verification closure, not a versioned release. Closes #305.

…lved, no meld fix)

Built the repro (resource_floats_opaque composed component from the
wit-bindgen fork feat/opaque-rep-attribute 51eca6b6, with the user-supplied
opaque-rep dtor) and ran it through meld.

Result: meld fuses the 3-component re-exporter chain (--output component,
163 KB, 695 funcs, 4 adapters) AND construct+drop runs cleanly on wasmtime.
The original drop-teardown trap was the wit-bindgen-side opaque-rep
destructor (missing inner-handle forwarding); the fork's dtor fixes it. meld
needed no handle-table change — the suspected merger.rs/fact.rs fix was not
required (verified by running the repro, not editing Tier-5 code blind).

Lands the regression oracle test_runtime_wit_bindgen_resource_floats_opaque.
Fixture gitignored (~11 MB; regenerate per tests/wit_bindgen/README.md — recipe
added); test skips in CI when absent (load-bearing local oracle). SR-43
proposed -> verified. Closes #305.

Also syncs Cargo.lock to 0.34.0 (the v0.34 release bumped Cargo.toml but not
the lockfile).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

LS-N verification gate

57/57 approved LS entries verified

count
Passed (≥1 test, all green) 57
Failed (≥1 test failure) 0
Missing (no ls_*_NN_* test found) 0

Approved loss-scenarios.yaml entries are expected to have a
regression test named ls_<letter>_<num>_* (e.g. LS-A-11
ls_a_11_*). The gate runs each prefix via cargo test --lib --no-fail-fast and aggregates pass/fail/missing.

Failed LS entries

(none)

Missing regression tests

(none)

Updated automatically by tools/post_verification_comment.py.
Source of truth: safety/stpa/loss-scenarios.yaml.

@avrabe avrabe merged commit ddf7c04 into main Jun 23, 2026
17 checks passed
@avrabe avrabe deleted the fix/305-opaque-rep-drop branch June 23, 2026 16:17
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.

opaque-rep resource: construct+drop traps during drop teardown (fuse oracle exists on feat/explore-I-opaque-rep, not in main)

1 participant