Skip to content

fix(sse): scan Devin and PromptQL tool markup in linear time (late, carries #15099) - #15120

Merged
diegosouzapw merged 1 commit into
release/v3.8.51from
fix/release-v3.8.51-late-15099
Sep 29, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.51from
fix/release-v3.8.51-late-15099

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

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.ts hangs to the 400 s timeout on the tip and passes 6/6 in about a second with the fix; executor-promptql.test.ts 30/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

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)
@diegosouzapw
diegosouzapw merged commit cf95045 into release/v3.8.51 Sep 29, 2026
4 of 7 checks passed
@diegosouzapw
diegosouzapw deleted the fix/release-v3.8.51-late-15099 branch September 29, 2026 16:40
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.
@diegosouzapw diegosouzapw mentioned this pull request Sep 29, 2026
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.

2 participants