eda: capture intake returns 500 after capture row is committed, duplicating dispatch on retry #1039

Closed
opened 2026-10-27 13:38:46 +00:00 by sam · 0 comments
Owner

internal/infrastructure/postgres/edastore.go:110 InsertCapture commits the capture row before calling pruneCaptures. If pruneCaptures fails, InsertCapture returns an error and receiver.go:142 returns HTTP 500. Without a delivery_header configured, the sender retries with a fresh fallback delivery ID and inserts a duplicate capture, causing duplicate task dispatch. Done when InsertCapture logs prune errors without failing committed captures.

Close reason

Fixed on fix/workflow-eda-audit (PR #1627)


Imported from beads archie-core-3miuh · GitHub #1618 · type bug · priority P2 · created 2026-10-11 · closed 2026-10-11

internal/infrastructure/postgres/edastore.go:110 InsertCapture commits the capture row before calling pruneCaptures. If pruneCaptures fails, InsertCapture returns an error and receiver.go:142 returns HTTP 500. Without a delivery_header configured, the sender retries with a fresh fallback delivery ID and inserts a duplicate capture, causing duplicate task dispatch. Done when InsertCapture logs prune errors without failing committed captures. ### Close reason Fixed on fix/workflow-eda-audit (PR #1627) --- _Imported from beads `archie-core-3miuh` · GitHub #1618 · type bug · priority P2 · created 2026-10-11 · closed 2026-10-11_
sam added the mediumbug labels 2026-10-27 13:38:46 +00:00
sam self-assigned this 2026-10-27 13:38:46 +00:00
sam closed this issue 2026-10-27 13:38:46 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1039