files: cover buffered stream write lifecycle edge cases - #337043
Merged
Christof Marti (chrmarti) merged 1 commit intoSep 21, 2026
Merged
Christof Marti (chrmarti) merged 1 commit into
Christof Marti (chrmarti) merged 1 commit into
Conversation
Add regression coverage for buffered chunk serialization, partial writes, producer backpressure, peeked prefixes, empty streams, and queued writes following provider or stream failures. Follow up on #337018 without changing production code. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Christof Marti (chrmarti)
September 21, 2026 14:24
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The tests accurately cover the intended lifecycle scenarios without production-code changes or unresolved issues.
Review effort: Balanced
Findings: None
What changed in this PR
Adds deterministic regression coverage for buffered file-write lifecycle and ordering edge cases.
Changes:
- Tests serialization, partial writes, backpressure, and peeked-prefix ordering.
- Tests queue recovery after write/stream failures.
- Verifies empty streams close without provider writes.
| File | Description |
|---|---|
src/vs/platform/files/test/browser/fileService.test.ts |
Adds six buffered stream-write lifecycle tests and an in-memory buffered provider helper. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Christof Marti (chrmarti)
marked this pull request as ready for review
September 21, 2026 15:28
Christof Marti (chrmarti)
enabled auto-merge (squash)
September 21, 2026 15:28
Henning Dieterichs (hediet)
approved these changes
Sep 21, 2026
Christof Marti (chrmarti)
deleted the
chrmarti/test-buffered-stream-write-lifecycle
branch
September 21, 2026 16:32
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
Tests-only follow-up to #337018, based on the latest
mainafter that fix merged. Adds six deterministic file-service tests for the lifecycle and ordering pitfalls identified while reviewing the stream-write implementation's history:Uses the existing in-memory filesystem provider so assertions cover real content and handle lifecycle, while deferred writes and event-loop yields exercise the relevant ordering. No production code changes.
Validation
npm run gulp compile-client: passed with 0 errors.git diff --check, and commit hygiene: passed.Local validation performed on Windows; cross-platform validation is left to PR CI.