[bug] archied --once hangs on a workflow.call chain and never follows the callee #1432

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

archied --once runs a single Cycle and exits (systemd timer / testing). A wait:true workflow.call makes the run poll its callee, but the callee is a queued task that only a later drain pass claims, and --once never runs one: the caller waits forever, so the invocation hangs rather than completing the queue it accepted. Pre-existing (the old drain pass also blocked inside Wait() before any second pass could claim the child) and unchanged by the fix that made a waiting caller release its capacity.

The fix needs a single-cycle run to drain to quiescence rather than to one pass: start the call-wait watcher for the once path (currently unexported and started only from Run/runIdentities), repeat Cycle while a pass claims work or a task is still in flight, then WaitForTasks. That needs drainNATS to report whether it claimed anything. Done when archied --once against a store holding a wait:true call chain exits after the chain completes.

Close reason

RunOnce starts the call-wait watcher and re-drains every second while any task is in flight, then waits for tasks. Gate clean; not exercised live against a call chain.


Imported from beads archie-core-l6ja · GitHub #1561 · type bug · priority P2 · created 2026-10-08 · closed 2026-10-24

archied --once runs a single Cycle and exits (systemd timer / testing). A wait:true workflow.call makes the run poll its callee, but the callee is a queued task that only a later drain pass claims, and --once never runs one: the caller waits forever, so the invocation hangs rather than completing the queue it accepted. Pre-existing (the old drain pass also blocked inside Wait() before any second pass could claim the child) and unchanged by the fix that made a waiting caller release its capacity. The fix needs a single-cycle run to drain to quiescence rather than to one pass: start the call-wait watcher for the once path (currently unexported and started only from Run/runIdentities), repeat Cycle while a pass claims work or a task is still in flight, then WaitForTasks. That needs drainNATS to report whether it claimed anything. Done when `archied --once` against a store holding a wait:true call chain exits after the chain completes. ### Close reason RunOnce starts the call-wait watcher and re-drains every second while any task is in flight, then waits for tasks. Gate clean; not exercised live against a call chain. --- _Imported from beads `archie-core-l6ja` · GitHub #1561 · type bug · priority P2 · created 2026-10-08 · closed 2026-10-24_
sam added the mediumbug labels 2026-10-27 13:40:22 +00:00
sam self-assigned this 2026-10-27 13:40:22 +00:00
sam closed this issue 2026-10-27 13:40:22 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1432