runChannel (internal/app/archiemessaging/supervise.go) marks a channel that exits on its own as failed or stopped and returns, leaving it unsupervised; restartChannel then refuses it with 'channel is not running' because supervised is false. A channel that failed on its own can only come back by restarting the whole service.
Design
Keep one supervisor goroutine per channel for the service lifetime. A failed run is retried with bounded backoff (doubling, capped at 30s) up to 5 attempts; after the budget the supervisor parks. An explicit restart (restartChannel, driven by channel settings) wakes a parked or backing-off supervisor through a per-instance notify channel, and an in-flight run through restartPending plus its cancel. The supervisor only exits on shutdown, so a stopped channel always has one to start it again; a deferred supervisorExits clears supervised on return.
Acceptance criteria
Tests pin: a failing channel is started again; an explicit restart of a parked channel starts a replacement instead of being refused; an in-flight restart replaces a live run; a channel with no supervisor (never started, or shut down) is refused.
Close reason
Fixed by e6791746: one supervisor per channel for the service lifetime, bounded backoff retry (5 attempts, capped 30s), park, explicit restart wakes it. supervise_test covers all acceptance cases and passes with -race.
Imported from beads archie-core-1n31 · GitHub #1559 · type bug · priority P2 · created 2026-10-08 · closed 2026-10-24
runChannel (internal/app/archiemessaging/supervise.go) marks a channel that exits on its own as failed or stopped and returns, leaving it unsupervised; restartChannel then refuses it with 'channel is not running' because supervised is false. A channel that failed on its own can only come back by restarting the whole service.
### Design
Keep one supervisor goroutine per channel for the service lifetime. A failed run is retried with bounded backoff (doubling, capped at 30s) up to 5 attempts; after the budget the supervisor parks. An explicit restart (restartChannel, driven by channel settings) wakes a parked or backing-off supervisor through a per-instance notify channel, and an in-flight run through restartPending plus its cancel. The supervisor only exits on shutdown, so a stopped channel always has one to start it again; a deferred supervisorExits clears supervised on return.
### Acceptance criteria
Tests pin: a failing channel is started again; an explicit restart of a parked channel starts a replacement instead of being refused; an in-flight restart replaces a live run; a channel with no supervisor (never started, or shut down) is refused.
### Close reason
Fixed by e6791746: one supervisor per channel for the service lifetime, bounded backoff retry (5 attempts, capped 30s), park, explicit restart wakes it. supervise_test covers all acceptance cases and passes with -race.
---
_Imported from beads `archie-core-1n31` · GitHub #1559 · type bug · priority P2 · created 2026-10-08 · closed 2026-10-24_
sam
added the mediumbug labels 2026-10-27 13:38:37 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
runChannel (internal/app/archiemessaging/supervise.go) marks a channel that exits on its own as failed or stopped and returns, leaving it unsupervised; restartChannel then refuses it with 'channel is not running' because supervised is false. A channel that failed on its own can only come back by restarting the whole service.
Design
Keep one supervisor goroutine per channel for the service lifetime. A failed run is retried with bounded backoff (doubling, capped at 30s) up to 5 attempts; after the budget the supervisor parks. An explicit restart (restartChannel, driven by channel settings) wakes a parked or backing-off supervisor through a per-instance notify channel, and an in-flight run through restartPending plus its cancel. The supervisor only exits on shutdown, so a stopped channel always has one to start it again; a deferred supervisorExits clears supervised on return.
Acceptance criteria
Tests pin: a failing channel is started again; an explicit restart of a parked channel starts a replacement instead of being refused; an in-flight restart replaces a live run; a channel with no supervisor (never started, or shut down) is refused.
Close reason
Fixed by
e6791746: one supervisor per channel for the service lifetime, bounded backoff retry (5 attempts, capped 30s), park, explicit restart wakes it. supervise_test covers all acceptance cases and passes with -race.Imported from beads
archie-core-1n31· GitHub #1559 · type bug · priority P2 · created 2026-10-08 · closed 2026-10-24