Messaging Service reports no channel lifecycle to the dashboard #1163

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

The daemon's status.Manager was the only writer of channel lifecycle state (MarkStarting/MarkRunning/MarkFailed) and was removed in 8cda.6.4 along with its readiness projection: the daemon cannot observe a channel it no longer runs, and the gateway readiness probe there is now a ContractProbe against the Gateway.

archiemessaging.Service starts every channel with an empty channels.Lifecycle{}, so nothing records starting/running/failed anywhere. /api/channels falls back to config-derived Configured only, and POST /api/channels/{id}/reload has no backing seam.

Decide where channel lifecycle is published from the Messaging Service (its own health registry, or an event onto the bus the UI already reads) and wire status.Manager there.

Notes

ASSESSMENT (session 01a0c4d7, 2026-09-22) -- scoped from the code, not implemented.

THE PRODUCERS ALREADY EXIST. All three channels call the lifecycle they are handed: email reports starting and running (email.go), webhook the same (webhook.go), telegram reports starting and passes onRunning (telegram.go). So the missing work is NOT producer wiring. It is two things:

  1. A channels.Lifecycle implementation in the Messaging Service. archiemessaging.Service starts every channel with an empty channels.Lifecycle{}, and internal/channels/status.Manager -- MarkStarting/MarkRunning/MarkDegraded/MarkFailed/MarkStopped and Snapshot -- still exists but is imported by nothing in production.
  2. A way for that snapshot to reach the dashboard, which does not read it today. internal/webui.Server.handleChannels returns an empty list when s.Channels is nil, and nothing in production supplies one: archieui composes neither Channels nor ReloadChannel, so /api/channels answers with nothing and POST /api/channels/{id}/reload answers 501.

THE MISSING DECISION, named: which channel carries channel state -- and reload -- across the process boundary.

  1. The State Store / control plane. The dashboard's live-update path already runs through it (internal/webui's event pump binds before the State Store is listening and pumps its cursor), so a channel-state resource or capability there needs no new UI transport, and reload becomes a command on the same surface.
  2. A broker event. Would need new subscription plumbing in archie-ui, whose live path is the State Store cursor rather than NATS.
  3. The Messaging Service's own health surface. archiemessaging's readiness registry holds a single ContractProbe against the Gateway and nothing serves it to another process, so this needs a new client as well.

RECOMMENDED: option 1. Verifiable completion: against a running Messaging Service, GET /api/channels returns each channel's live state (starting/running/degraded/failed with detail) instead of nothing, and POST /api/channels/{id}/reload reloads a channel that declares ReloadSupported.

SCOPING ONLY -- not started, per the release manager.

Close reason

Closed


Imported from beads archie-core-8cda.6.8 · GitHub #924 · type task · priority P2 · created 2026-09-19 · closed 2026-09-21

The daemon's status.Manager was the only writer of channel lifecycle state (MarkStarting/MarkRunning/MarkFailed) and was removed in 8cda.6.4 along with its readiness projection: the daemon cannot observe a channel it no longer runs, and the gateway readiness probe there is now a ContractProbe against the Gateway. archiemessaging.Service starts every channel with an empty channels.Lifecycle{}, so nothing records starting/running/failed anywhere. /api/channels falls back to config-derived Configured only, and POST /api/channels/{id}/reload has no backing seam. Decide where channel lifecycle is published from the Messaging Service (its own health registry, or an event onto the bus the UI already reads) and wire status.Manager there. ### Notes ASSESSMENT (session 01a0c4d7, 2026-09-22) -- scoped from the code, not implemented. THE PRODUCERS ALREADY EXIST. All three channels call the lifecycle they are handed: email reports starting and running (email.go), webhook the same (webhook.go), telegram reports starting and passes onRunning (telegram.go). So the missing work is NOT producer wiring. It is two things: 1. A channels.Lifecycle implementation in the Messaging Service. archiemessaging.Service starts every channel with an empty channels.Lifecycle{}, and internal/channels/status.Manager -- MarkStarting/MarkRunning/MarkDegraded/MarkFailed/MarkStopped and Snapshot -- still exists but is imported by nothing in production. 2. A way for that snapshot to reach the dashboard, which does not read it today. internal/webui.Server.handleChannels returns an empty list when s.Channels is nil, and nothing in production supplies one: archieui composes neither Channels nor ReloadChannel, so /api/channels answers with nothing and POST /api/channels/{id}/reload answers 501. THE MISSING DECISION, named: which channel carries channel state -- and reload -- across the process boundary. 1. The State Store / control plane. The dashboard's live-update path already runs through it (internal/webui's event pump binds before the State Store is listening and pumps its cursor), so a channel-state resource or capability there needs no new UI transport, and reload becomes a command on the same surface. 2. A broker event. Would need new subscription plumbing in archie-ui, whose live path is the State Store cursor rather than NATS. 3. The Messaging Service's own health surface. archiemessaging's readiness registry holds a single ContractProbe against the Gateway and nothing serves it to another process, so this needs a new client as well. RECOMMENDED: option 1. Verifiable completion: against a running Messaging Service, GET /api/channels returns each channel's live state (starting/running/degraded/failed with detail) instead of nothing, and POST /api/channels/{id}/reload reloads a channel that declares ReloadSupported. SCOPING ONLY -- not started, per the release manager. ### Close reason Closed --- _Imported from beads `archie-core-8cda.6.8` · GitHub #924 · type task · priority P2 · created 2026-09-19 · closed 2026-09-21_
sam added the mediumtask labels 2026-10-27 13:39:16 +00:00
sam self-assigned this 2026-10-27 13:39:16 +00:00
sam closed this issue 2026-10-27 13:39:16 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1163