fix(wasm): acknowledge worker cancellation retries - #598
Open
peter-jerry-ye wants to merge 2 commits into
Open
Conversation
2 tasks
Coverage Report for CI Build 1163Coverage increased (+0.1%) to 77.813%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions49 previously-covered lines in 3 files lost coverage.
Coverage Stats
💛 - Coveralls |
peter-jerry-ye
added this pull request to stack #599
September 10, 2026 05:43
peter-jerry-ye
removed this pull request from stack #599
September 10, 2026 07:13
peter-jerry-ye
force-pushed
the
codex/wasm-signal-handler
branch
from
September 10, 2026 07:13
2975e15 to
b705729
Compare
peter-jerry-ye
force-pushed
the
codex/wasm-worker-cancellation
branch
from
September 10, 2026 07:13
a342ce4 to
a022acc
Compare
peter-jerry-ye
changed the base branch from
codex/wasm-signal-handler
to
main
September 10, 2026 07:13
peter-jerry-ye
marked this pull request as ready for review
September 10, 2026 07:13
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Guest0x0
approved these changes
Sep 10, 2026
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.
The native cancellation protocol in #595 can notify the event loop before a job completes, while the Wasm retry check still always returns false. Use
thread_pool/cancel_worker_with_retryfor both initial cancellation and job-notification checks. Its result distinguishes timer retry (0), continued waiting (1), and a finished job with an available result (2), so the guest needs only one host import for both operations. Initial cancellation still waits for the completion notification to retire the worker, matching native scheduling. Moonrun keeps the historical cancellation protocol for already-compiled Wasm guests. Enable the existing worker regressions on Wasm.Also connect the Wasm Linux port-reuse wrapper to the host socket operation and enable its existing regression coverage. This closes the compiled guest's native/Wasm API differences in the runtime backport.
This PR targets
mainwithout a GitHub stack. Merge #597 first: the worker-limit regressions enabled here assume the signal listener no longer occupies a pool worker. With the historical signal listener, the one-worker queued-job test cannot start its job. The paired Moon cancellation backport must also have reachedmoonbitlang/moon'smainbefore this PR merges. This is a coordinating guest change for #595; do not apply runtime-port queue labels to it.Signal prerequisite: #597. Paired runtime PR: moonbitlang/moon#2176.