Skip to content

refactor: delete the unassigned messages and joinedIds fields on Driver #379

Description

@diegolmello

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions