Skip to content

Fix core edit integrity and tool reliability - #390

Merged
yottadynamics merged 2 commits into
mainfrom
worktree-edit-core-reliability
Oct 11, 2026
Merged

yottadynamics merged 2 commits into
mainfrom
worktree-edit-core-reliability

Conversation

@yottadynamics

@yottadynamics yottadynamics commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

This follow-up addresses the core reliability failures identified from the /inspect session metrics and is now rebased onto the merged PR #389 changes.

  • edit_file now uses compare-and-swap atomic writes for exact and tolerant edits, preventing stale edits from overwriting concurrent changes.
  • edit_anchored applies edits against byte spans while preserving CRLF, mixed line endings, and files without a final newline.
  • apply_diff applies a bounded git apply timeout, reports timeout/cancellation clearly, and does not spend a second attempt after cancellation.
  • grep reports the resolved search root and explicitly marks output truncated by the byte cap.
  • Added regression coverage for concurrent writes, timeout/cancellation behavior, line-ending preservation, patch cancellation, and grep truncation/provenance.
  • Corrected the changelog formatting and preserved the recovery/prevalidation improvements from Harden edit tool recovery and validation #389.

Related issue

Follow-up to #389.

How was this tested?

  • go test ./... — passes locally before rebase
  • go vet ./... — clean locally before rebase
  • Focused reliability tests — pass
  • Rebased onto main after Harden edit tool recovery and validation #389 merged; fresh CI is required for the rebased commit

Checklist

  • go test ./... passes
  • go vet ./... is clean
  • govulncheck ./... reports no reachable vulnerabilities
  • Tests added or updated
  • Docs/changelog updated
  • PR is focused on core tool reliability

Drafted with yottacode

Co-authored-by: yottacode <325888353+yottacode-agent@users.noreply.github.com>
@yottadynamics
yottadynamics force-pushed the worktree-edit-core-reliability branch from 4d17344 to 784c399 Compare October 11, 2026 00:18
Co-authored-by: yottacode <325888353+yottacode-agent@users.noreply.github.com>
@yottadynamics
yottadynamics force-pushed the worktree-edit-core-reliability branch from 784c399 to 225972b Compare October 11, 2026 00:43
@yottadynamics
yottadynamics merged commit f9c91f6 into main Oct 11, 2026
8 checks passed
@yottadynamics
yottadynamics deleted the worktree-edit-core-reliability branch October 11, 2026 00:52
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.

1 participant