Skip to content

runtime: settle async results before suspended producer exit - #334

Merged
lannbot merged 1 commit into
mainfrom
fix/323-task-return-settlement
Sep 11, 2026
Merged

runtime: settle async results before suspended producer exit#334
lannbot merged 1 commit into
mainfrom
fix/323-task-return-settlement

Conversation

@lannbot

@lannbot lannbot commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes #323.

Allow an async export driver to finish once its result is captured and entry hops are clear, even while its producer remains genuinely JSPI-suspended. The existing settlement pump owns continuation and late failures. Sync-typed lifts retain activation-completion requirements.

Adds real-Wasm coverage for result delivery before gate release, task.return after an earlier suspension, a nonblocking JSPI hop before another suspension, continued producer progress, and retained guest/host failures. A store-level test checks that unrelated failures do not unwind the live producer.

Ordering sanity check

Inspected Wasmtime at the repository's pinned revision 4675ee1: task_return/task_complete send the host result immediately (concurrent.rs:3507–3557,3606–3608), and run_concurrent polls the caller future before background futures (1320–1328). This corroborates separate result and producer lifetimes; the Component Model reference and embedder contract remain the authorities. This was a source-level check, not a Wasmtime differential execution.

Validation

  • just gates < /dev/null passed, including Chromium/Firefox page, worker, shared-worker lanes and consumer smokes; independently repeated by review.
  • Focused runtime tests: 74 passed.
  • Four new tests passed with tracing enabled.
  • just fmt-check, git diff --check, and Wasm fixture validation passed.
  • Independent review: LGTM.

Automerge will be armed after opening this PR.

@lannbot
lannbot enabled auto-merge September 11, 2026 01:51
@lannbot
lannbot merged commit 9eda249 into main Sep 11, 2026
4 checks passed
@lannbot
lannbot deleted the fix/323-task-return-settlement branch September 11, 2026 01:56
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.

async: task.return result remains pending behind a suspended producer activation

2 participants