monitor: no backup copy yet is ONE Backups alert, not one warning per service #1905

Closed
ben wants to merge 0 commits from fix/backup-alert-rollup into main
Owner

Ben's ruling (2026-09-25): "All service backups count as 1 backup alert until there is an established backup copy."

The bug

Whakatōhea Demo's Overview read "3 things need attention — Services · 2 warning · Backups · 1 critical" while the Services card said ALL SERVICES HEALTHY. The community has no backup copy. Every warning was a per-dataset fleetstate.Gap (no-backup / single-copy) that monitoring raised with Service set, so it filed under the services tab, and the identity critical was synthesised beside it. Each installed service added another alert.

The fix

  • internal/monitor/nobackupyet.go: while no dataset has a verified copy (backups' coverage LastGood, or a recorded backup home), every no-backup and single-copy gap folds into one standing alert, backup/no-copy-yet, on the Backups tab:
    • "No backup copy yet — Identity, Files & documents and Chat have no backup. If this gateway is lost, nobody can sign in again and no recovery phrase can rebuild it."
    • It is critical while it carries the unprotected identity dataset (subject dataset:identity). DDR 0265's synthesised identity row is not added beside it. Without identity it is a warning.
    • It notifies once ("Nothing is backed up yet.", no one-click fix). Respond routes to open-policy-identity (Backups). It resolves on the first verified copy. Installing a service only extends the list: same key, same RaisedAt, no new notification.
    • With no service gap to fold (identity only), it stays DDR 0265's synthesised row, so the notify lifecycle is unchanged for that case.
  • After a copy is established, gaps raise per dataset as before. A no-backup gap is dropped where backups' coverage already verifies that dataset's service, because the fleet's BackupHomes is never populated in production (GOTCHAS #349).
  • backupFaults (ADR 0081) are unchanged. They are run/target events (a failed run, stale, verification, gone target), which are actionable faults of an attempted backup. They are not consequences of "no backup yet".
  • Services card (FleetServicesStatusScreen.vue + ServicesSurface.vue): it now also reads the alert list the badge counts, following the Fleet tab's alertsSource pattern. It states every services-tab alert that isn't already an "X is down" line, such as a mail-readiness warning. It can no longer say ALL SERVICES HEALTHY while the Services badge counts an alert.
  • DDR 0265 and ADR 0070 amended. STATUS.md updated. GOTCHAS #349 added.

Tests

  • go test ./internal/monitor/... ./internal/fleetstate/... ./internal/controlapi/... ./control-plane/...: ok. New nobackupyet_test.go covers one alert per community, the notify-once rule, install-extends-the-list, warning without identity, clears on establishment, and identity-alone stays synthesised.
  • Dashboard: all 154 vitest files pass (2011 tests). vue-tsc and eslint are clean. New Services-card cases are in monitoringStatus.test.ts.

Not merged, not deployed.

🤖 Generated with Claude Code

Ben's ruling (2026-09-25): *"All service backups count as 1 backup alert until there is an established backup copy."* ## The bug Whakatōhea Demo's Overview read **"3 things need attention — Services · 2 warning · Backups · 1 critical"** while the Services card said **ALL SERVICES HEALTHY**. The community has no backup copy. Every warning was a per-dataset `fleetstate.Gap` (no-backup / single-copy) that monitoring raised with `Service` set, so it filed under the services tab, and the identity critical was synthesised beside it. Each installed service added another alert. ## The fix - **`internal/monitor/nobackupyet.go`**: while no dataset has a verified copy (backups' coverage `LastGood`, or a recorded backup home), every no-backup and single-copy gap folds into **one** standing alert, `backup/no-copy-yet`, on the **Backups** tab: - *"No backup copy yet — Identity, Files & documents and Chat have no backup. If this gateway is lost, nobody can sign in again and no recovery phrase can rebuild it."* - It is **critical** while it carries the unprotected identity dataset (subject `dataset:identity`). DDR 0265's synthesised identity row is not added beside it. Without identity it is a warning. - It notifies **once** ("Nothing is backed up yet.", no one-click fix). Respond routes to `open-policy-identity` (Backups). It resolves on the first verified copy. Installing a service only extends the list: same key, same RaisedAt, no new notification. - With no service gap to fold (identity only), it stays DDR 0265's synthesised row, so the notify lifecycle is unchanged for that case. - **After a copy is established**, gaps raise per dataset as before. A no-backup gap is dropped where backups' coverage already verifies that dataset's service, because the fleet's `BackupHomes` is never populated in production (GOTCHAS #349). - **backupFaults (ADR 0081) are unchanged.** They are run/target events (a failed run, stale, verification, gone target), which are actionable faults of an attempted backup. They are not consequences of "no backup yet". - **Services card** (`FleetServicesStatusScreen.vue` + `ServicesSurface.vue`): it now also reads the alert list the badge counts, following the Fleet tab's `alertsSource` pattern. It states every services-tab alert that isn't already an "X is down" line, such as a mail-readiness warning. It can no longer say ALL SERVICES HEALTHY while the Services badge counts an alert. - DDR 0265 and ADR 0070 amended. STATUS.md updated. GOTCHAS #349 added. ## Tests - `go test ./internal/monitor/... ./internal/fleetstate/... ./internal/controlapi/... ./control-plane/...`: ok. New `nobackupyet_test.go` covers one alert per community, the notify-once rule, install-extends-the-list, warning without identity, clears on establishment, and identity-alone stays synthesised. - Dashboard: all 154 vitest files pass (2011 tests). `vue-tsc` and eslint are clean. New Services-card cases are in `monitoringStatus.test.ts`. Not merged, not deployed. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
monitor: no backup copy yet is ONE Backups alert, not one warning per service
Some checks failed
ci / seam (pull_request) Has been cancelled
ci / publish (pull_request) Has been cancelled
ci / publish-broker (pull_request) Has been cancelled
ci / deploy-broker (pull_request) Has been cancelled
dfdc19dcec
Ben (2026-09-25): "all service backups count as 1 backup alert until there
is an established backup copy". Whakatōhea Demo read "3 things need
attention — Services · 2 warning · Backups · 1 critical" over a Services
card saying ALL SERVICES HEALTHY: each dataset's no-backup / single-copy
gap raised its own warning filed under its service's tab.

- internal/monitor/nobackupyet.go: while no dataset has a verified copy
  (backups' coverage last-good, or a recorded backup home), every
  no-backup and single-copy gap folds into one standing Backups-tab alert
  `backup/no-copy-yet` — "No backup copy yet — Identity, Files & documents
  and Chat have no backup." — critical while it carries the unprotected
  identity dataset (merged with DDR 0265's synthesised row), notified once,
  drilling into identity's policy, resolving on the first verified copy.
  Identity alone (no service gap) stays the synthesised row.
- After establishment gaps raise per dataset as before; a no-backup gap is
  dropped where backups' coverage already verifies that dataset (the
  fleet's BackupHomes is never populated in production — GOTCHAS #349).
- Backups' published faults (ADR 0081) are unchanged.
- Services card states every alert filed under Services that its "X is
  down" lines don't (e.g. a mail-readiness warning), read from the same
  alert list the badge counts.
- DDR 0265 + ADR 0070 amended; STATUS.md; GOTCHAS #349.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs: backup rollup gotcha is #350 (#349 taken by the disk-floors PR #1904)
All checks were successful
ci / seam (pull_request) Successful in 11m20s
ci / publish (pull_request) Has been skipped
ci / publish-broker (pull_request) Has been skipped
ci / deploy-broker (pull_request) Has been skipped
4912f857b7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Owner

Reviewed for merge at Ben's request (2026-11-16 PR sweep) — not merged; left open. ~505 commits behind. Main moved the same classifier under #1976 (55dac872: a dataset's redundancy gap is ONE alert on Backups) and notifications now carry i18n keys (HeadlineKey/DiagnosisKey). Ben's 2026-09-25 ruling (one Backups alert until an established copy exists) is NOT on main yet — this needs re-doing on top of #1976's per-dataset grouping, with the notify keys in every locale.

Reviewed for merge at Ben's request (2026-11-16 PR sweep) — **not merged; left open.** ~505 commits behind. Main moved the same classifier under #1976 (55dac872: a dataset's redundancy gap is ONE alert on Backups) and notifications now carry i18n keys (`HeadlineKey`/`DiagnosisKey`). Ben's 2026-09-25 ruling (one Backups alert until an established copy exists) is NOT on main yet — this needs re-doing on top of #1976's per-dataset grouping, with the notify keys in every locale.
Author
Owner

Merged onto main as 3f1aabe8, reworked on top of #1976 (one alert per dataset):

  • The rollup (backup/no-copy-yet) stands in place of the redundancy/<dataset> alerts until a first verified copy. After that, per-dataset alerts apply again.
  • Its notification now has i18n keys (monitor.notify.headline.noBackupYet / diagnosis.noBackupYet) in all five locales.
  • On Backups, the dataset-gaps box shows the rollup as its one line, NOTHING IS BACKED UP YET — Identity, Files & documents and Chat have no backup, so the tab still names what its badge counts (2026-09-28 ruling).
  • The DDR 0265 amendment is dated 2026-11-17, and the GOTCHAS entry is #418.

Checks: dashboard 2343 tests, app 2399, both vue-tsc runs clean, internal/monitor and internal/controlapi pass. It reaches Whakatōhea Demo with the next control-plane deploy.

Merged onto main as 3f1aabe8, reworked on top of #1976 (one alert per dataset): - The rollup (`backup/no-copy-yet`) stands in place of the `redundancy/<dataset>` alerts until a first verified copy. After that, per-dataset alerts apply again. - Its notification now has i18n keys (`monitor.notify.headline.noBackupYet` / `diagnosis.noBackupYet`) in all five locales. - On Backups, the dataset-gaps box shows the rollup as its one line, *NOTHING IS BACKED UP YET — Identity, Files & documents and Chat have no backup*, so the tab still names what its badge counts (2026-09-28 ruling). - The DDR 0265 amendment is dated 2026-11-17, and the GOTCHAS entry is #418. Checks: dashboard 2343 tests, app 2399, both vue-tsc runs clean, `internal/monitor` and `internal/controlapi` pass. It reaches Whakatōhea Demo with the next control-plane deploy.
ben closed this pull request 2026-11-17 13:13:36 +00:00
All checks were successful
ci / seam (pull_request) Successful in 11m20s
ci / publish (pull_request) Has been skipped
ci / publish-broker (pull_request) Has been skipped
ci / deploy-broker (pull_request) Has been skipped

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss!1905
No description provided.