internal/channels.Manager has MarkRunning(id) (internal/channels/manager.go:68), but nothing in cmd/archied/main.go or cmd/archied/telegram_setup.go ever calls it. Every channel start path only calls MarkStarting then, on failure, MarkFailed -- there's no success signal.
cmd/archied/telegram_setup.go around line 100-111:
tg.Start() blocks for as long as the gateway is healthy (long-poll loop), so there's no point where success can be observed by return value the way failure is. Same pattern for email/webhook in cmd/archied/main.go (channelManager.MarkStarting("email"/"webhook") / MarkFailed only).
Impact
The Channels dashboard page shows a configured, actually-working channel stuck on "Starting." forever -- confirmed live on carina: Telegram successfully polling, command menu registered, messages flowing, but /api/channels still reports "state": "starting" indefinitely.
Expected
Each channel's start path needs a MarkRunning(id) call once it's actually confirmed up -- e.g. after the first successful long-poll/webhook-registration/listener-bind, not just at goroutine launch. Applies to telegram, email, and webhook.
Close reason
MarkRunning now fires for telegram/email/webhook via a gateway.Lifecycle{Starting,Running} callback threaded through Gateway.Start: email/webhook report Running after their listener actually binds (webhook moved off ListenAndServe's internal bind to explicit net.Listen so this is observable), telegram reports Running after StartWebhook launch (webhook mode) or after the first successful getUpdates response via a pollReadinessClient http.Client wrapper (long-poll mode). Restart re-reports Starting/Running each cycle. task check clean, race-clean on the new tests.
Imported from beads archie-core-1786637501039-425-88078ff7 · GitHub #446 · type bug · priority P2 · created 2026-08-08 · closed 2026-09-02
`internal/channels.Manager` has `MarkRunning(id)` (`internal/channels/manager.go:68`), but nothing in `cmd/archied/main.go` or `cmd/archied/telegram_setup.go` ever calls it. Every channel start path only calls `MarkStarting` then, on failure, `MarkFailed` -- there's no success signal.
`cmd/archied/telegram_setup.go` around line 100-111:
```go
if s.ChannelManager != nil {
s.ChannelManager.MarkStarting("telegram")
}
go func() {
if err := tg.Start(ctx, router); err != nil && ctx.Err() == nil {
if s.ChannelManager != nil {
s.ChannelManager.MarkFailed("telegram", err.Error())
}
s.Log.Error("telegram gateway stopped", "err", err)
}
}()
s.Log.Info("telegram gateway started")
```
`tg.Start()` blocks for as long as the gateway is healthy (long-poll loop), so there's no point where success can be observed by return value the way failure is. Same pattern for email/webhook in `cmd/archied/main.go` (`channelManager.MarkStarting("email"/"webhook")` / `MarkFailed` only).
### Impact
The Channels dashboard page shows a configured, actually-working channel stuck on "Starting." forever -- confirmed live on carina: Telegram successfully polling, command menu registered, messages flowing, but `/api/channels` still reports `"state": "starting"` indefinitely.
### Expected
Each channel's start path needs a `MarkRunning(id)` call once it's actually confirmed up -- e.g. after the first successful long-poll/webhook-registration/listener-bind, not just at goroutine launch. Applies to telegram, email, and webhook.
### Close reason
MarkRunning now fires for telegram/email/webhook via a gateway.Lifecycle{Starting,Running} callback threaded through Gateway.Start: email/webhook report Running after their listener actually binds (webhook moved off ListenAndServe's internal bind to explicit net.Listen so this is observable), telegram reports Running after StartWebhook launch (webhook mode) or after the first successful getUpdates response via a pollReadinessClient http.Client wrapper (long-poll mode). Restart re-reports Starting/Running each cycle. task check clean, race-clean on the new tests.
---
_Imported from beads `archie-core-1786637501039-425-88078ff7` · GitHub #446 · type bug · priority P2 · created 2026-08-08 · closed 2026-09-02_
sam
added the mediumbug labels 2026-10-27 13:38:26 +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.
internal/channels.ManagerhasMarkRunning(id)(internal/channels/manager.go:68), but nothing incmd/archied/main.goorcmd/archied/telegram_setup.goever calls it. Every channel start path only callsMarkStartingthen, on failure,MarkFailed-- there's no success signal.cmd/archied/telegram_setup.goaround line 100-111:tg.Start()blocks for as long as the gateway is healthy (long-poll loop), so there's no point where success can be observed by return value the way failure is. Same pattern for email/webhook incmd/archied/main.go(channelManager.MarkStarting("email"/"webhook")/MarkFailedonly).Impact
The Channels dashboard page shows a configured, actually-working channel stuck on "Starting." forever -- confirmed live on carina: Telegram successfully polling, command menu registered, messages flowing, but
/api/channelsstill reports"state": "starting"indefinitely.Expected
Each channel's start path needs a
MarkRunning(id)call once it's actually confirmed up -- e.g. after the first successful long-poll/webhook-registration/listener-bind, not just at goroutine launch. Applies to telegram, email, and webhook.Close reason
MarkRunning now fires for telegram/email/webhook via a gateway.Lifecycle{Starting,Running} callback threaded through Gateway.Start: email/webhook report Running after their listener actually binds (webhook moved off ListenAndServe's internal bind to explicit net.Listen so this is observable), telegram reports Running after StartWebhook launch (webhook mode) or after the first successful getUpdates response via a pollReadinessClient http.Client wrapper (long-poll mode). Restart re-reports Starting/Running each cycle. task check clean, race-clean on the new tests.
Imported from beads
archie-core-1786637501039-425-88078ff7· GitHub #446 · type bug · priority P2 · created 2026-08-08 · closed 2026-09-02