Repository navigation
fix(engine): leave a pull out of a turn's checkpoint changes - #4308
Merged
Merged
Conversation
Files that changed only because HEAD moved during the turn (a pull, checkout or merge) are no longer counted in the Changes chip, listed in the turn diff, or rolled back by Rewind.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A turn's checkpoint diff compared the whole work tree before and after the turn, so a
git pull --ff-onlyat the start of a turn showed up as the agent's edits (+19218 −15581 for a 3-file turn).Each checkpoint commit's parent is the
HEADit was taken on. When the two ends of a turn stand on different heads, a file is left out of the turn's changes if it changed between the heads and matches itsHEADat both ends (it was not edited). A file the pull brought in and the turn then edited still shows. This applies to the list counts (the chip), the per-file diff, and Rewind, which now keeps what the pull brought in instead of silently rolling it back.Changelog
The Changes chip under a turn no longer counts a git pull, checkout or merge as the agent's edits, and Rewind keeps what it pulled in.
Testing
cargo fmt --check, comment and size lints locally;a_pull_during_the_turn_is_not_the_turns_changecovers a pull-only turn (no changes), a pull plus edits (only the edited files), and a rewind that keeps the pulled files. Compilation and tests run in CI.Closes #4301