Skip to content

Bound and terminalize unresolved Realtime input transcription state #486

Description

@andimarafioti

Context

The per-item accumulator required by #474 is naturally released when a normal transcription completion arrives. Exceptional paths can still leave unresolved state behind: dropped terminals, direct-audio turns, handler failures, abandoned speculative revisions, or long-lived overlapping turns.

PR #476 experimented with completed tombstones, a 128-prefix cap, suppressing partials after eviction, and direct-audio cleanup. Those policies are broader than #474's wire-semantics fix and deserve an explicit lifecycle design.

Scope

  • Enumerate every input-item terminal and abandonment path for STT and direct-audio pipelines.
  • Define cleanup for dropped, failed, superseded, and disconnected turns.
  • Decide whether completed tombstones are needed to reject duplicate late events.
  • Bound unresolved transcript prefixes and routing records without silently corrupting incremental streams.
  • Decide whether eviction should suppress later partials, emit a failure/abandonment signal, or use another recovery strategy.
  • Add stress and late-event regressions.

Acceptance criteria

  • Per-connection input-transcription state remains bounded on every pipeline path.
  • Normal late authoritative completions retain correct item_id and audio duration.
  • Eviction or abandonment cannot cause a cumulative hypothesis to be replayed as a wire delta.
  • Direct-audio operation does not retain transcription-only state.
  • Duplicate or late events have documented deterministic behavior.

Non-goals

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