Skip to content

Make desktop connection recovery and session cleanup explicit - #30

Merged
viralcodex merged 1 commit into
mainfrom
refactor/desktop-connection-lifecycle
Nov 5, 2026
Merged

viralcodex merged 1 commit into
mainfrom
refactor/desktop-connection-lifecycle

Conversation

@viralcodex

Copy link
Copy Markdown
Owner

Changes

  • Model connection handshake, initial state publication, readiness, and closure explicitly.
  • Reject stale readiness completions and prevent reconnection after disposal.
  • Reconnect failed or ended session-event subscriptions with cancellable bounded backoff.
  • Keep failed session cleanup owned and retryable without blocking other sessions.
  • Split the old all-in-one main test, consolidate overlapping scenarios, and enforce production complexity below 10.
  • Rebuild shipped bundles.

Verification

  • Exact PR tree: release:check passes on Node 24.13.0, including installed-package loading.
  • 296 tests pass, one existing Bun-only skip.
  • Lifecycle suites pass three consecutive runs.
  • One delayed local run hit a test timeout; the isolated test and complete release-check rerun passed without changing its timeout.

Sequence

3 of 3. Builds on merged #28 and #29. Release preparation follows after this PR passes CI and merges.

@viralcodex

Copy link
Copy Markdown
Owner Author

Reviewed handshake/publication failure, stale readiness completion, watcher termination/reconnection, retry ownership, disposal cancellation, and isolation between concurrent session cleanups. Exact-tree release checks pass locally and in Linux CI: https://github.com/viralcodex/opencode-demul/actions/runs/42032203229. All 296 tests pass with one existing skip; the four lifecycle suites also pass three repeated runs. Old overlapping tests were consolidated rather than simply accumulating new cases.

@viralcodex
viralcodex merged commit 88b74df into main Nov 5, 2026
10 of 11 checks passed
@viralcodex viralcodex mentioned this pull request Nov 5, 2026
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