Skip to content

fix: reject partially matched stacked diff anchors - #1655

Merged
seratch merged 1 commit into
mainfrom
fix/stacked-apply-diff-anchors
Aug 14, 2026
Merged

seratch merged 1 commit into
mainfrom
fix/stacked-apply-diff-anchors

Conversation

@seratch

@seratch seratch commented Aug 14, 2026

Copy link
Copy Markdown
Member

This pull request fixes stacked @@ anchors in applyDiff so every non-empty anchor in a stack must match in sequence. Previously, when an earlier anchor matched but a later one did not, the parser could continue from the partial match and apply the hunk body to unrelated nearby content.

Single anchors and bare anchors keep their existing behavior, while incomplete stacks now fail before edited content is returned.

@seratch seratch added this to the 0.16.x milestone Aug 14, 2026
@changeset-bot

changeset-bot Bot commented Aug 14, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5c3f0a6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@openai/agents-core Patch
@openai/agents-extensions Patch
@openai/agents-openai Patch
@openai/agents-realtime Patch
@openai/agents Patch
realtime-react-native Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5c90f91a88

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@seratch
seratch force-pushed the fix/stacked-apply-diff-anchors branch from 5c90f91 to 5750df5 Compare August 14, 2026 01:16

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5750df5da0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@seratch
seratch force-pushed the fix/stacked-apply-diff-anchors branch from 5750df5 to 834e219 Compare August 14, 2026 01:33

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 834e219d79

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@seratch
seratch force-pushed the fix/stacked-apply-diff-anchors branch from 834e219 to 5c3f0a6 Compare August 14, 2026 02:31
@seratch
seratch enabled auto-merge (squash) August 14, 2026 02:32
@seratch
seratch merged commit e2cbca8 into main Aug 14, 2026
6 checks passed
@seratch
seratch deleted the fix/stacked-apply-diff-anchors branch August 14, 2026 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant