The cdc integration test covers the synchronous Drain/Poll happy path but
(1) resyncs from a fake snapshot and (2) never runs the publisher/consumer as
the concurrent goroutines the daemon actually uses. Add two E2E tests in the
composition-root package that wire the real sqlite.Store, outboxAdapter,
Publisher, JSONL log, Consumer, Broadcaster and the REAL snapshotSource
(store.ListAll):
- RealSnapshotResyncThroughRotation: forces a rotation and asserts the
consumer rebuilds from the sessions table, delivering the persisted record
payload, with the offset landing at the change_log head.
- ConcurrentPublisherConsumer: runs both as goroutines on their tickers and
asserts every write is delivered exactly once, in order, offset at head
(also exercises the broadcaster hand-off under -race).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>