Files
openclaw/src
Chunyue Wang afcbdd7416 fix(infra/agents): session-routing guard for coalesced gateway restart continuations (#86742) (#87323)
* fix(infra/agents): session-routing guard for coalesced gateway restart continuations (#86742)

When two sessions issue gateway.restart with continuationMessage close
together, the scheduler Path B updatePendingRestartEmitHooks
unconditionally overwrote the existing pending hooks, silently dropping
the first sessions continuation and potentially routing the second
sessions continuation back to the first session (CWE-200 finding
flagged by aisle-research-bot on prior attempt #74443).

Add a session-routing guard: scheduleGatewaySigusr1Restart now accepts
an optional sessionKey and tracks the pending restarts owning session.
Coalesced callers from a different session are rejected at the hook-
update step and the new ScheduledRestart.emitHooksQueued: false field
surfaces the drop to the caller. The gateway tool propagates this as
continuationQueued: false in the tool response, matching #83370 narrow
report-only surface.

Same-session debounce/replace and legacy hookless callers behave the
same as before.

Refs #86742

* fix(infra): preserve queued restart continuation on forced bypass

* fix(infra): make forced restart hook preservation explicit

* fix(infra): guard restart continuation ownership before reschedule

* fix(infra): report hookless coalesced restarts accurately

* fix(infra): trust runtime session for restart sentinel routing

* fix(infra): preserve earlier restart reschedule semantics

* fix(agents): trust runtime session for update continuations

* fix(infra): preserve hookless forced restart continuations

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-06-07 03:38:58 -07:00
..
2026-06-04 23:55:53 +01:00
2026-06-04 20:16:21 -04:00
2026-06-04 20:31:55 -04:00
2026-06-04 20:08:40 -04:00
2026-06-04 20:34:26 -04:00
2026-06-04 20:27:46 -04:00
2026-06-04 20:14:34 -04:00
2026-06-04 20:25:55 -04:00
2026-06-04 20:17:42 -04:00
2026-06-05 01:51:27 +01:00
2026-06-07 19:03:38 +09:00
2026-06-05 02:12:53 +01:00
2026-06-04 20:11:22 -04:00
2026-06-04 23:06:33 +01:00