fix(gateway): keep newer node session on stale disconnect#79491
fix(gateway): keep newer node session on stale disconnect#79491davelutztx wants to merge 78 commits intoopenclaw:mainfrom
Conversation
(cherry picked from commit a373468)
(cherry picked from commit 2e8761c)
(cherry picked from commit 712aa96)
(cherry picked from commit 0eb06ca)
(cherry picked from commit cf3ce08)
(cherry picked from commit a91c17c)
(cherry picked from commit b546aa9)
Normalize WhatsApp onboarding allowlist entries to digit-only WhatsApp IDs and reject invalid owner-phone inputs during prompt validation. (cherry picked from commit 68a500c)
* fix(telegram): reuse preview for long text finals * test(qa): cover long telegram finals * fix(qa): satisfy extension lint * fix(qa): keep telegram long final fixture to two chunks * test(telegram): cover three chunk finals * fix(telegram): force long final preview boundary (cherry picked from commit e03fe1e)
(cherry picked from commit b0f841e)
Bind the default loopback gateway listener only to `127.0.0.1` on Windows so libuv dual-stack `::1` behavior cannot wedge localhost HTTP requests. Also keeps non-Windows dual-loopback behavior covered, replaces the redundant Windows passthrough test with guard coverage, and adds the required changelog entry. Fixes openclaw#69674. Tests: - pnpm exec oxfmt --check --threads=1 CHANGELOG.md src/gateway/net.ts src/gateway/net.test.ts - pnpm test src/gateway/net.test.ts - pnpm check:changed - GitHub required checks: green Thanks @SARAMALI15792. Co-authored-by: saram ali <140950904+SARAMALI15792@users.noreply.github.com> Co-authored-by: Brad Groux <3053586+BradGroux@users.noreply.github.com> (cherry picked from commit 978bc53)
…isted] (openclaw#74161) Summary: - The PR updates agents skill prompt guidance to require exact `<location>` paths for single- and multi-skill selection, adds prompt assertions, and records the fix in the changelog. - Reproducibility: yes. Static source reproduction is enough: current main lacks the exact-`<location>` guard ... illsSection()`, while the PR diff adds it to both selection branches and asserts the resulting prompt text. Automerge notes: - PR branch already contained follow-up commit before automerge: fix: enforce exact skill paths for all skill matches Validation: - ClawSweeper review passed for head 743c984. - Required merge gates passed before the squash merge. Prepared head SHA: 743c984 Review: openclaw#74161 (comment) Co-authored-by: tianguicheng <tianguicheng@xiaomi.com> Co-authored-by: sallyom <somalley@redhat.com> (cherry picked from commit c739088)
Accept drive-absolute Windows sandbox Docker bind sources in config and runtime validation while keeping blocked-path and allowed-root comparisons case-insensitive for Windows drive paths. Also remove a stale WhatsApp setup import that blocked extension lint after the rebase. Co-authored-by: 6607changchun <84566142+6607changchun@users.noreply.github.com> Co-authored-by: Brad Groux <3053586+BradGroux@users.noreply.github.com> (cherry picked from commit d02fbc6)
(cherry picked from commit c37871e)
(cherry picked from commit a0ea07e)
(cherry picked from commit add9a49)
(cherry picked from commit b32d4c5)
Adds cap_drop and no-new-privileges hardening for the bundled gateway Docker Compose services.\n\nThanks @VintageAyu. (cherry picked from commit f9da484)
…penclaw#77280) Merged via squash. Prepared head SHA: f4188b4 Co-authored-by: openperf <80630709+openperf@users.noreply.github.com> Co-authored-by: openperf <80630709+openperf@users.noreply.github.com> Reviewed-by: @openperf (cherry picked from commit 31da1fe)
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(gateway): keep newer node session on stale disconnect This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Thanks for the PR. This branch appears to include unrelated release/main replay around the gateway stale-disconnect fix, so it is not reviewable as a focused Telegram PR. Please reopen as a narrow PR with only the intended fix. |
|
Thanks — agreed, this branch picked up unrelated release/main history and shouldn’t be reviewed further. I checked current main and the intended node reconnect fix appears to have already landed via #78351, |
Summary
Fix a node registry race where a stale/disconnecting node WebSocket can unregister a newer live session for the same node id.
Root cause
NodeRegistry.unregister(connId)looked upnodeIdfromnodesByConn, then unconditionally deletednodesById[nodeId].If an older connection closes after a newer connection for the same Android node has already registered, the old close removes the newer live registry entry. The node socket can still send
node.event, butnode.invokeandnodes statussee the node as disconnected.This matches the symptom in locked issue #30137: Android UI/chat appears connected while node commands fail with
node not connectedafter gateway restart/reconnect timing.Fix
Only delete
nodesById[nodeId]during unregister when the current registered session still belongs to the closingconnId.Verification
Added a regression test:
old-connfor nodeNnew-connfor the same nodeNold-connnew-connremains connected/registeredRan targeted gateway tests:
Result: 42 tests passed.
Refs #30137.