Skip to content

test(sync): two idle replicas exchange no segments after the first round (T13256) - #1968

Merged
kryptobaseddev merged 7 commits into
mainfrom
feat/T13256-idle-no-pingpong
Oct 10, 2026
Merged

kryptobaseddev merged 7 commits into
mainfrom
feat/T13256-idle-no-pingpong

Conversation

@kryptobaseddev

Copy link
Copy Markdown
Owner

Task: T13256

Stacked on #1967 (feat/T13312-journal-join), which provides the two-device join.

What

This adds the spec §3.5 R7-7 acceptance test, "two idle replicas pulling in a loop exchange no segments after the first round", on the fake server:

  • B restores and joins A's journal.
  • Each device makes one real write.
  • One cloudSync round carries both writes.
  • Four idle rounds follow on each device. Each round asserts sent === 0 on both devices, and the stream's segment count holds.
  • Both stores converge.

There is no production change. Today no watermark control transaction exists, and the apply's echo is subtracted (§3.3), so idle replicas are already quiet. This test pins that, so the receive-watermark work (T12815/T12810) must piggyback rather than ping-pong.

Verification

  • Test: passes.
  • Mutation: disabling the sealer's apply-echo subtraction (sealer.ts, the g.kind === 'apply' branch) fails it with "round 0: A sent: expected 1 to be 0".
  • Biome: clean.
  • lint-changesets: passes.

🤖 Generated with Claude Code

kryptobaseddev and others added 3 commits October 6, 2026 20:37
…und (T13256)

Spec §3.5 R7-7: after one real write each and a first sync round, four
more idle rounds of cloud sync on both devices send nothing and the
stream's segment count holds; both stores converge. Mutation-checked:
disabling the sealer's apply-echo subtraction makes A send a segment in
round 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nit)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Base automatically changed from feat/T13312-journal-join to main October 10, 2026 21:17
@kryptobaseddev
kryptobaseddev merged commit b4d1670 into main Oct 10, 2026
@kryptobaseddev
kryptobaseddev deleted the feat/T13256-idle-no-pingpong branch October 10, 2026 21:17
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.

1 participant