Skip to content

docs: define shared manager disconnect scope - #255

Merged
electrohyun merged 1 commit into
mainfrom
docs/define-disconnect-close-scope
Aug 12, 2026
Merged

electrohyun merged 1 commit into
mainfrom
docs/define-disconnect-close-scope

Conversation

@electrohyun

Copy link
Copy Markdown
Owner

Summary

Reference behavior

Fresh Socket.IO and socket.io-client 4.7.5 and 4.8.3 installations produced the same socket.disconnect(close?) behavior.

With false, the addressed server socket fired disconnecting and disconnect with server namespace disconnect, while another namespace sharing its client Manager stayed connected. With true, every namespace socket on that Manager disconnected. Each server-side lifecycle pair ran synchronously before disconnect(true) returned, and the corresponding clients subsequently observed io server disconnect.

The affected sockets followed namespace connection order. Connecting /admin before / reversed both the server and client cross-namespace order, while preserving disconnecting before disconnect for each server socket.

Manager identity also determines isolation. Calls for distinct namespaces on one origin reused the cached Manager. Repeating a namespace, passing forceNew: true, or passing multiplex: false created an independent Manager, and those independent sockets remained connected when the original Manager was closed.

Decision

ADR 0028 selects a host-neutral logical Manager as the boundary for connection-wide namespace teardown. Smocket will make disconnect(false) close only the current namespace and make disconnect(true) close every connected namespace socket in the same Manager, without closing the server or affecting independent Managers.

This models observable logic-layer state rather than a transport. The affected sockets still use their ordinary acknowledgement, id, room, roster, and manual-reconnect lifecycle. Engine.IO transport, fallback, heartbeat, and automatic network reconnection remain outside the project scope.

Ignoring close was rejected because the affected socket set, event reasons, and event order remain observable without a real network. Using the Smocket Server as the group was also rejected because one server may host several independent client Managers; that approach would close unrelated clients.

Follow-up and release boundary

Issue #254 owns the implementation. It covers Manager lookup and identity, repeated-namespace and explicit opt-out groups, disconnect(false) and disconnect(true), lifecycle reasons and ordering, independent-manager isolation, existing acknowledgement and membership cleanup, manual reconnect, the fluent return tracked by #233, conformance generation, and the browser gate.

Until #254 lands, docs/differences.md records the ignored true flag as a known gap rather than an intentional divergence. The decision index and v1 roadmap now link ADR 0028 and its implementation dependency. ADR 0019 classifies the eventual newly covered Socket.IO surface as minor after 1.0 and patch before 1.0.

Related issue

Closes #236

Checklist

  • Tests added or updated (not applicable: documentation-only decision)
  • Behavior verified against real socket.io

@github-actions github-actions Bot added documentation Improvements or additions to documentation 📏 m Pull request changes 50–199 lines labels Aug 12, 2026
@coderabbitai

coderabbitai Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@electrohyun, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 40 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7514c888-fd2e-4b35-94e1-1079f9789fef

📥 Commits

Reviewing files that changed from the base of the PR and between f614c6a and 9dcd306.

📒 Files selected for processing (4)
  • docs/decisions/0028-disconnect-true-closes-the-shared-manager-group.md
  • docs/decisions/README.md
  • docs/differences.md
  • docs/roadmap.md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@electrohyun
electrohyun force-pushed the docs/define-disconnect-close-scope branch from 0b77350 to 9dcd306 Compare August 12, 2026 08:42
@electrohyun
electrohyun merged commit 460adbe into main Aug 12, 2026
14 checks passed
@electrohyun
electrohyun deleted the docs/define-disconnect-close-scope branch August 12, 2026 08:44
@electrohyun electrohyun self-assigned this Aug 12, 2026
@github-project-automation github-project-automation Bot moved this to Done in smocket Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation 📏 m Pull request changes 50–199 lines

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

feat: decide whether disconnect(true) closes every namespace

1 participant