Repository navigation
fix(sse): optionally retry once when a stream stalls before usable output - #14669
Merged
diegosouzapw merged 2 commits intoSep 24, 2026
Conversation
maxmad64bis
force-pushed
the
fix/empty-body-server-rotation
branch
2 times, most recently
from
September 23, 2026 16:58
2a6802d to
3e55858
Compare
maxmad64bis
marked this pull request as ready for review
September 23, 2026 16:59
maxmad64bis
force-pushed
the
fix/empty-body-server-rotation
branch
from
September 23, 2026 22:28
3e55858 to
690fb82
Compare
5 tasks done
Collaborator
|
Solid extraction and a genuinely useful opt-in recovery path. Ran the new |
3 of 5 tasks
…tput Streaming chat requests whose first upstream body stalls before usable output now get one bounded second attempt through the same routing path when STREAM_READINESS_STALL_RETRY is on (default off).
maxmad64bis
force-pushed
the
fix/empty-body-server-rotation
branch
from
September 24, 2026 10:43
690fb82 to
1c4096d
Compare
Contributor
Author
|
Rebased to a single commit on the current tip and mergeable. Ready to land first as suggested, unblocking #14681. |
# Conflicts: # tests/unit/server-owned-tool-loop-flag.test.ts
diegosouzapw
merged commit Sep 24, 2026
3bfe5fe
into
cheaper-inference:release/v3.8.51
4 of 7 checks passed
5 tasks done
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
No default change: opt-in via STREAM_READINESS_STALL_RETRY (default off). When enabled and the first upstream body stalls before producing a usable event, the request runs once more through the same routing path with the same readiness budget and no account penalty, and only fails if the second attempt also stays empty. With the flag off, a stalled first body fails exactly as before.
Related Issues
Validation
tests/unit/stream-readiness-fallback.test.ts(9 tests),tests/unit/feature-flags-settings.test.ts(62 pass),tests/unit/server-owned-tool-loop-flag.test.ts(8 pass),tests/unit/feature-flags-doc-sync-static.test.ts(4 pass)npm run lint— ESLint on the touched files is cleanrelease/v3.8.51(rev-list HEAD..upstream/release/v3.8.51= 0); focused checks rerun afterwardTests Added Or Updated
tests/unit/stream-readiness-fallback.test.ts(9 tests: flag off issues no second request; readiness timeout then retry success, early-EOF same, double failure keeps second diagnostic, aborted client never retries, single-request bound, neighbor empty-turn untouched plus cooldown spy, silent-stream timeout; RED on the guard revert, GREEN with the guard)Coverage Notes
open-sse/handlers/chatCore/streamReadinessFallback.tscovered by the new test, including the flag-off guard;chatCore.tswiring (import + single call + reassignments) covered via the same test.src/shared/constants/featureFlagDefinitions.tsandsrc/shared/utils/featureFlags.tscovered by the flag-count suites (registry at 78, fail-closed helper).Reviewer Notes
chatCore.tsgrows 6402 → 6426 (frozen, +24 wiring lines, own growth; rebaseline entry_rebaseline_2026_09_23_14669_empty_body_server_rotationincluded).API Route Typecheckerrors (auggie.ts,projectCombo.ts, emptydiff $mb, non-PR files);check-env-doc-synclive-data case citesDEEP_HEALTH_CHECK_ENABLED, present on the untouched base; fullnpm run lintred on the base (🔴 Release branch not green: release/v3.8.51 #14547).