Problem
lib/drivers/driver.ts declares two pieces of state that no code path in the file ever writes:
/** Save messages subscription to ensure only one created */
messages: ISubscription | undefined
joinedIds: string[] = []
messages is never assigned, so it is permanently undefined. Its comment describes a de-duplication guarantee ("ensure only one created") that the class does not implement — single-subscription-per-stream is handled on the Socket, keyed off the stream name. joinedIds is initialised to [] and never pushed to or read.
Both are public, so they are part of the driver's surface and a consumer could reasonably believe they mean something.
Steps to reproduce
- Grep
lib/drivers/driver.ts for messages and joinedIds
- Observe the only other hit is the unrelated
'stream-room-messages' string literal
Proposed fix
Delete both fields and the stale comment. If the de-duplication promise in that comment is meant to hold at the driver level, that is a separate change with its own test — but the field as written does not provide it.
Problem
lib/drivers/driver.tsdeclares two pieces of state that no code path in the file ever writes:messagesis never assigned, so it is permanentlyundefined. Its comment describes a de-duplication guarantee ("ensure only one created") that the class does not implement — single-subscription-per-stream is handled on the Socket, keyed off the stream name.joinedIdsis initialised to[]and never pushed to or read.Both are public, so they are part of the driver's surface and a consumer could reasonably believe they mean something.
Steps to reproduce
lib/drivers/driver.tsformessagesandjoinedIds'stream-room-messages'string literalProposed fix
Delete both fields and the stale comment. If the de-duplication promise in that comment is meant to hold at the driver level, that is a separate change with its own test — but the field as written does not provide it.