Repository navigation
fix(gateway): reread foreign placement during abandonment - #179448
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Contributor
Author
|
@clawsweeper autofix |
Contributor
|
|
Patrick-Erichsen
enabled auto-merge (squash)
October 21, 2026 12:08
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 22, 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.
What Problem This Solves
When a foreign writer changes a worker placement during forced abandonment, the Gateway can use its older cached placement and fail to fence the remote owner. This makes two move-recovery tests fail on clean main and blocks the agent-selector PR's required CI.
Summary
During forced worker abandonment, a foreign writer can advance a placement while the Gateway still has an older cached replica. Read the current placement and move record before fencing journal owners, pending results, and attached sessions. The recovery assertion also reads the durable placement after its test simulates a foreign SQL claim replacement.
This repairs an existing main-branch CI failure blocking the agent selector PR; it does not change that PR's UI scope.
Evidence
4ee460642678685a83c6e7aaf4a61859a5a4ba6e,placement-dispatch-move-recovery.test.tsfails 2 of 19 tests: concurrent foreign abandonment reads an old active placement, and the claim-replacement assertion reads an old cached claim.pnpm tsgo, targeted type-aware oxlint and oxfmt, andpnpm docs:listpass.Merge Danger
Door: Two-way. Revert restores the previous cache read behavior.
Blast Radius: Worker placement recovery. The fresh reads touch only the forced-abandonment path and one test assertion.