Skip to content

CLI Bus.unsubscribe has same splice(-1) bug as desktop app #492

@deepak0x

Description

@deepak0x

Description

Same bug as the desktop app's bus — the unsubscribe closure uses splice(indexOf(handler), 1) without guarding against indexOf returning -1. A double-unsubscribe removes the wrong handler.

Steps to reproduce

  1. Subscribe two handlers to the same runId via CLI bus
  2. Call the first handler's unsubscribe twice
  3. Second handler gets removed

Expected behavior

Double-unsubscribe should be a no-op.

Actual behavior

splice(-1, 1) removes the last element — the wrong handler.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions