Repository navigation
Fix edit recovery for file_path workspace edits - #81909
Conversation
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path. Real behavior proof Next step before merge Review detailsBest possible solution: Retry the Codex review after fixing the execution failure. Do we have a high-confidence way to reproduce the issue? Unclear. The review failed before ClawSweeper could establish a reproduction path. Is this the best way to solve the issue? Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 842e6f16437c. |
5bbe86e to
d684980
Compare
8329011 to
666506c
Compare
Honor file_path and related aliases when resolving edit recovery paths so post-write errors do not surface false edit failures after the file changed. Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
666506c to
e606568
Compare
|
Superseded: this earlier generated screenshot artifact should not be used as proof for #81909. Use the fresh deterministic before/after proof now embedded in the PR body instead: https://raw.githubusercontent.com/giodl73-repo/openclaw/proof-artifacts/pr-81909-fresh/pr-81909/pr-81909-file-path-edit-recovery-before-after-proof.png |
|
Updated #81909 with a fresh deterministic proof image and clearer PR body. The earlier generated screenshot for this PR should be ignored. The new proof compares
Fresh proof image: https://raw.githubusercontent.com/giodl73-repo/openclaw/proof-artifacts/pr-81909-fresh/pr-81909/pr-81909-file-path-edit-recovery-before-after-proof.png |
* Recover edit tool failures for file_path Honor file_path and related aliases when resolving edit recovery paths so post-write errors do not surface false edit failures after the file changed. * Refresh checks after proof formatting fix * Refresh checks after live proof update
* Recover edit tool failures for file_path Honor file_path and related aliases when resolving edit recovery paths so post-write errors do not surface false edit failures after the file changed. * Refresh checks after proof formatting fix * Refresh checks after live proof update
* Recover edit tool failures for file_path Honor file_path and related aliases when resolving edit recovery paths so post-write errors do not surface false edit failures after the file changed. * Refresh checks after proof formatting fix * Refresh checks after live proof update
* Recover edit tool failures for file_path Honor file_path and related aliases when resolving edit recovery paths so post-write errors do not surface false edit failures after the file changed. * Refresh checks after proof formatting fix * Refresh checks after live proof update
Summary
file_pathand related edit path aliases in edit-tool recovery, matching the edit tool/display path handling.AGENTS.mdedits where the file changes but a post-write error is thrown.Fixes #80066.
Real behavior proof
file_pathcould successfully update a workspace file such as~/.openclaw/workspace/AGENTS.mdbut still surface asEdit failedwhen a post-write error occurred, because recovery only resolved thepathargument.upstream/mainand PR heade6065687169a48a0f7d167a63ddd2468b6319a05.upstream/mainandfork/fix/edit-file-path-recovery-80066; in each worktree ranpnpm --silent exec tsx ./probe-file-path-edit-recovery.mjs. The probe imported the realwrapEditToolWithRecovery(), created a real temp.openclaw/workspace/AGENTS.md, called the wrapped edit tool withfile_path, wrote new content, then simulated a post-write failure.upstream/mainwrites the file but still throws the simulated post-write failure; the PR head recognizesfile_path, detects the changed file, and returns a successful edit result.Regression coverage
src/agents/pi-tools.read.host-edit-recovery.test.tscovers post-write recovery when edit calls usefile_path.Validation
node scripts/test-projects.mjs src/agents/pi-tools.read.host-edit-recovery.test.ts src/agents/pi-tools.workspace-paths.test.tspnpm check:changed