Repository navigation
fix(macos): wait for the current reconnect snapshot - #116550
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 30, 2026, 5:33 PM ET / 21:33 UTC. ClawSweeper reviewWhat this changesThe branch gives each macOS Gateway snapshot wait its own UUID-keyed continuation, adds a deterministic fast-reconnect regression test, and makes an unrelated voice-ear expiry test wait on observable state rather than a fragile fixed delay. Merge readinessKeep open for maintainer merge review. The patch narrowly prevents a completed route’s delayed snapshot timeout from releasing a replacement macOS Gateway route before that replacement receives its hello snapshot; it is a plausible availability fix with no actionable code defect found in the supplied diff. The current head remains cleanly mergeable but is behind Priority: P1 Review scores
Verification
How this fits togetherThe macOS node session connects a native client to the Gateway and waits for the Gateway hello snapshot before treating a route as ready. Snapshot receipt or connection reset completes the relevant waiters, after which the route can expose snapshot-derived capabilities and session defaults to the app. flowchart LR
A[Gateway transport reconnect] --> B[macOS node session]
B --> C[Wait for hello snapshot]
C --> D{Snapshot, reset, or timeout?}
D -->|Snapshot or reset| E[Drain current route waiters]
D -->|Timeout| F[Resolve only matching waiter]
E --> G[Route readiness and capabilities]
F --> G
Decision needed
Why: The patch is authored by a repository member and carries the protected Before merge
Agent review detailsSecurityNone. PR surfaceOther +50. Total +50 across 3 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the UUID-scoped waiter ownership, accept the bounded polling test repair separately from runtime semantics, and land only after the exact-head native lane is green on a clean current-main merge result. Do we have a high-confidence way to reproduce the issue? Yes in source: the added deterministic test establishes the stale-timeout sequence across a route reset, although this review did not execute it locally. Is this the best way to solve the issue? Yes. UUID-scoped waiter ownership is the narrowest maintainable fix because the timeout should resolve only the continuation it created while snapshot receipt and route reset still own complete current-waiter draining. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 47f8c1d6b0fa. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
…iter-timeout-v20 * origin/main: fix(gateway): project subagent topology for session lists (#116533)
|
ClawSweeper rank-up moves completed on refreshed head
The restarted macOS/native checks are running on this exact head. I will land only after they are green. |
|
Addressed the current-head ClawSweeper finding in
The runtime diff is unchanged from |
|
Latest ClawSweeper review has no actionable findings. For its optional final-main refresh move, I am taking the review's documented "accept the existing-head evidence" path:
Repeatedly merging a fast-moving |
|
The current-head macOS lane exposed a separate pre-existing timing defect in Addressed in Proof:
|
…-supported-paths * origin/main: (168 commits) fix(plugins): keep registry sqlite root consistent (#116427) fix(cli): keep Gateway auth failures parseable in JSON (#116597) fix(trajectory): preserve prompts in oversized events (#116220) test(buzz): add live QA Lab channel lane (#116298) chore(i18n): refresh native locales (#116567) feat: add OpenClaw TUI prototype skill (#116583) fix(update): accept concrete versions selected by ranges (#116585) fix(agents): preserve locked session model routes test(qa-lab): preserve Matrix fault proxy identity fix(ci): extend OpenAI live profile setup budget (#116580) fix: prevent configured models from stalling startup (#116553) fix(cli): close MCP listener after one-shot commands fix(auto-reply): keep explicit NO_REPLY silent (#116548) test(discord): cover deferred backpressure terminals fix(discord): cancel backpressured realtime playback test(discord): cover realtime output backpressure fix(codex): add remote WebSocket heartbeat and reconnect (#116135) fix(macos): wait for the current reconnect snapshot (#116550) fix(outbound): recognize current-source message-tool sends (#116560) fix(voice-call): type cancelled consult outcomes ... # Conflicts: # extensions/google/setup-api.test.ts # ui/src/e2e/model-setup.e2e.test.ts
* fix(macos): isolate snapshot waiter timeouts * chore: leave changelog to release generation * test(macos): wait for voice ear expiry
…-supported-paths * origin/main: (168 commits) fix(plugins): keep registry sqlite root consistent (openclaw#116427) fix(cli): keep Gateway auth failures parseable in JSON (openclaw#116597) fix(trajectory): preserve prompts in oversized events (openclaw#116220) test(buzz): add live QA Lab channel lane (openclaw#116298) chore(i18n): refresh native locales (openclaw#116567) feat: add OpenClaw TUI prototype skill (openclaw#116583) fix(update): accept concrete versions selected by ranges (openclaw#116585) fix(agents): preserve locked session model routes test(qa-lab): preserve Matrix fault proxy identity fix(ci): extend OpenAI live profile setup budget (openclaw#116580) fix: prevent configured models from stalling startup (openclaw#116553) fix(cli): close MCP listener after one-shot commands fix(auto-reply): keep explicit NO_REPLY silent (openclaw#116548) test(discord): cover deferred backpressure terminals fix(discord): cancel backpressured realtime playback test(discord): cover realtime output backpressure fix(codex): add remote WebSocket heartbeat and reconnect (openclaw#116135) fix(macos): wait for the current reconnect snapshot (openclaw#116550) fix(outbound): recognize current-source message-tool sends (openclaw#116560) fix(voice-call): type cancelled consult outcomes ... # Conflicts: # extensions/google/setup-api.test.ts # ui/src/e2e/model-setup.e2e.test.ts
What Problem This Solves
Fixes an issue where the macOS node session could report a replacement Gateway route as connected before that route's hello snapshot arrived when a completed route's delayed snapshot timeout fired during a fast reconnect.
Why This Change Was Made
Each bounded snapshot wait now owns a UUID-keyed continuation, so its timeout can resolve only that wait. Snapshot receipt and route reset still drain the complete current waiter set. A deterministic regression test reproduces the stale-timeout sequence across a route reset.
User Impact
Fast Gateway reconnects no longer admit the macOS route early with stale or missing snapshot-derived capabilities and session defaults.
Evidence
completed snapshot timeout cannot release a later route waiterconnect joins the snapshot dispatched connected callbackandtransport reconnect does not wait for blocked disconnect lifecyclenode scripts/check-changed.mjs -- CHANGELOG.md apps/shared/OpenClawKit/Sources/OpenClawKit/GatewayNodeSession.swift apps/shared/OpenClawKit/Tests/OpenClawKitTests/GatewayNodeSessionTests.swiftpassed on Blacksmith Testbox