Skip to main content

Decision records

TL;DR One row per architecture decision, with a one-line summary and the issues it relates to. The Issues column resolves the #40 to #45 coordinates that appear in source comments but link nowhere else in the repo.

Each file states one decision and keeps its number for life; it is never renumbered, and a reversed decision changes its Status to Superseded by 00NN rather than moving. See ../CONTRIBUTING-docs.md for how these are written.

#DecisionStatusIssues
0000Fill only what real socket.io observably does; never inventAccepted#64
0001The public class is Server, not MockServerAccepted#64
0002new Server(url) is activation; there is no start()Accepted#64
0003The Server url argument is requiredAccepted#64
0004Connection completes one tick later so connect handlers register in timeAccepted#40, #65
0005A missing server fires connect_error at once, no retry, plus console.errorAccepted#65
0006The handshake carries only fields a mock has a source forAccepted#65
0007noUncheckedIndexedAccess guards the delivery-layer map lookupsAccepted#66
0008The adapter registration API lands before v1.0.0Accepted#66
0009smocket does not mock raw WebSocket; that is MSW's laneAccepted#66
0010One defer primitive keeps per-socket delivery FIFOAccepted#40, #41, #67
0011Socket ids match socket.io's shape, not its sourceAccepted#67
0012Timed client callbacks settle on disconnect; retained callbacks stay connection-ownedAccepted#45, #67, #359, #360
0013Reconnecting yields a fresh socket and id, with no old roomsAccepted#45, #67
0014io.on('connection') fires the server side before the client connectAccepted#88, #350
0015A review bot reads a diff against intent; CI keeps the mechanical checksAccepted#101
0016volatile is accepted and drops only in the pre-connect windowAccepted#110
0017off follows the underlying emitter: Node on the server, component-emitter on the clientAccepted#103
0018Per-socket delivery delay is an adapter scheduling hook, keyed by sid, preserving FIFOAccepted#78
0019A version number promises fidelity, not the current resultAccepted#115
0020close() tears down sockets and unregisters only the current serverAccepted#193, #359
0021Event maps and socket data survive the server substitution seamAccepted#171
0022Root Socket names the server type; smocket-client owns the client typeAccepted#178, #235
0023smocket-client re-exports one shared client lookup without owning connection stateAccepted#235
0024Assemble an independent consumer from the canonical chat applicationSuperseded by 0039#208, #451
0025Built-in Adapter observation stays on the live rooms mapAccepted#238
0026Non-binary payloads cross the default parser's JSON snapshot boundaryAccepted#237, #250
0027One workflow drives three isolated application case-study targetsSuperseded by 0039#218, #451
0028disconnect(true) closes the shared client Manager groupAccepted#236, #254
0029Parent broadcast conformance stops before narrowingAccepted#269
0030The public direct connection API rejects observers when its server closesAccepted#277, #350
0031Adapters register before admission and may observe whole-socket removalAccepted#278
0032Trace final broadcast routing without retaining payloadsAccepted#262
0033Socket state follows lifecycle while volatile delivery uses private client readinessAccepted#275
0034Packet middleware preserves entry order and completes independentlyAccepted#268
0035Inherited emitter behavior follows each receiverAccepted#274
0036Drop final broadcast recipients by sidAccepted#263
0037Keep local broadcast management canonicalAccepted#265
0038SharedWorker uses explicit host and client subpaths with a narrow facadeAccepted#376, #377, #379
0039Retire chat-room evaluation paths after maintained replacements existAccepted#451