Repository navigation
fix(sse): honor parked stream state in readiness guard - #14623
Merged
diegosouzapw merged 1 commit intoSep 24, 2026
Merged
diegosouzapw merged 1 commit into
diegosouzapw merged 1 commit into
Conversation
maxmad64bis
force-pushed
the
fix/parked-stream-readiness
branch
from
September 23, 2026 10:14
ced18c4 to
307f925
Compare
maxmad64bis
marked this pull request as ready for review
September 23, 2026 11:05
maxmad64bis
force-pushed
the
fix/parked-stream-readiness
branch
from
September 23, 2026 22:28
307f925 to
c3e75ae
Compare
5 tasks done
Collaborator
|
Clean fix closing a real gap left by #13924's park-and-replay. Specifically checked that the |
diegosouzapw
merged commit Sep 24, 2026
5138f28
into
cheaper-inference:release/v3.8.51
9 of 16 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The park-and-replay path parks a request for up to 120 s with heartbeat pings, but the stream-readiness guard still cuts the parked response at its stall deadline, surfacing a 502 before the replayed leg arrives. This change marks the synthetic parked response as a transient parked stream and teaches the readiness guard to honor that state, so a parked request resolves directly instead of failing first and retrying.
Related Issues
Related to #13924
Validation
npm run lintTests Added Or Updated
tests/unit/parked-stream-readiness.test.ts(new, 6 cases: marked park with pings resolves instead of 502 RED then GREEN; unmarked pings still 502; marked stream past the ceiling still 504; marker survives a header rebuild and is stripped from the ready response; JSON fallback converts to valid frames; non-convertible 429 fallback surfaces one error data frame with noevent:line RED then GREEN).tests/unit/stream-readiness.test.ts(21/21),tests/unit/stream-readiness-policy.test.ts(23/23),tests/unit/opencode-429-park-resume.test.ts(8/8).Coverage Notes
data:error frame (built with the shared error helpers) instead of anevent: upstream-statusline plus raw text, so the parked stream stays a valid SSE frame sequence.Reviewer Notes
transientsuspend the stall deadline, never past the ceiling; outside the park the guard behaves byte-identically (fail-fast fix(streaming): fail fast when an upstream stream produces only lifecycle/heartbeat events, never real content #12741 preserved).API Route Typecheckreports 4 diagnostics inopen-sse/executors/auggie.ts(TS2769/TS18047) andsrc/app/api/v1/combos/projectCombo.ts(TS2459/TS2724); both files are unchanged since the merge-base and the same 4 lines fail on same-base PRs test(sse): lock per-key ceiling 429 out of neighbor cooldown scope #14581/fix(sse): serve the stored 429 instead of re-sending refused requests #14588, so inherited via 🔴 Release branch not green: release/v3.8.51 #14547 and non-blocking. Localcheck:open-sse-typecheckshows only the sameauggie.tserrors with zero on touched files.Recensement (upstream positions)