Catch up event streams by cursor with real reconnect and periodic rescue (U6 slice 1) #147

Merged
weichen merged 1 commits from feature/collab-storage-u6-events into main 2026-10-11 09:30:31 +00:00
Owner

Plan U6 slice 1 (KTD6/R5): fixes batch-event loss (EventAt-only) and fake reconnect (wait on dead conn). Per-conversation cursor catch-up via EventsAfter paging, first-seen from 0 (harmless under SSE seq dedup), real reconnect with backoff + known-stream resume, periodic rescue ticker for lost notifications. Suite green twice on real PostgreSQL (64-batch, 1200-page, conn-kill, no-notify).

Plan U6 slice 1 (KTD6/R5): fixes batch-event loss (EventAt-only) and fake reconnect (wait on dead conn). Per-conversation cursor catch-up via EventsAfter paging, first-seen from 0 (harmless under SSE seq dedup), real reconnect with backoff + known-stream resume, periodic rescue ticker for lost notifications. Suite green twice on real PostgreSQL (64-batch, 1200-page, conn-kill, no-notify).
weichen added 1 commit 2026-10-11 09:30:30 +00:00
Why: plan section 2/KTD6 found the listener fetched only the last event of a batch (intermediate events invisible to live subscribers) and kept waiting on a dead connection after a drop (no actual reconnect).

Evidence: pgbus suite green twice against real PostgreSQL - batch of 64 all visible with continuous seq, 1200 events across pages, connection-kill reconnect recovers the outage window, no-notify events delivered by the periodic rescue; full backend suite green on both tiers.

Impact: Listener tracks per-conversation cursors (first-seen catch-up from 0 is harmless under SSE seq dedup), pages via EventsAfter to the notified watermark, rebuilds the connection with backoff and resumes known streams, and a rescue ticker covers lost notifications; Notifier contract unchanged.

Refs: proposals/2026-10-11-collaboration-storage-and-distribution.md U6 slice 1, KTD6; R5.
weichen merged commit 8c113a70b8 into main 2026-10-11 09:30:31 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Backend#147