Sync → One failed file no longer discards the whole pass#112
Merged
Conversation
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.
Resolves #87
Problem
state.json, even when every other action succeededChanges
executeSyncPlannow reports which actions completed and which failed, alongside the per file failuresWhy
Greptile Summary
This PR fixes a bug (#87) where a sync pass with any per-file failure discarded all progress — the manifest was never uploaded and
state.jsonwas never advanced, so completed pushes sat in the bucket invisible to other devices and a permanently-failing file could wedge sync indefinitely.executeSyncPlannow returnsExecuteResultwithcompleted,failed, andfailuresarrays, splitting per-action tracking from per-operation failure detail so that a conflict's two-step failure (copy push + pull) is still counted as one logical file failure.executed.completedonly and is uploaded even on partial failure;revertFailedPathsthen reverts each failed action's path to the ancestor's entry in the returned snapshot, ensuring those paths re-plan correctly next pass without risking stale local content being pushed over a newer remote version.Confidence Score: 5/5
Safe to merge — all identified edge cases converge correctly verified against planSync's same-hash guard.
The revert-to-ancestor invariant is sound: planSync correctly treats local==remote!=ancestor as already converged, which is exactly the state a partially-succeeded conflict action leaves after revertFailedPaths runs. Manifest-upload-before-snapshot ordering is correct. Test coverage is thorough with three new end-to-end test cases.
No files require special attention.
Important Files Changed
Reviews (2): Last reviewed commit: "Address comment" | Re-trigger Greptile