Skip to content

fix(sse): backport early stream finalizer registration to main - #18185

Draft
diegosouzapw wants to merge 1 commit into
mainfrom
fix/qg-main-stream-finalizers-20261026
Draft

diegosouzapw wants to merge 1 commit into
mainfrom
fix/qg-main-stream-finalizers-20261026

Conversation

@diegosouzapw

Copy link
Copy Markdown
Collaborator

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.

⚠️ base-red inherited: #17267. Other main recovery work remains separate in #18172 and the documentation wave. Do not interpret this draft or focused tests as final merge admission.

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

No deployments
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.

1 participant