ContextStream Workspace · Export pipeline
Preview Live workspace context isn’t connected here — everything below is illustrative sample content.

Answer · StreamPilot · today, 14:32

Why does the nightly export write duplicate rows?

The duplicates come from the retry path, not the writer. When a nightly batch times out, scheduler.ts re-enqueues the whole batch — and because export jobs run with at-least-once delivery, both attempts can land. The dedupe step only checks keys within a single run, so a retried batch from the previous window slips through untouched.

In short: the pipeline is working as designed, and the design has a gap. The trail below shows why it was built this way — and one open question sits exactly on the code path you’d change.

10 connected items surfaced from this answer — 4 files · 3 decisions · 3 open questions

Knowledge map

Where this answer came from

Step into any item and look around — you won’t lose your place.