Skip to content

fix(desktop): retry failed initial relay dials - #2564

Merged
tlongwell-block merged 1 commit into
mainfrom
wren/relay-reconnect-hardening
Jul 23, 2026
Merged

fix(desktop): retry failed initial relay dials#2564
tlongwell-block merged 1 commit into
mainfrom
wren/relay-reconnect-hardening

Conversation

@tlongwell-block

Copy link
Copy Markdown
Collaborator

Summary

  • converge relay URL lookup, native WebSocket dial, auth, replay, and async message-handler failures through generation-safe reset/reconnect handling
  • close stale native sockets when a superseded connection attempt finishes late
  • add a mock native-dial failure and prove app-shell keepalive autonomously reconnects after failure before socket ID allocation

Why

A failed initial plugin:websocket|connect invocation escaped connect() before wsId existed, so neither resetConnection() nor scheduleReconnect() ran. App-shell preconnect could leave keepAliveRequested=true with no reconnect timer.

Validation

At eb8ea568d69c972ed52bfe754d8e752159c92fdd:

  • cd desktop && pnpm check
  • cd desktop && pnpm typecheck
  • cd desktop && pnpm test — 3403 passed
  • cd desktop && pnpm exec playwright test tests/e2e/relay-reconnect.spec.ts --project=smoke — 5 passed

Co-authored-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@buzz.block.builderlab.xyz>
Signed-off-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@buzz.block.builderlab.xyz>
@tlongwell-block
tlongwell-block force-pushed the wren/relay-reconnect-hardening branch from acb3f91 to c2c7653 Compare July 23, 2026 18:16
@tlongwell-block
tlongwell-block merged commit 9ec52cf into main Jul 23, 2026
25 checks passed
@tlongwell-block
tlongwell-block deleted the wren/relay-reconnect-hardening branch July 23, 2026 20:15
brow pushed a commit that referenced this pull request Jul 23, 2026
…obile-releasing

* origin/main: (23 commits)
  Gate default relay auto-connect behind release flag (#2589)
  fix(desktop): fast-track relay restart reconnects (#2579)
  fix(sharing): preserve agent/team snapshot tEXt chunks through media sanitization (#2438)
  fix(acp): restrict DM turns to owner and verified siblings (#2591)
  test(desktop): live relay kill/restart reconnect gate (#2583)
  fix(relay): send 1012 restart close to all clients on graceful drain (#2575)
  fix(desktop): retry failed initial relay dials (#2564)
  Refine channel lifecycle settings (#2427)
  Fix avatar upload lifecycle edge cases (#2277)
  fix(observer): eager archive hydration on panel open + 200-frame pages (#2574)
  fix(cli): install rustls crypto provider to unbreak WSS publishes in release builds (#2590)
  feat(dev): add `just production` recipe targeting the production relay (#2572)
  chore: Omit the Model control when an optional-model harness has nothing to select (#2262)
  fix(ci): stop moving protected Sprig rolling tag (#2221)
  fix(media): sanitize animated image uploads (#2524)
  fix(desktop): populate team instructions when opening the edit team dialog (#2565)
  feat(desktop): add drag-to-reorder for community rail (#2549)
  fix(channels): strip leading hash prefixes from names (#2250)
  fix(desktop): allow skipping harness setup onboarding (#2360)
  Script cleanup
  ...
brow pushed a commit that referenced this pull request Jul 23, 2026
…obile-releasing

* origin/main: (23 commits)
  Gate default relay auto-connect behind release flag (#2589)
  fix(desktop): fast-track relay restart reconnects (#2579)
  fix(sharing): preserve agent/team snapshot tEXt chunks through media sanitization (#2438)
  fix(acp): restrict DM turns to owner and verified siblings (#2591)
  test(desktop): live relay kill/restart reconnect gate (#2583)
  fix(relay): send 1012 restart close to all clients on graceful drain (#2575)
  fix(desktop): retry failed initial relay dials (#2564)
  Refine channel lifecycle settings (#2427)
  Fix avatar upload lifecycle edge cases (#2277)
  fix(observer): eager archive hydration on panel open + 200-frame pages (#2574)
  fix(cli): install rustls crypto provider to unbreak WSS publishes in release builds (#2590)
  feat(dev): add `just production` recipe targeting the production relay (#2572)
  chore: Omit the Model control when an optional-model harness has nothing to select (#2262)
  fix(ci): stop moving protected Sprig rolling tag (#2221)
  fix(media): sanitize animated image uploads (#2524)
  fix(desktop): populate team instructions when opening the edit team dialog (#2565)
  feat(desktop): add drag-to-reorder for community rail (#2549)
  fix(channels): strip leading hash prefixes from names (#2250)
  fix(desktop): allow skipping harness setup onboarding (#2360)
  Script cleanup
  ...

Signed-off-by: npub1re830n24qhgstulznk5dxdluccspxkxxdq643lm4q3zwwwjgsuqqmcmdrm <1e4f17cd5505d105f3e29da8d337fcc6201358c6683558ff750444e73a488700@buzz.block.builderlab.xyz>
brow pushed a commit that referenced this pull request Jul 24, 2026
…r-only

* origin/main: (28 commits)
  Clarify agent harness defaults in create flow (#2601)
  chore(mobile): relax release check (#2636)
  fix: expose community icon control on open relays (#2640)
  chore(release): release Buzz Desktop version 0.4.24 (#2627)
  feat: remember per-community navigation location (#2629)
  fix(desktop): suppress Windows console flashes and reject WSL bash alias (#2587)
  fix(desktop): fix Windows PATH clobber and .cmd shim EINVAL (#2563)
  Update SECURITY.md
  chore(mobile): lighter-weight release process (#2144)
  Gate default relay auto-connect behind release flag (#2589)
  fix(desktop): fast-track relay restart reconnects (#2579)
  fix(sharing): preserve agent/team snapshot tEXt chunks through media sanitization (#2438)
  fix(acp): restrict DM turns to owner and verified siblings (#2591)
  test(desktop): live relay kill/restart reconnect gate (#2583)
  fix(relay): send 1012 restart close to all clients on graceful drain (#2575)
  fix(desktop): retry failed initial relay dials (#2564)
  Refine channel lifecycle settings (#2427)
  Fix avatar upload lifecycle edge cases (#2277)
  fix(observer): eager archive hydration on panel open + 200-frame pages (#2574)
  fix(cli): install rustls crypto provider to unbreak WSS publishes in release builds (#2590)
  ...

Co-authored-by: npub102wg7q285p64ch2fjvstmf2ntn2sz3c4u5hmwatalc76mhsuauysftjtfj <7a9c8f0147a0755c5d499320bda5535cd5014715e52fb7757dfe3dadde1cef09@buzz.block.builderlab.xyz>
Signed-off-by: npub102wg7q285p64ch2fjvstmf2ntn2sz3c4u5hmwatalc76mhsuauysftjtfj <7a9c8f0147a0755c5d499320bda5535cd5014715e52fb7757dfe3dadde1cef09@buzz.block.builderlab.xyz>

# Conflicts:
#	desktop/src-tauri/build.rs
#	desktop/src/features/agents/ui/AgentDefinitionDialog.tsx
#	desktop/src/testing/e2eBridge.ts
#	desktop/tests/helpers/bridge.ts
100yenadmin pushed a commit to electricsheephq/evaOS-Hive that referenced this pull request Jul 24, 2026
Signed-off-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@buzz.block.builderlab.xyz>
Co-authored-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@buzz.block.builderlab.xyz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant