fix(sse): scan Devin and PromptQL tool markup in linear time (late, carries #15099) - #15120
Merged
Merged
Conversation
The Devin tool-request and summary-envelope parsers and the PromptQL final_response extractor matched model output with patterns of the shape <tag>\s*([\s\S]*?)\s*</tag>, whose overlapping whitespace classes are cubic on a long run of spaces after an unclosed tag (2,000 spaces cost about 3 s, 4,000 about 22 s), blocking the event loop for every other request. Find the blocks with findTagBlocks and anchored prefix/suffix checks instead; the result for well-formed input is unchanged. Signed-off-by: Minxi Hou <houminxi@gmail.com> (cherry picked from commit 2bbb5c6)
6 tasks done
diegosouzapw
added a commit
that referenced
this pull request
Sep 29, 2026
…d release date - Every one of the 1972 cycle commits is covered by a bullet (reconcile-changelog vs origin/release/v3.8.50); fragments folded under [3.8.51] with the PR link and the author of the commit that added them. - Re-land credit: #15019/#15020/#15119/#15120/#15121 credit @HouMinXi; #12383 credits its author @kareem-jalal alongside the original credit. - Contributors hall regenerated (301 external contributors). - [3.8.51] dated 2026-09-29 in the root CHANGELOG and the 66 i18n mirrors.
Merged
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.
Carries #15099 into release/v3.8.51. The original PR was retargeted to release/v3.8.52 and squash-landed there; this cherry-picks (
-x, authorship preserved) only its own commit. Sibling of #15066.Evidence on tip 4796624:
devin-promptql-tag-scan-linear.test.tshangs to the 400 s timeout on the tip and passes 6/6 in about a second with the fix;executor-promptql.test.ts30/30 plus the Devin neighbor suites green; check:open-sse-typecheck, eslint and check-file-size clean.Co-authored-by: Minxi Hou houminxi@gmail.com