Preserve sync-time push leases - #60
Merged
Merged
Conversation
brdv
force-pushed
the
document-sync-recovery
branch
from
July 23, 2026 14:07
6ea74aa to
d66941a
Compare
brdv
force-pushed
the
preserve-sync-push-leases
branch
from
July 23, 2026 14:07
43ffb2b to
0a792f5
Compare
brdv
force-pushed
the
document-sync-recovery
branch
from
July 23, 2026 14:10
d66941a to
8b7b3f0
Compare
brdv
force-pushed
the
preserve-sync-push-leases
branch
from
July 23, 2026 14:10
0a792f5 to
b6eda30
Compare
brdv
force-pushed
the
document-sync-recovery
branch
from
July 23, 2026 14:16
8b7b3f0 to
bbef7fd
Compare
brdv
force-pushed
the
preserve-sync-push-leases
branch
from
July 23, 2026 14:16
b6eda30 to
4948005
Compare
brdv
force-pushed
the
document-sync-recovery
branch
from
July 23, 2026 14:20
bbef7fd to
0825425
Compare
brdv
force-pushed
the
preserve-sync-push-leases
branch
from
July 23, 2026 14:20
4948005 to
60c082d
Compare
brdv
force-pushed
the
document-sync-recovery
branch
from
July 23, 2026 14:22
0825425 to
2f44159
Compare
brdv
force-pushed
the
preserve-sync-push-leases
branch
from
July 23, 2026 14:22
60c082d to
bf42bfc
Compare
brdv
force-pushed
the
document-sync-recovery
branch
from
July 23, 2026 14:24
2f44159 to
4a3b35c
Compare
brdv
force-pushed
the
preserve-sync-push-leases
branch
from
July 23, 2026 14:24
bf42bfc to
c3cf822
Compare
brdv
force-pushed
the
document-sync-recovery
branch
from
July 23, 2026 14:25
4a3b35c to
ab93920
Compare
brdv
force-pushed
the
preserve-sync-push-leases
branch
from
July 23, 2026 14:25
c3cf822 to
8d69e76
Compare
brdv
force-pushed
the
preserve-sync-push-leases
branch
from
July 23, 2026 14:29
8d69e76 to
d3d6d3f
Compare
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.
Summary
Carry the exact remote branch tips observed by
stck syncintostck pushso intended restack rewrites remain safe and publishable.Sync now records explicit leases only for branches it rewrites and refuses to authorize a rewrite when the remote already contains unintegrated commits. Push accepts the resulting non-ancestor history only while each remote still matches its sync-time snapshot, pins every force-with-lease invocation to an exact SHA or branch absence, and clears stale plans when post-sync drift is detected.
Stack position: follow-up to the completed 10-PR plan. Base:
document-sync-recovery. Parent PR: #59.Changelist
src/sync_state.rs— persist sync-time remote branch leases through resumable sync and push statesrc/gitops.rs— resolve fetched remote tips and push with explicit SHA-or-absence leasessrc/commands.rs— validate lease eligibility during sync and enforce captured expectations during pushtests/harness/mod.rs,tests/push.rs,tests/sync.rs,tests/real_git.rs— cover intended rewritten pushes, remote drift rejection, missing remotes, retries, and the original real-Git failureUSAGE.md,docs/sync-recovery.md— document the exact-lease safety and recovery contract