Flush daemon task-event subscription before accepting worker events #1387

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

cmd/archied.subscribeAgentEvents registers a core-NATS wildcard subscription but returns before flushing the SUB frame. A task worker can publish immediately and lose its first event; TestSubscribeAgentEventsDropsUnparseableMessages exposes the race under full-suite load.

Acceptance criteria

subscribeAgentEvents flushes the NATS connection before returning; flush failure unsubscribes the just-created subscription; a regression test proves a publisher can deliver immediately after subscription setup.

Close reason

Completed; reconciled with the already-closed GitHub issue.


Imported from beads archie-core-ite6 · GitHub #616 · type bug · priority P1 · created 2026-08-24 · closed 2026-08-24

cmd/archied.subscribeAgentEvents registers a core-NATS wildcard subscription but returns before flushing the SUB frame. A task worker can publish immediately and lose its first event; TestSubscribeAgentEventsDropsUnparseableMessages exposes the race under full-suite load. ### Acceptance criteria subscribeAgentEvents flushes the NATS connection before returning; flush failure unsubscribes the just-created subscription; a regression test proves a publisher can deliver immediately after subscription setup. ### Close reason Completed; reconciled with the already-closed GitHub issue. --- _Imported from beads `archie-core-ite6` · GitHub #616 · type bug · priority P1 · created 2026-08-24 · closed 2026-08-24_
sam added the highbug labels 2026-10-27 13:40:11 +00:00
sam self-assigned this 2026-10-27 13:40:11 +00:00
sam closed this issue 2026-10-27 13:40:11 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1387