
pingqiuandClaude Opus 4.6
d2d57851b0
feat: rebuild MVP — dual-lane session with bitmap protection
Rebuild session protocol implementation for v2-rebuild-mvp-session-protocol.md.
New files:
- rebuild_bitmap.go: RebuildBitmap — session-scoped dense bitset for
WAL-applied LBA tracking. MarkApplied on local WAL write (not receive).
ShouldApplyBase returns false for WAL-covered LBAs (WAL always wins).
- rebuild_session.go: RebuildSession — replica-side two-line rebuild.
WAL lane (ApplyWALEntry) + base lane (ApplyBaseBlock) with bitmap
conflict resolution. TryComplete requires BOTH base_complete AND
wal_applied_lsn >= target_lsn. Volume-level control surface:
StartRebuildSession, ApplyRebuildSessionWALEntry/BaseBlock,
MarkRebuildSessionBaseComplete, TryCompleteRebuildSession,
CancelRebuildSession, ActiveRebuildSession.
- rebuild_mvp_test.go: 4 correctness tests — base+WAL converge,
WAL-applied never overwritten by base, bitmap set on applied not
received, control surface start/supersede/complete.
- rebuild_transport_test.go: 2 transport-level tests — two-line with
real WAL shipping, live writes during base copy with bitmap conflict.
Design docs:
- v2-rebuild-mvp-session-protocol.md: MVP spec with message set, apply
rules, completion/failure/crash rules, test matrix
- v2-sync-recovery-protocol.md: full protocol context (keepup/catchup/
rebuild unified design, primary decision logic, two-line model)
- v2-session-protocol-shape.md: protocol shape overview
Protocol engine (reference, not production):
- sw-block/protocol/: 7-event engine with ~300 lines, 13 tests
6 rebuild tests pass, all existing component tests pass.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 14:30:34 -07:00
..
2026-03-10 18:19:31 -07:00
2026-04-06 19:55:12 -07:00
2026-03-06 01:06:51 -08:00
2026-04-05 15:12:00 -07:00
2026-04-02 14:24:10 -07:00
2026-03-23 02:12:42 -07:00
2026-03-10 15:09:41 -07:00
2026-03-09 17:44:01 -07:00
2026-03-02 09:33:45 -08:00
2026-04-07 14:30:34 -07:00
2026-04-06 19:55:12 -07:00
2026-04-06 11:30:54 -07:00
2026-03-04 11:01:08 -08:00
2026-03-04 11:01:08 -08:00
2026-04-05 19:39:00 -07:00
2026-04-05 18:22:49 -07:00
2026-03-02 09:34:00 -08:00
2026-04-05 18:13:20 -07:00
2026-03-24 00:19:25 -07:00
2026-04-05 23:47:07 -07:00
2026-04-07 14:30:34 -07:00
2026-04-05 23:47:07 -07:00
2026-03-01 10:43:34 -08:00
2026-03-09 17:44:01 -07:00
2026-03-10 16:02:30 -07:00
2026-03-01 10:43:34 -08:00
2026-03-01 21:26:39 -08:00
2026-03-25 15:38:06 -07:00
2026-03-25 02:39:32 -07:00
2026-03-06 01:06:51 -08:00
2026-03-06 01:06:51 -08:00
2026-03-12 19:30:59 -07:00
2026-03-01 16:00:06 -08:00
2026-03-12 15:06:48 -07:00
2026-04-02 14:24:10 -07:00
2026-04-02 14:24:10 -07:00
2026-03-01 10:43:34 -08:00
2026-03-06 00:05:17 -08:00
2026-03-06 00:05:17 -08:00
2026-03-06 00:05:17 -08:00
2026-02-28 09:32:01 -08:00
2026-02-28 09:32:01 -08:00
2026-03-07 21:30:14 -08:00
2026-03-01 16:00:06 -08:00
2026-03-04 11:01:08 -08:00
2026-03-08 23:02:59 -07:00
2026-03-30 20:01:46 -07:00
2026-03-26 19:16:45 -07:00
2026-03-22 14:44:24 -07:00
2026-03-22 14:44:24 -07:00
2026-03-07 21:30:14 -08:00
2026-03-12 15:06:48 -07:00
2026-03-12 15:06:48 -07:00
2026-03-01 16:00:06 -08:00
2026-03-02 09:33:45 -08:00
2026-03-25 15:38:06 -07:00
2026-03-09 17:44:01 -07:00
2026-03-02 09:33:45 -08:00
2026-03-02 09:34:35 -08:00
2026-03-25 15:38:06 -07:00
2026-03-03 17:05:43 -08:00
2026-03-13 10:56:18 -07:00
2026-03-13 00:15:27 -07:00
2026-03-03 17:05:43 -08:00
2026-03-12 15:06:48 -07:00
2026-03-11 17:35:44 -07:00
2026-03-13 17:21:17 -07:00
2026-03-12 19:30:59 -07:00
2026-04-07 14:30:34 -07:00
2026-04-07 14:30:34 -07:00
2026-03-26 17:22:55 -07:00
2026-04-02 16:25:23 -07:00
2026-03-30 20:01:46 -07:00
2026-03-30 20:01:46 -07:00
2026-04-02 16:25:23 -07:00
2026-03-30 20:01:46 -07:00
2026-03-25 01:52:35 -07:00
2026-03-03 01:43:42 -08:00
2026-03-05 00:52:05 -08:00
2026-03-06 00:05:17 -08:00
2026-03-06 00:05:17 -08:00
2026-04-05 23:47:07 -07:00
2026-04-06 19:55:12 -07:00
2026-03-13 10:56:18 -07:00
2026-04-02 16:25:23 -07:00
2026-03-03 00:53:33 -08:00
2026-03-03 00:53:33 -08:00
2026-03-11 21:52:00 -07:00
2026-03-11 21:52:00 -07:00
2026-03-06 01:06:51 -08:00
2026-03-12 15:06:48 -07:00
2026-04-03 00:13:33 -07:00
2026-04-06 19:55:12 -07:00
2026-04-03 08:36:00 -07:00
2026-03-12 19:30:59 -07:00
2026-03-12 19:30:59 -07:00
2026-02-28 09:32:01 -08:00
2026-02-28 09:32:01 -08:00
2026-03-12 19:30:59 -07:00
2026-03-12 19:30:59 -07:00
2026-04-06 19:55:12 -07:00
2026-03-01 10:43:34 -08:00
2026-03-03 00:53:33 -08:00
2026-03-01 16:00:06 -08:00