Repository navigation
fix: re-adopt healthy cloud workers after Gateway restart - #112928
Merged
Merged
Conversation
steipete
marked this pull request as ready for review
July 23, 2026 05:33
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 23, 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.
Closes #112869
Closes #112870
AI-assisted: implemented and reviewed with Codex. The maintainer understands and approved the change.
What Problem This Solves
Fixes an issue where restarting the Gateway discarded healthy attached cloud workers, released their leases, and forced sessions to pay the full dispatch delay again. It also resolves orphaned workspace recovery journals that logged forever, and makes a reclaim whose tunnel disappears after durable teardown report the committed success instead of a stale error.
Why This Change Was Made
Worker bundle identity now excludes lazily built Control UI assets, which never execute on workers but previously changed the bundle hash between otherwise identical Gateway starts. Exact worker runtime bytes remain admission-fenced; incompatible workers are cleanly destroyed and reclaimed rather than recorded as bootstrap failures.
Startup journal GC now deletes only rows whose exact monotonic placement owner can no longer apply them, while retaining the named forced-teardown rollback contract. Reclaim uses a typed tunnel-owner disconnect error and normalizes the shared in-flight promise only after the placement has durably reached
reclaimed, so coalesced callers agree and unrelated errors remain failures.User Impact
Gateway restarts no longer discard healthy cloud workers because of lazy Control UI build timing; dead recovery journals are collected once, and completed reclaim operations no longer surface a stale tunnel error.
Evidence
203696a…to392f4a…, moved the placement fromactivetoreclaimed, and released the lease. Extracting the two bundles showed the only changed subtree wasdist/control-ui/**.discarded orphaned cloud workspace journalevent fora7a66d3d-8826-4382-bea9-c2a23eb9977f; the row count became zero and Gateway health returnedok: true.node scripts/run-vitest.mjs src/gateway/worker-environments/: 102 files passed, 1,263 tests passed.node scripts/check-changed.mjs -- <13 touched files>: Blacksmith Testboxtbx_01ky6p9k690fqvszz3pe5vza25, Actions run 29981588569, exit 0 (19m18s command time)..agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main: clean, no accepted/actionable findings.