Skip to content

merge: sync upstream v3.5.50 into fork - #126

Merged
StartupBros merged 7 commits into
mainfrom
sync-upstream-v3.5.50
Aug 8, 2026
Merged

StartupBros merged 7 commits into
mainfrom
sync-upstream-v3.5.50

Conversation

@StartupBros

Copy link
Copy Markdown
Collaborator

Summary

Small sync over #124 (v3.5.48): 6 upstream commits, 7 files (+199/−8), one conflict.

New standing fork divergence — teeStream cancel semantics

Upstream 50ec29b replaced teeStream's reader.cancel(reason) with a drain-to-done loop (Bun cancel-leak fix, oven-sh/bun#35093). The fork keeps cancel propagation: our teeStream wraps the semantic-liveness/terminal-recovery stream chain (not the raw fetch body), and propagation is load-bearing — it records streamTerminalState="client_cancelled" via the inner stream's cancel handler (contract documented at response-handler.ts's onCancel), and it tears down stalled upstreams during stall-recovery, where a drain bounded only by the fetch abort signal would hang forever on a live client. Upstream's teardown-must-not-throw intent is adopted (cancel rejection swallowed). Their new drain-assertion test is adapted to the divergence; the fork's stricter lifecycle tests pass unchanged.

Also inherited

Release-workflow empty-match grep guard, codex provider tweak, version 3.5.50.

Verification

build ✅ · lint (7 pre-existing warnings) ✅ · typecheck ✅ · format ✅ · isolated per-file sweep: 402 files, 1 failure = the documented incremental-vacuum-adaptive environmental flake.

tombii and others added 7 commits August 8, 2026 22:25
…ing reader.cancel()

Bun's reader.cancel() is a no-op on fetch response bodies (oven-sh/bun#35093),
so cancelling teeStream's output on client disconnect never released the
upstream response's native buffer — causing multi-GB RSS growth over time
(#382). Drain the reader to completion instead, matching the pattern already
used in discard-body-cancel.ts.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Addresses PR review nits: releaseLock() after the drain loop now matches
the sibling drainBody() pattern in discard-body-cancel.ts, and a comment
notes the drain's read() calls are bounded by request-handler.ts's
effectiveSignal aborting the underlying fetch() on the same disconnect.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
fix(proxy): stop leaking native buffers on client disconnect (#382)
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…or detection

Both PR-number extraction pipelines ended in a bare grep -oE with no
downstream neutralizer, so a release range with only one merge style
(GitHub-UI vs manual --no-ff) made the other pipeline exit 1 and, under
set -e, abort the whole Generate Changelog step before any output was
written.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Small delta over the v3.5.48 sync: 6 commits, 7 files (+199/−8). One
conflict (stream-tee.ts cancel handler).

Reconciliation — NEW STANDING FORK DIVERGENCE:
- Upstream 50ec29b/a29c5722fb replaced teeStream's cancel-propagation
  with a drain-to-done loop (Bun cancel-leak fix, oven-sh/bun#35093).
  The fork KEEPS reader.cancel(reason) propagation: here teeStream wraps
  the semantic-liveness/terminal-recovery stream chain (not the raw
  fetch body), and propagation is load-bearing — it records
  streamTerminalState="client_cancelled" via the inner stream's cancel
  handler, and it tears down stalled upstreams during stall-recovery,
  where upstream's drain (bounded only by the fetch abort signal) would
  hang forever on a live client. Upstream's teardown-must-not-throw
  intent IS adopted (cancel rejection swallowed). Upstream's new
  stream-tee.test.ts drain assertions adapted to the divergence;
  fork's own lifecycle tests unchanged and green.

Also inherited cleanly: release-workflow empty-match grep guard
(448fa65), codex provider tweak, version 3.5.50.
@StartupBros
StartupBros merged commit 1fd8d04 into main Aug 8, 2026
2 checks passed
@StartupBros
StartupBros deleted the sync-upstream-v3.5.50 branch August 8, 2026 22:04
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