fix(agent-core): refuse multi-line empty Edit deletions - #2511
fix(agent-core): refuse multi-line empty Edit deletions#2511mangeshraut712 wants to merge 2 commits into
Conversation
🦋 Changeset detectedLatest commit: 744fcd0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 097b1774d0
ℹ️ 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".
commit: |
097b177 to
eb224a2
Compare
|
Rebased onto latest CI is currently stuck in |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 380b0df96d
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a17e3b9f8c
ℹ️ 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".
2f08cd7 to
51cc962
Compare
|
Rebased onto latest |
c6652fd to
1a45ffa
Compare
|
Rebased onto latest |
|
rebase it |
Guard Edit against accidental +0/−N wipeouts when new_string is empty across 3+ lines unless allow_large_delete is set. Strengthen the old_string-not-found recovery guidance so the model rereads a large enough region instead of looping short Reads (fixes MoonshotAI#2427).
1a45ffa to
744fcd0
Compare
Summary
new_stringunlessallow_large_delete=true(fixes Edit 失败后陷入死循环:反复"Edit 失败 → 重读 → 再失败",并逐步删空了被编辑文件的多个章节 #2427).old_string not foundrecovery guidance to reread a large enough region.Test plan
pnpm exec vitest run test/tools/edit.test.tsinpackages/agent-core(23 passed)pnpm exec vitest run test/app/edit/tools/edit.test.tsinpackages/agent-core-v2(26 passed)Fixes #2427