Skip to content

Event bus: an event that fails to decode reconnects the stream and loses what follows #526

Closed

Description

@Blind-Striker

When a known event's payload doesn't match its schema, the bus treats it as a protocol failure and
reconnects after 1 s with no replay. Events published inside that gap are lost.

  • Observed with 0.9.0-preview.13 against an opencode 2.1.4 server, where the compaction events
    lack the recent member the SDK requires: the bus surfaced neither compaction event, reconnected
    after each, and the turn's session.execution.succeeded fell into the second gap. A consumer
    waiting for the turn to end hung until its deadline.
  • Today this bites on version skew (a server newer than the pin). It is still a resilience
    question: should one bad frame cost a reconnect and its neighbours?

Proposal: check what upstream's first-party client does with an event it cannot decode. Then
decide between today's reconnect and surfacing the frame (for example as an unknown event)
without dropping the connection. A change that departs from upstream's behaviour is the
maintainer's decision.

Part of #483.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions