Repository navigation
fix(sse): backport early stream finalizer registration to main - #18185
Draft
diegosouzapw wants to merge 1 commit into
Draft
diegosouzapw wants to merge 1 commit into
diegosouzapw wants to merge 1 commit into
Conversation
Backport #17226 and use a registered Perplexity model in the delayed persistence fixture. Co-authored-by: Paco Cartones <253313177+pacocartones@users.noreply.github.com>
This branch has not been deployed
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.
When a Perplexity stream fails before runStreamingTail returns, main can miss the failure callbacks because its controller reads finalizers that have not been registered yet. This backports #17226: both finalizers are handed back synchronously before the streaming pipeline starts. The delayed persistence fixture also uses a registered model distinct from the other cases.
Original fix by Paco Cartones (@pacocartones), preserved in the commit attribution. This is a companion repair for main, whose production code still lacked the release fix.
Validation: the three ordering guards reproduced RED on main; 44 affected tests passed after the change, including the real isolated Perplexity stream pipeline. Core TypeScript, focused ESLint, Husky and the test-masking check passed. No tests were deleted or disabled. This is scoped evidence, not full main acceptance; clean-install/security evidence is tracked separately in #18174.