You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Preserve the buffered total deadline across reset preflight #8343
For an opted-in canonical buffered Responses request, pre-head reset selection can wait up to 15 seconds before the buffered collector starts its 15-minute total deadline. A long but active upstream stream can therefore outlive the intended total ceiling by the selection time.
Keep the upstream active with lifecycle prelude activity while selection waits near its 15-second bound.
Continue producing activity until the buffered collector reaches its total deadline.
The deadline is measured from collector start rather than the start of selection. Carry an absolute total deadline across both phases and add a deterministic regression.
This is a source-traced finding; a timed end-to-end reproduction has not yet been run.
Status (sweep lane): still present at #8292 head cfe670c, and not reproducible on dev because the reset-selection path exists only in #8292.
In src/server/responses/passthrough-delivery.ts (~L973 on that head), the canonical buffered branch calls bufferedResponsesReadOptions(stallTimeoutMs) after the upstream response has been selected. startedAt defaults to Date.now() (buffered-sse-json.ts:75), so the 15-minute total deadline starts at collector start instead of at the start of reset selection. The fix is to capture an absolute deadlineAt (or startedAt) before selection begins and pass it into bufferedResponsesReadOptions / read.deadlineAt. A deterministic regression would hold selection near its 15 s bound with a fake clock and assert the collector times out at selectionStart + total.
This is blocked on #8292 landing (or that lane folding it in); the sweep lane is not pushing to #8292's branch.
Activity
lidge-jun commentedon Nov 9, 2026
Status (sweep lane): still present at #8292 head cfe670c, and not reproducible on
devbecause the reset-selection path exists only in #8292.In
src/server/responses/passthrough-delivery.ts(~L973 on that head), the canonical buffered branch callsbufferedResponsesReadOptions(stallTimeoutMs)after the upstream response has been selected.startedAtdefaults toDate.now()(buffered-sse-json.ts:75), so the 15-minute total deadline starts at collector start instead of at the start of reset selection. The fix is to capture an absolutedeadlineAt(orstartedAt) before selection begins and pass it intobufferedResponsesReadOptions/read.deadlineAt. A deterministic regression would hold selection near its 15 s bound with a fake clock and assert the collector times out atselectionStart + total.This is blocked on #8292 landing (or that lane folding it in); the sweep lane is not pushing to #8292's branch.
fix(responses): count reset selection against the buffered turn ceili…