Repository navigation
fix(workers): preserve missing-module startup errors - #194935
Merged
Merged
Conversation
Render non-Error diagnostic causes before forwarding native worker failures so loader host objects cannot replace the original error with DataCloneError. Keep primitive causes and structured Error metadata, and verify the real supervisor error and join path on stock Bun, the pinned fork, and Node. Removes the native error-forwarding dependency on oven-sh/bun#46711.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review endedClawSweeper stopped reviewing this revision because the pull request closed. |
steipete
marked this pull request as ready for review
November 8, 2026 01:48
Contributor
Codex Review Summary: ✅ CompletedThis 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. |
Reuse one shared and cyclic error graph, extend the downlevel value table, and cover missing worker entries inside the existing supervisor recovery flow before its healthy sibling control. Preserve the original cases while reducing test lines by two against the PR base; remove the now-unneeded allocation.
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 8, 2026
* fix(workers): preserve missing-module startup errors Render non-Error diagnostic causes before forwarding native worker failures so loader host objects cannot replace the original error with DataCloneError. Keep primitive causes and structured Error metadata, and verify the real supervisor error and join path on stock Bun, the pinned fork, and Node. Removes the native error-forwarding dependency on oven-sh/bun#46711. * fix(workers): narrow serialized diagnostic scalars explicitly * test(workers): consolidate native failure regressions Reuse one shared and cyclic error graph, extend the downlevel value table, and cover missing worker entries inside the existing supervisor recovery flow before its healthy sibling control. Preserve the original cases while reducing test lines by two against the PR base; remove the now-unneeded allocation.
maplel
pushed a commit
to maplel/openclaw
that referenced
this pull request
Nov 24, 2026
* fix(workers): preserve missing-module startup errors Render non-Error diagnostic causes before forwarding native worker failures so loader host objects cannot replace the original error with DataCloneError. Keep primitive causes and structured Error metadata, and verify the real supervisor error and join path on stock Bun, the pinned fork, and Node. Removes the native error-forwarding dependency on oven-sh/bun#46711. * fix(workers): narrow serialized diagnostic scalars explicitly * test(workers): consolidate native failure regressions Reuse one shared and cyclic error graph, extend the downlevel value table, and cover missing worker entries inside the existing supervisor recovery flow before its healthy sibling control. Preserve the original cases while reducing test lines by two against the PR base; remove the now-unneeded allocation. (cherry picked from commit 058133d) Release adaptation: Only cloneable diagnostic normalization and encoder/lifecycle regressions. Later inherited-code fix 416b357 is independent, not prerequisite; supervisor timing and plugin startup rewrites excluded. Follow-up dispositions: d82e097 test(process): wait for broker failure before retained replacement (openclaw#202539); 416b357 fix: preserve the real reason a worker failed; 907e17b fix(plugins): avoid Gateway stalls during source preparation (openclaw#200320); adb660f fix: allow retrying refused native worker cleanup (openclaw#198240) Validation: Direct exported encoder/decoder: baseline fails 3 non-Error diagnostic cases; fixed passes 3; primitive and Error graph regression retained. Normal wrapper lifecycle proof pending compiled-worker setup. diff --check passes. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit cb68af332a1182ed21b39c10b53b1f6e3036461c) (cherry picked from commit 7a4af04d616ab677c58fa1f369b947bef45c382a)
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.
What Problem This Solves
Fixes: a missing worker module can replace its useful startup error with
DataCloneErrorand terminate the native worker supervisor.User Impact
Users receive the original module failure and the failed worker joins cleanly. Non-Error object-valued diagnostic causes become text; primitive causes and real Error metadata remain structured.
Why This Change Was Made
Native host objects in loader-error causes need not be structured-cloneable. The existing error encoder now renders non-Error objects, functions, and symbols as diagnostic text before transport. It owns the normalization, replacing raw-object forwarding without runtime checks. The extra work occurs only while encoding failures.
The tests reuse a shared/cyclic error fixture and the existing supervisor recovery scenario. They cover the missing-module failure, then prove a healthy sibling still exchanges messages and joins. Native error types, shared references, cycles, falsy suppressed values, and opaque diagnostic values remain covered. The final diff adds 16 production lines and removes 2 test lines; no test-budget increase remains.
Evidence
2596ac5d: the real retained-worker missing-module path fails withDataCloneErrorbefore the change and preserves the original loader error plus native join after it. The final consolidated supervisor regression also fails on the base and passes after the fix.191755ec11and Node26.12.1. Final focused coverage: 8/8 on each runtime.c339698bbd7; no actionable findings. Exact-head CI completed successfully in 553 seconds: https://github.com/openclaw/openclaw/actions/runs/42436833695.