Repository navigation
fix(node-host): drain all workers before shutdown failures - #129699
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 26, 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.
Summary
Root cause
NodeWorkerSupervisor.close()used fail-fastPromise.allacross independent worker stops. If one Docker container removal rejected while another removal was still in flight, supervisor shutdown rejected immediately. The terminal Gateway reconnect handler callsactiveRuntime.close().finally(() => process.exit(code)), so that premature rejection could forcibly exit the node host and orphan the still-running healthy container.The supervisor now joins every stop with
Promise.allSettled, collects failures in its existing owner-local error accumulator, completes terminal reconciliation, and preserves the original single-error/AggregateErrorbehavior. This matches the existing parent runtime shutdown contract without adding production lines, configuration, compatibility paths, or test-only seams.Verification
rmwas deliberately held.OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/node-host/node-worker-supervisor.container.test.ts src/node-host/node-worker-supervisor.test.ts src/node-host/runtime.test.ts src/node-host/runner.test.ts --reporter=dot— four files, 111 tests passed, including real runner terminal reconnect/exit behavior.OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 node scripts/check-changed.mjs --timed -- src/node-host/node-worker-supervisor.ts src/node-host/node-worker-supervisor.container.test.ts— all 28 changed-file, typecheck, lint, boundary, and security stages passed.git diff --numstat: production+7/-7(net zero); regression test+68.Related remote-node live Docker/Gateway/Chromium proof and Full Access approval repair: #129674.