Skip to content

nes: patch: fix: don't yield malformed edits on fetch fail/cancellation#4904

Merged
ulugbekna merged 1 commit intomainfrom
ulugbekna/experimental-goat
Apr 5, 2026
Merged

nes: patch: fix: don't yield malformed edits on fetch fail/cancellation#4904
ulugbekna merged 1 commit intomainfrom
ulugbekna/experimental-goat

Conversation

@ulugbekna
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings April 1, 2026 13:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Xtab “custom diff patch” streaming path to stop emitting edits once the underlying chat fetch has failed or been cancelled, preventing consumers from applying malformed/partial edits.

Changes:

  • Extend XtabCustomDiffPatchResponseHandler.handleResponse with an optional getFetchFailure callback and early-return when it reports a failure/cancellation.
  • Wire the handler up from XtabProvider by passing a callback derived from chatResponseFailure.
  • Add unit tests for cancellation/failure behavior in the custom diff patch response handler.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/extension/xtab/node/xtabCustomDiffPatchResponseHandler.ts Adds fetch-failure detection hook to stop yielding edits on cancellation/failure.
src/extension/xtab/node/xtabProvider.ts Passes fetch-failure mapping callback into the custom diff patch response handler.
src/extension/xtab/test/node/xtabCustomDiffPatchResponseHandler.spec.ts Adds tests intended to validate stopping edit emission on fetch failure/cancellation.

Comment thread src/extension/xtab/node/xtabCustomDiffPatchResponseHandler.ts
@ulugbekna ulugbekna added this pull request to the merge queue Apr 5, 2026
Merged via the queue into main with commit 1522ae8 Apr 5, 2026
23 checks passed
@ulugbekna ulugbekna deleted the ulugbekna/experimental-goat branch April 5, 2026 19:36
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.

3 participants