fix(gateway): stop update.run restart leaking to wrong channel (#18239)#18267
Merged
steipete merged 1 commit intoopenclaw:mainfrom Feb 16, 2026
Merged
Conversation
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
update.rundoesn't capturedeliveryContextin the restart sentinel payload, so post-restart confirmation messages can get routed to the wrong channel/recipient. The config handlers (config.patch,config.apply) were already fixed in 4104229 butupdate.rungot missed.Closes #18239
lobster-biscuit
Root Cause
update.runinsrc/gateway/server-methods/update.tsbuilds aRestartSentinelPayloadwithsessionKeybut leavesdeliveryContextandthreadIdundefined. After restart,scheduleRestartSentinelWakefalls back to the session store's stale delivery route — which can point to a completely different channel/recipient than the one that triggered the update.Changes
update.runsentinel payload has nodeliveryContext— restart handler falls back to stale session store data, potentially sending internal details to external contactsupdate.runcallsextractDeliveryInfo(sessionKey)(same pattern as config handlers) and includes bothdeliveryContextandthreadIdin the sentinel payloadTests
update.test.ts— 3 cases: deliveryContext with sessionKey, undefined without sessionKey, threadId for threaded sessions. All fail before fix, pass after.pnpm build && pnpm checkpasssrc/gateway/server-methods/passGreptile Summary
Fixes a channel-routing bug where
update.run's restart sentinel payload omitteddeliveryContextandthreadId, causing post-restart confirmation messages to be routed to the wrong channel/recipient via stale session store data. The fix applies the sameextractDeliveryInfo(sessionKey)pattern already used byconfig.patchandconfig.applyhandlers.extractDeliveryInfocall inupdate.runhandler to capturedeliveryContextandthreadIdfrom the session key before restartRestartSentinelPayloadsoscheduleRestartSentinelWakecan route the post-restart message correctlyConfidence Score: 5/5
Last reviewed commit: d4f08a8