Repository navigation
Conversation
Combinations of test components that share a runner are composed in parallel, but the intermediate file written by `wasm-compose` was named only after the runner and the step. Concurrent combinations overwrote each other's file, leading to sporadic "malformed section id" or "unexpected EOF" errors. Include the names of all components of the combination in the file name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Exercise a chain of three components (runner -> middle -> leaf) where the middle component awaits an async import from the leaf before returning its own result, in both Rust and C++ for each of the three roles. This covers async exports that suspend on an async import of another component and are resumed by the event loop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
AI;DR: This patch is part of a series of patches which are potentially interesting outside of my symmetric fork.
This one fixes a race condition in test file intermediate naming if you mix languages.
PS: Tell me if I should I remove claude from the commit messages.
The test harness composes every combination of test components (runner,
middle, leaf, ...).
compose_wasm_with_wasm_composewrites the result of eachintermediate composition step to
<runner>.composition{i}.wasm. Combinationsthat share a runner are executed in parallel, so they overwrite each other's
intermediate file, which shows up as sporadic errors such as "malformed
section id" or "unexpected EOF" when composing. This was found while running
many component combinations with three components in a chain.
intermediate file name, so it is unique per combination.
tests/runtime/async-cross-component-await: arunner -> middle -> leaf chain where the middle component awaits an async
import from the leaf before returning its own result, written in Rust and C++
for all three roles. With three components and two languages it has 8
combinations, several of which share a runner, so it triggers the race
reliably: without commit 1 it failed in each of 6 consecutive runs (4 of
the 8 combinations each time), with it all 8 pass.
Tested with
cargo run -- test --languages rust,cpp --artifacts <dir> --rust-wit-bindgen-path ./crates/guest-rust tests/runtime/async-cross-component-await.