Skip to content

fix: cancel disconnected upstream streams - #60

Merged
orangeboyChen merged 1 commit into
mainfrom
codex/fix-memory-leak
Jul 28, 2026
Merged

fix: cancel disconnected upstream streams#60
orangeboyChen merged 1 commit into
mainfrom
codex/fix-memory-leak

Conversation

@orangeboyChen

Copy link
Copy Markdown
Owner

Summary

  • cancel and unlock upstream readers when streaming clients disconnect
  • release readers after normal stream completion
  • cover Responses passthrough, Responses adapter, and Anthropic adapter cancellation

Validation

  • bun run test -- tests/server/units.test.ts tests/server/anthropic.test.ts
  • bun run test:coverage
  • bun run test:ci
  • bun run lint
  • bun run format:check
  • bun run typecheck
  • bun run build

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.06%. Comparing base (b624efa) to head (57b80c6).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #60      +/-   ##
==========================================
+ Coverage   92.03%   92.06%   +0.03%     
==========================================
  Files          20       20              
  Lines        8131     8251     +120     
  Branches     1624     1644      +20     
==========================================
+ Hits         7483     7596     +113     
- Misses        635      642       +7     
  Partials       13       13              
Flag Coverage Δ
unittests 92.06% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@orangeboyChen
orangeboyChen merged commit b555d9d into main Jul 28, 2026
5 checks passed
@orangeboyChen
orangeboyChen deleted the codex/fix-memory-leak branch July 28, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants