Skip to content

fix(session): classify ReadableStream locked as retryable and add stream trace types#16

Merged
YumaKakuya merged 1 commit into
hatch-gen1from
feat/stream-continuation-boundary-wave1
May 25, 2026
Merged

fix(session): classify ReadableStream locked as retryable and add stream trace types#16
YumaKakuya merged 1 commit into
hatch-gen1from
feat/stream-continuation-boundary-wave1

Conversation

@YumaKakuya
Copy link
Copy Markdown

Summary — WAVE 1 of Continuation Boundary fix

  • Extend OPENAI_TRANSIENT_PATTERNS with ReadableStream is locked / Invalid state / ERR_INVALID_STATE patterns
  • Check APICallError cause chain in isOpenAiGatewayTransient so stream-level TypeError buried in cause is classified as retryable
  • Add fromError path for raw Error/TypeError with ReadableStream is locked → retryable APIError 'Provider stream connection lost'
  • Add StreamTrace type (session/stream-log.ts) for structured stream lifecycle observability — types only, integration planned in WAVE 2

Tests +43 pass, 0 fail — typecheck PASS — build PASS

Next: WAVE 2 (core stream boundary redesign) — brief at hatch-v3/briefs/BRIEF_CONTINUATION_BOUNDARY_WAVE2-3.md

…eam trace types

- Extend OPENAI_TRANSIENT_PATTERNS with ReadableStream locked / Invalid state
  / ERR_INVALID_STATE patterns
- Check APICallError cause chain in isOpenAiGatewayTransient so
  stream-level TypeErrors buried in cause are classified as retryable
- Add fromError path for raw Error/TypeError with ReadableStream locked
  → retryable APIError 'Provider stream connection lost'
- Add StreamTrace type (session/stream-log.ts) for structured
  stream lifecycle observability — types only, integration in next WAVE
- Tests: +3 (error classification ×2, fromError conversion ×1)
@github-actions
Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions
Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Copy Markdown

The following comment was made by an LLM, it may be inaccurate:

@YumaKakuya YumaKakuya merged commit c5493fd into hatch-gen1 May 25, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant