Binding dispatch claim can permanently consume an event before task creation #1001

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

internal/daemon/daemon.go claimAndEnqueue persists RecordDispatch before EnqueueBindingTask and SetDispatchTask in separate operations. A crash or enqueue error after the claim leaves a durable ledger entry without a task; retries are rejected as already dispatched. The code explicitly documents this loss, which conflicts with the accepted-work durability invariant. Make the dispatch claim, task creation and provenance atomic inside the State Store, preserving delivery deduplication. Done when fault injection between the current operations cannot lose accepted work, and replay creates exactly one task.

Close reason

Resolved on HEAD by 77837aad: EnqueueBindingTask claims the ledger and inserts the task atomically in one State Store transaction.


Imported from beads archie-core-1nalh · GitHub #1611 · type bug · priority P1 · created 2026-10-11 · closed 2026-10-11

internal/daemon/daemon.go claimAndEnqueue persists RecordDispatch before EnqueueBindingTask and SetDispatchTask in separate operations. A crash or enqueue error after the claim leaves a durable ledger entry without a task; retries are rejected as already dispatched. The code explicitly documents this loss, which conflicts with the accepted-work durability invariant. Make the dispatch claim, task creation and provenance atomic inside the State Store, preserving delivery deduplication. Done when fault injection between the current operations cannot lose accepted work, and replay creates exactly one task. ### Close reason Resolved on HEAD by 77837aad: EnqueueBindingTask claims the ledger and inserts the task atomically in one State Store transaction. --- _Imported from beads `archie-core-1nalh` · GitHub #1611 · type bug · priority P1 · created 2026-10-11 · closed 2026-10-11_
sam added the highbug labels 2026-10-27 13:38:38 +00:00
sam self-assigned this 2026-10-27 13:38:38 +00:00
sam closed this issue 2026-10-27 13:38:38 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1001