Skip to content

Apply V4A edits that only delete a blank line - #112

Draft
warp-agent-staging[bot] wants to merge 1 commit into
benchmark-run-151-trial-9359-attempt-1/01a10401-94f6-7ef5-8dcb-289f33bf582f/blank-line-v4a-basefrom
benchmark-run-151-trial-9359-attempt-1/01a10401-94f6-7ef5-8dcb-289f33bf582f/apply-blank-line-v4a-edits
Draft

warp-agent-staging[bot] wants to merge 1 commit into
benchmark-run-151-trial-9359-attempt-1/01a10401-94f6-7ef5-8dcb-289f33bf582f/blank-line-v4a-basefrom
benchmark-run-151-trial-9359-attempt-1/01a10401-94f6-7ef5-8dcb-289f33bf582f/apply-blank-line-v4a-edits

Conversation

@warp-agent-staging

Copy link
Copy Markdown

Description

A V4A edit that only deletes one blank line is no longer dropped as a no-op. Joining the matched lines with a newline turns that blank line into an empty string, which matched the empty replacement. The comparison now uses str::lines, so the deletion is applied. Adding a blank line was already applied once the server sent it as a trailing newline.

Companion server change: https://github.com/warpdotdev/warp-server-for-benchmarks/pull/4226

Linked Issue

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Server tracking: REMOTE-1.

Testing

  • cargo test -p ai --lib diff_validation::tests::test_v4a
  • cargo clippy -p ai --lib --tests -- -D warnings
  • I have manually tested my changes locally with ./script/run

This is not a rendered UI change. The new unit tests cover deleting one blank line, adding one blank line, and a blank line replaced by a blank line.

Screenshots / Videos

Not applicable: the change is in diff matching, not a visible surface.

Agent Mode

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

CHANGELOG-BUG-FIX: Agent file edits that only delete a blank line are applied instead of being ignored.

Joining matched lines with a newline cannot tell an empty replacement
from one blank line, so a deletion of that line was dropped as a no-op.
Compare the replacement with str::lines so the deletion is applied.
@warp-agent-staging warp-agent-staging Bot added factory: factory:exp-context-window-size Factory exp-context-window-size and removed factory: labels Oct 3, 2026
@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.

View run View conversation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

factory:exp-context-window-size Factory exp-context-window-size

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants