You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Edit tool false positive 'failed' error when oldText is substring of newText
Root cause: Recovery logic used simple 'includes' checks which failed when:
1. newText pre-existed in file (false positive success)
2. oldText was substring of newText (e.g. 'foo' -> 'foobar')
Fix: Use before/after occurrence counts for robust detection:
1. Count newText occurrences before and after edit
2. Verify newText count increased (not just present)
3. Strip newText when checking oldText to handle substring case
4. Verify oldText count decreased when original available
Fixes#54455, fixes#49363
0 commit comments