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