Fix watching problem collector replay growth - #329733
Open
Dmitriy Vasyura (dmitrivMS) wants to merge 2 commits into
Open
Fix watching problem collector replay growth#329733Dmitriy Vasyura (dmitrivMS) wants to merge 2 commits into
Dmitriy Vasyura (dmitrivMS) wants to merge 2 commits into
Conversation
Prevent model-removal diagnostic replays from appending retained task output back into the same buffer. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Dmitriy Vasyura (dmitrivMS)
August 8, 2026 01:34
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Prevents watching problem collector replays from exponentially growing retained task output.
Changes:
- Suppresses line retention during diagnostic replay.
- Adds regression coverage verifying linear replay processing.
Show a summary per file
| File | Description |
|---|---|
problemCollectors.ts |
Avoids re-recording replayed lines. |
problemCollectors.test.ts |
Tests repeated model-removal replays. |
Review details
Tip
Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
Dmitriy Vasyura (dmitrivMS)
enabled auto-merge (squash)
August 8, 2026 07:02
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
Fix unbounded retained-output growth in the watching task problem collector when diagnostics are replayed after a text model closes.
The renderer log repeatedly reported:
The model-removal recovery path copied the retained task output and passed each line back through
processLineInternal. That method appended every replayed line to the retained buffer again, so each replay doubled the buffer and the amount of subsequent work untilArray.pushreached the maximum array length.This change processes replayed lines without recording them again. Normal task output, including watching begin and end lines, continues to be retained as before.
Testing
[1, 2, 3]) instead of doubling ([1, 2, 4]).npm run transpile-clientscripts\test.bat --runGlob "**/workbench/contrib/tasks/test/common/*.test.js"— 86 passing, 5 pendingnpm run eslint -- src/vs/workbench/contrib/tasks/common/problemCollectors.ts src/vs/workbench/contrib/tasks/test/common/problemCollectors.test.tsgit diff --checkFixes #295523