Skip to content

shared-tree checkpoint: one pass covers every live peer and converges - #1689

Merged
justrach merged 1 commit into
mainfrom
fix/shared-tree-checkpoint-converges
Oct 20, 2026
Merged

justrach merged 1 commit into
mainfrom
fix/shared-tree-checkpoint-converges

Conversation

@justrach

Copy link
Copy Markdown
Owner

Fixes #1622.

Root cause

presence.gateCheckIdentity acknowledged one peer per checkpoint, kept at most 16 acknowledgments, and never dropped a peer that had exited. With peers respawning, the set filled up. Every new peer after that could never be acknowledged, so every mutating call was refused for good, and each re-issue named a different peer.

Fix

  • New presence_ack.ackLive. One checkpoint acknowledges every peer that is live at that moment, and drops acknowledgments of peers that are gone.
  • An identical re-issue now proceeds. Only a peer that starts later fires another checkpoint.
  • The checkpoint text names the first peer and how many others it covers. The NOT performed marker the batch gate matches is unchanged.

Not changed

Commands whose only effect is remote (over ssh) or outside the worktree are still checkpointed while peers are live. They now pass after one re-issue instead of never.

Tests

  • New: two live peers are covered by one checkpoint, and 40 respawning peers each checkpoint once and then proceed. The ack set never fills.
  • Presence and checkpoint unit tests: 130 pass.
  • Tier-1 pre-push gate is green.

The checkpoint fired once per live peer, but remembered at most 16
acknowledgments and never forgot a peer that had exited. With peers
respawning, the set filled up; every new peer could then never be
acknowledged, so every mutating call was refused for good and each
re-issue named another peer.

One checkpoint now acknowledges every peer live at that moment, and
acknowledgments of peers that are gone are dropped, so an identical
re-issue proceeds. Only a peer that starts later fires another
checkpoint. The message names the first peer and how many others it
covers.

Fixes #1622
@justrach
justrach merged commit f32237c into main Oct 20, 2026
6 checks passed
@justrach
justrach deleted the fix/shared-tree-checkpoint-converges branch October 20, 2026 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shared-tree checkpoint blocks out-of-tree mutations and its once-per-peer escape never converges while peers respawn

1 participant