Skip to content

Safely match and apply blank-only V4A edits - #113

Draft
warp-agent-staging[bot] wants to merge 1 commit into
benchmark-run-221-trial-11881-attempt-1/01a13679-2203-7d06-b5a2-f087362afb97/client-pinned-basefrom
benchmark-run-221-trial-11881-attempt-1/01a13679-2203-7d06-b5a2-f087362afb97/blank-line-matcher
Draft

warp-agent-staging[bot] wants to merge 1 commit into
benchmark-run-221-trial-11881-attempt-1/01a13679-2203-7d06-b5a2-f087362afb97/client-pinned-basefrom
benchmark-run-221-trial-11881-attempt-1/01a13679-2203-7d06-b5a2-f087362afb97/blank-line-matcher

Conversation

@warp-agent-staging

Copy link
Copy Markdown

Description

Match complete V4A search windows, including their final blank lines, and compare replacement line sequences for no-op detection. Blank-only deletions also reject fuzzy matches onto nonblank content.

Context remains outside replacement spans, so neighboring edits cannot overlap through expanded anchors and fuzzy-matched indentation stays unchanged. The wire schema is unchanged.

Companion server change: https://github.com/warpdotdev/warp-server-for-benchmarks/pull/6504. Safe blank application requires this matcher correction; do not roll out the server's blank-preserving encoding to unfixed clients.

Linked Issue

https://linear.app/sandbox/issue/REMOTE-1

  • The linked issue is labeled ready-to-spec or ready-to-implement — sandbox implementation work; label not verified.
  • Where appropriate, screenshots or a short video of the implementation are included below — not applicable to this matcher-only change.

Testing

  • CARGO_BUILD_JOBS=2 cargo nextest run --manifest-path /workspace/warp/Cargo.toml -p ai -E 'test(diff_validation::)' --no-fail-fast — 34 passed.
  • CARGO_BUILD_JOBS=2 cargo clippy --manifest-path /workspace/warp/Cargo.toml -p ai --all-targets --tests -- -D warnings — passed.
  • Final targeted Rust formatting with repository settings and git diff --check — passed.

Regression tests failed before the correction. An isolated harness also feeds actual server ProduceActions output into the real matcher for 21 cases. It asserts exact ranges and complete byte-level applied contents, including EOF safety, neighboring edits, blank context, and fuzzy-context preservation. The assertion-backed fixture/harness bundle is attached as blank-line-application-proof.tar.gz in the run artifacts.

  • I have manually tested my changes locally with ./script/run — not needed for pure matcher behavior; verified through the actual matcher and application semantics.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-BUG-FIX: Fixed agent patches that add or remove blank lines being ignored or matched to the wrong lines.

@warp-agent-staging

Copy link
Copy Markdown
Author

This PR was generated with Warp.

Comment @warp-staging-factory on this PR to send it follow-up work.

@warp-agent-staging warp-agent-staging Bot added the factory:exp-foreman-impl-review-v2 Factory: exp-foreman-impl-review-v2 label Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

factory:exp-foreman-impl-review-v2 Factory: exp-foreman-impl-review-v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants