Skip to content

feat: align ws sync behavior with librocco#2

Merged
silviot merged 2 commits into
librocco/mainfrom
codex/ws-main-align
Jun 5, 2026
Merged

feat: align ws sync behavior with librocco#2
silviot merged 2 commits into
librocco/mainfrom
codex/ws-main-align

Conversation

@silviot

@silviot silviot commented Mar 13, 2026

Copy link
Copy Markdown

Summary

  • align librocco/main with the ws sync behavior Librocco is currently validated against
  • carry over the handshake, sync-status, and DB-close safety fixes from librocco/sqlite3-fsnotify
  • keep the fork diff focused on code and tests, without lockfile or package metadata churn

Validation

  • VLCN_ROOT=/home/silvio/dev/vlcn-js-main-align PNPM_VERSION=9.15.9 PNPM_INSTALL_ARGS='--force --no-frozen-lockfile' DRY_RUN=true ./scripts/publish_vlcn.sh dev

silviot and others added 2 commits March 13, 2026 16:53
…nd (#1)

OutboundStream.reset() was an empty stub, so when a peer detected a gap and sent
RejectChanges, the server never rewound its cursor or re-sent. A peer that fell
behind mid-connection (a failed or lost apply) would then silently and
permanently miss changes — the gap-recovery half of the protocol was dead code,
producing converged-but-not-actually-synced divergence between peers.

Rewind #lastSent to the rejection's `since` and re-kick the stream so the missing
range is re-delivered. Also make the IDB and Transport imports type-only (they
are only used as types).

Adds OutboundStream.test.ts covering the gap-recovery path: a peer that rejects
at an earlier version must trigger a re-send from that point.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@silviot silviot closed this Jun 5, 2026
@silviot silviot merged commit 800616c into librocco/main Jun 5, 2026
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