fix(session): stop reporting user-requested aborts as streaming error telemetry

Merged
AL
16h ago
+70-10

Summary

Automated fix proposed by the Altimate software factory; a maintainer reviews every change.

Changes

2 files changed, 70 lines added, 10 lines removed.

  • packages/opencode/src/session/processor.ts
  • packages/opencode/test/session/processor-abort-telemetry.test.ts

New tests

  • packages/opencode/test/session/processor-abort-telemetry.test.ts

Independent review: accepted, confidence 0.79


Summary by cubic

Stops reporting requested session cancels (Stop/Esc, dispose, harness challenge abort) as streaming error telemetry in the session processor.

Previously any streaming error, including MessageAbortedError raised after the session's own abort signal fired, was tracked as type: "error" with context: "streaming". Since those aborts are already recorded as the session's "aborted" outcome, they're now excluded. Unrequested aborts and genuine streaming failures are still reported.

  • Adds shouldTrackStreamingError to gate tracking on the abort signal and error type.
  • Adds tests covering requested aborts, unrequested aborts, and genuine streaming failures.