fix(webui): give dashboard-initiated updates a phase-2 report
handleChatUpdateInstall called Install with InstallMeta{Channel:
"webui"} and no ReportPath, so the update watchdog's write_report()
silently returned without ever persisting a phase-2 outcome
(restart/health-check/version verification). Telegram had this via
reportPendingUpdate/SendPendingReport; the dashboard had nothing --
an operator who approved an update from the webui only ever saw the
synchronous phase-1 install result, never whether the daemon came
back up on the version it claimed.
Give webui its own report path (updateReportPath(cfg.WorkDir,
"webui"), hashed the same way as Telegram's per-identity path so the
two can never collide) and a boot-time reportPendingUpdate, mirroring
Telegram's but emitting a structured events.KindUpdateReport onto the
existing SSE/activity stream instead of a chat message -- the
dashboard has no session-scoped recipient to route text to the way a
chat ID gives Telegram one. Report.Verify's Confirmed/Drift/Unverified
partition (c25799e) is reused as-is; only the surface differs.
Closes archie-core-nln7 / GH#531.
This commit is contained in:
1 parent
1f93eab94b
commit
01dd72ab04
8 files changed
+363
-34
No files matched your search
@@ -306,6 +306,8 @@ func (b *boot) setupObservability() {
|
||||
})
|
||||
}
|
||||
b.web = &webui.Server{Store: b.st, Log: log, LogFeed: b.logFeed, TaskLogs: b.taskLogs, Cfg: config.NewHolder(cfg), Channels: b.channelManager, Events: bus}
|
||||
b.web.UpdateReportPath = updateReportPath(cfg.WorkDir, "webui")
|
||||
b.web.RunningVersions = daemonRunningVersions
|
||||
b.web.SetProvenance(configProvenance)
|
||||
b.web.ReloadChannel = func(ctx context.Context, id string) error {
|
||||
if id != "telegram" || b.restartTelegram == nil {
|
||||
|
||||
Reference in new issue
Block a user