control-panel observability child spec: backup replication matrix (P7-S7) — standing dataset → target drill-down #838
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#838
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
Program map: #7 — Wayfinder map: OurCloud v1 program scope (Phase 0).
Design ticket: #762 — control-panel observability: backup replication matrix (sender → destination drill-down) (one of the six #759–#764 siblings filed from the 2026-08-24
matou-distributed-serverscomparison; the map's v1 scope is what it lands inside).Design tier this spec is written against (all present, all
accepted):docs/adr/0205-design-replication-matrix-standing-dataset-target-drilldown.md— the ruling DDR: the matrix is a standing dataset → target drill-down (P7-S7), a projection of coverage and run/verification truth, never a second source.docs/ux/flows/p7-backups.mermaid, amended by the arc: node P7-S7 plus edges S1 → S7 (opens replication), S7 → S3 (a pair drills into its runs), S7 → S2x (a gone target routes to replace).docs/ux/wireframes/p7-backups/—p7-s7-replication-matrix.html(new — depicts current, stale, not-backed-up-yet and unreachable-pair states in one matrix) andp7-s1-backups-overview.html(amended — theopen-replicationentry beside Restore/Export). Theirdata-field/data-action/data-statusattributes are the stable element-ID contract every acceptance criterion below is written against.CONTEXT.md— Replication matrix, Current (pair), Size on target / Snapshots held (never repo size — that is restic vocabulary).Siblings in the same observability arc (each specs separately, then all fan in at one
/slice-map): #759 device telemetry (specced as #769 — mints the shared kit primitives and grading constants), #760 logs, #761 network, #763 activity feed, #764 topology map (deferred). This is the smallest sibling: an enrichment of the already-built Backups feature (P7), not a new surface.Problem Statement
The Backups tab answers is each dataset safe? but not where, exactly, is it safe? P7-S1's coverage map gives one row per dataset — verified copies, offsite, last good — and P7-S3 gives a per-run log. Between them the sender → target fan-out is invisible: an operator cannot see which node sends which dataset to which targets, how current each individual pair is, how much of a dataset sits on each target, or how many snapshots each target holds. When the overview says "1 of 2" there is no screen that names which copy is behind and why — the operator reconstructs it from run rows.
The absence also hides the quiet failure modes the backups design already names: a pair whose copy is ageing on a reachable target, an unreachable target still silently holding last week's data, a drafted target that was never confirmed. Each is a per-pair fact with no per-pair surface.
Solution
One new screen-state, P7-S7 — the replication matrix — drilled into from the overview, and it is a projection. A
Replication…button beside Restore/Export on P7-S1 opens the standing dataset → target drill-down in place on the Backups tab. One parent row per dataset (the sender node named on the row — "from the gateway", "from rimu"), expanding (multi-open) into a nested per-target table: per-pair reachability, last verified snapshot, size on target, snapshots held, and doors to the pair's run log (→ P7-S3) and to retrying a failed copy (the S3 inline-retry precedent).The matrix mints no second truth: ADR 0079's backup orchestrator seam already carries the per-target facts (per-target outcomes, verification, the coverage counting rules), and S7 fans them out per (dataset, target) pair. S1 aggregates what S7 itemises — a dataset's last good is the max over its pairs' last verified snapshots, its verified copies count is its count of current pairs — and S3 explains it, each pair linking to its run log rather than restating run rows.
Every honesty rule carries over whole: a run that didn't happen is stale — a failure, not an absence, worn at the loudest available weight (DDR 0083 §1); a failed copy is named and retryable (§2); an unreachable target's last-known figures render labelled last known and are never counted as current — never a stale-green cell (§3); a gone target's copies leave counted coverage at once and its row routes to the policy's gone-target state (P7-S2x); a not-backed-up-yet dataset shows its drafted targets (DDR 0085 — the matrix exists before the operator acts), never a blank row. The kit compiles no red: wireframe
{ok, warn, bad}grades to{healthy, warning, warning}exactly asBackupsOverviewScreenalready does, withbaddistinguished by weight and copy, never an invented red. The prototype's third sender gradedowndoes not exist here: a sender that stops running its schedule manifests as stale, and the device's own down-ness stays monitoring's classification (ADR 0070/0081) — alerted through P5, linked, never duplicated as a second device-health verdict.User Stories
A — Entry and placement (edges P7-S1 → S7, S7 → S1)
As an operator, I want a replication door on the Backups overview, so that the fan-out behind the coverage map is one click away.
Replication…control (data-action="open-replication") is offered beside Restore… and Export a dataset…, and activating it opens P7-S7 (edge S1 → S7).As an operator, I want the matrix to say what it is, so that I never mistake it for a second source of truth.
DATASET → TARGETand statingPROJECTION — RUNS & VERIFICATION ARE THE SOURCE, and the screen offers no verb that changes policy or coverage — its only acts are the pair-level doors (runs, retry, confirm-policy, replace) that route to their owning screens or act through the seam's existing verbs.B — Parent rows: dataset-centric, the sender named (DDR 0205 §Organization)
As an operator, I want one row per dataset with its sender named, so that "which node sends what where" reads off the same axis the coverage map already uses.
data-field="replication-matrix") carries the columnsDATASET,REPLICATION,LAST RUN,TARGETS CURRENT,ON TARGETSplus the chevron column, and renders one parent row per dataset (data-field="matrix-row-<id>") with the dataset name and its sender node as the row's hint ("from the gateway", "from rimu").As an operator, I want rows to expand into their targets, several at once, so that I can compare two datasets' fan-outs side by side.
data-action="toggle-<id>"), Then the nested per-target table (data-field="targets-<id>") renders beneath it and the chevron flips ▸ → ▾; activating again collapses it.As an operator, I want each dataset's replication summarised on the parent row, so that a healthy fan-out is one glance.
✓ replicating(data-status="replicating", wireframe toneok→ kit healthy), LAST RUN carries the run's relative moment, and TARGETS CURRENT readsn of n.1 of 2 current(data-status="target-behind", tonewarn→ warning) — and TARGETS CURRENT carries the same n-of-total count; a pair is current exactly when its latest scheduled snapshot verified on that target (CONTEXT.md), as the seam rules it — the screen counts nothing.As an operator, I want the summed size across targets on the parent row, so that I can see what a dataset's replication footprint is. (gate 2 — see Further Notes)
—, never0(absence is not zero).C — Pair rows: the nested per-target table (DDR 0205 §Fields)
As an operator, I want each pair's facts in one row, so that "how safe is this copy" needs no reconstruction from run logs.
TARGET,REACHABILITY,LAST VERIFIED SNAPSHOT,SIZE ON TARGET,SNAPSHOTS HELDplus an actions column, and renders one row per (dataset, target) pair (data-field="pair-<dataset>-<target>") — the target a fleet node or the offsite, named in the operator's terms.✓ reachable(data-status="reachable"), LAST VERIFIED SNAPSHOT carries the verified moment (✓ last night 02:00), and SIZE ON TARGET / SNAPSHOTS HELD carry the seam's per-pair figures.As an operator, I want each pair to link to its run history, so that the matrix explains itself through the run log rather than restating it.
runs…door is offered emitting the existingopen-runs-<datasetId>intent, landing on that dataset's P7-S3 runs & verification screen (edge S7 → S3) with back returning to the matrix.As an operator, I want a failed copy retryable from the matrix, so that closing a gap doesn't mean leaving the screen that named it.
retry this copy(data-action="retry-pair-<dataset>-<target>"), acting through the seam's existing per-target retry verb (the S3 inline-retry precedent — the sameTargetRetryClientface, no new verb).D — The honest states (DDR 0083 / 0085 carried whole)
As an operator, I want a dataset whose run didn't happen to be loud, so that the most dangerous backup failure — the one that makes no noise — cannot hide in a matrix of greens.
badweight (data-status="stale") with the failure named in copy — "stale — due 02:00, no run completed" — and LAST RUN states the honest relative age ("2 nights ago"). (gate 3 on the pill weight — see Further Notes)ageing(data-status="ageing",warn) with "no run since …" named — reachability and recency stated as two separate facts, and no pair renders current while the run didn't happen (no stale-green).As an operator, I want an unreachable target's record kept but never trusted, so that old copies cannot impersonate current ones.
✕ unreachable(data-status="unreachable",badweight, warning tone in product), LAST VERIFIED SNAPSHOT states the last-known moment with "not counted while unreachable", and SIZE ON TARGET / SNAPSHOTS HELD render their figures explicitly labelled last known — never as current figures.1 of 2 current), and the row offers bothretry this copyandruns….As an operator, I want a gone target routed to its fix, so that the matrix hands me to the screen that owns replacement.
open-gone-target-<datasetId>intent (edge S7 → S2x) — the matrix offers no replace verb of its own.As an operator, I want a not-yet-backed-up dataset present with its drafted targets, so that the matrix exists before I act (DDR 0085) and shows me what confirming would create.
not backed up yet(data-status="not-backed-up-yet",warn) with—in LAST RUN and ON TARGETS, and expands into its drafted targets — each marked drafted with its recommendation reason ("drafted — zone spread", "drafted — offered"),no snapshots yet(data-status="no-snapshots-yet", muted) in LAST VERIFIED SNAPSHOT, and0snapshots held.not configured(data-status="not-configured", muted) — a stated fact, not a fault.confirm policy…door (data-action="confirm-policy-<dataset>") emits the existingopen-policy-<datasetId>intent, landing on P7-S2 — confirming stays the policy screen's act.As an operator, I want the matrix to name what needs attention, so that the screen tells me rather than waiting to be asked.
data-field="matrix-attention") beneath the matrix names each condition in plain words — the dataset, the target, what happened — and states that monitoring alerted (P5-S2); the callout links, it does not re-notify.E — One truth, one tone (DDR 0205 §Projection / §No-red)
As a maintainer, I want the matrix and the overview provably consistent, so that two Backups screens can never disagree about a dataset's safety.
As a maintainer, I want the no-red rule and the no-
downrule encoded, so that the matrix speaks the tab's existing language.{ok, warn, bad}→{healthy, warning, warning}(theBackupsOverviewScreenprecedent):badis told apart by weight and named copy, and no red/destructive token is emitted anywhere in the rendered CSS — the destructive palette stays reserved for destructive confirms (ADR 0060 family).downgrade and no device-health verdict of its own — the dataset manifests as stale (a failure, not an absence) and device down-ness stays monitoring's classification (ADR 0070/0081), alerted through P5.As an operator, I want a failed matrix read to be an honest state, so that failure is never a blank pane.
As an operator, I want the matrix current when I return to it, so that acting elsewhere shows up here.
Implementation Decisions
Seam — the ADR 0079 backup orchestrator seam grows one read; no new seam
backuporchestrator (ADR 0079 — the single test seam) already owns per-target outcomes, verification promotion, the coverage counting rules, target inventories and drafted policies. It gains one read: the replication projection — the standing per-(dataset, target) fan-out. The control-plane handler stays a thin projection over the orchestrator, re-deriving nothing, mapping faults to the shared Problem body, exactly as the existing Backups routes do. Rejected: any second store or collector of per-pair facts — the matrix is a projection, and a projection with its own source is a second truth.replicating/target-behind/stale/not-backed-up-yet), the last-run relative label, targets-current n and total, the summed on-targets size label — and its pair rows: target field and name, drafted flag with reason, the pair-level state as a named state (reachable/unreachable/ageing/no-snapshots-yet/not-configured/gone), the last-verified-snapshot label, size-on-target and snapshots-held labels each with a last-known marking where the target is unreachable, and whether the pair is retryable. The seam words every label and decides every state; the screen renders verbatim and computes nothing (ADR 0097) — this is what makes stories 10–13 checkable rather than front-end discipline.TargetRetryClientface, exactly as S3's inline retry does.runs…emitsopen-runs-<datasetId>,confirm policy…emitsopen-policy-<datasetId>, a gone pair emitsopen-gone-target-<datasetId>— all three already parsed and composed by the Backups surface. S7 mints one intent of its own:open-replication(S1 → S7), handled inside the surface like open-restore/open-export.Surface
open-replicationintent only emits out — the existing progressive-composition pattern.data-field/data-action/data-statustoken is the built contract, carried fromp7-s7-replication-matrix.htmlsodesign-verifycan check the shipped UI — with the two wireframe deviations ruled below (Further Notes: found inconsistencies): pairruns…actions emit the houseopen-runs-<datasetId>intent, and the gone-pair row's tokens are spec-defined (data-status="gone") because the frame depicts no gone pair.--oc-*tokens; the tab keeps the pill vocabulary — DDR 0202's LED-dot primitive is deliberately not used here (one health glyph per tab).Testing Decisions
A good test states externally-observable behaviour at a seam and never reaches into implementation detail. Two seams, both pre-existing — this spec adds no new seam class:
data-field/data-action/data-statuscontract: the parent columns and dataset states, multi-open expansion, every pair state (current, ageing, unreachable-with-last-known-labelled, gone-routes-to-S2x, drafted, not-configured), the n-of-total consistency between pill and cell, retry re-reads and renders the seam's next answer,runs…lands on the composed S3 and back re-reads, the attention callout's presence and absence, the S1 entry button, the no-red mapping, and the failed-read error state. Prior art:backupsOverview.test.ts,backupRuns.test.ts,backupPerTargetHonesty.test.ts,backupsSurfaceGuard.test.ts; the fake grows from the existing backups fake so its default fleet stays the wireframes' fleet.replicatingwith the right n-of-total and summed size; a missed cycle projectsstalewith reachable pairsageingand none current; an unreachable target's pair carries last-known figures marked as such, excluded from the current count; a gone target's pair projectsgonewith its figures out of every count at once; an unconfirmed dataset projects its drafted targets with reasons, never an empty pair list; and the S1 coverage projection and the S7 replication projection computed from the same facts agree (last good = max over pairs, verified copies = current-pair count — story 15 as an executable property). Prior art:coverage_test.go,pertarget_test.go,rebuild_test.go.0), and a faulted read maps to the shared Problem body. Prior art:backupsLive.test.tsand the existing backups control-plane integration tests.Cross-cutting: the theming-contract check (every new visual is an
--oc-*token, ADR 0122) and a rendered-CSS assertion that no red/destructive token is emitted by any matrix grade ride the existing harnesses.Out of Scope
Replication…button.downgrade, no device-health verdict — down-ness stays monitoring's (ADR 0070/0081), linked never duplicated. The sibling network surface (#761) owns reachability observability between devices.ui-kit:telemetry-primitives); this surface uses the tab's existing pill vocabulary and consumes nothing from that slice — deliberately noOcStatusDothere (one health glyph per tab, DDR 0205).Further Notes
Vertical slices (named for the fan-in
/slice-map)backup:replication-projection— the orchestrator's replication read: per-(dataset, target) states, labels, counts and the S1-consistency property. Depends on nothing new.transport:backups-replication— the route on the existing seam: OpenAPI, handler, generated client, the live-client face. Depends on 1.shell:replication-matrix— the P7-S7 screen, the surface wiring (open-replication, back-re-reads, retry, the three reused routing intents) and S1's entry button. Depends on 2.Cross-arc note for the fan-in: no dependency on #769's kit slice — this sibling deliberately consumes the tab's existing pill vocabulary, so it can land before or after the rest of the arc. The only cross-feature edges are the ones the flow already draws (S7 → S3, S7 → S2x, monitoring's P5 linkage), all built.
The DDR's three open gates (veto-open, not blocking — ADR 0174)
DDR 0205 is
acceptedwith three decisions held open for Ben; each has a proposed default this spec is written against (the #769 ruling-1 precedent — the spec proceeds on the DDR defaults, the veto is asynchronous), and none is dependent on any other:Replication…outline button beside Restore/Export, shipped in the amended S1 frame; alternative: dataset rows click through to S7). A veto swaps story 1's affordance for row-level entry — but S1's rows already open their policy, so the row-click alternative would also reassign an existing affordance; the button is the smaller contract. Everything from story 2 on works identically.badpill weight (default: yes — S1's own stale precedent, both grading to warning in product). A veto demotes the pill weight in story 10's first Then clause towarn; the copy, the ageing pairs and the no-stale-green rule stand regardless.No gate changes the seam, a state, or a count — which is why all three slices can proceed without waiting.
Found inconsistencies, ruled here (report carried from the design read)
runs…action ids collide with the built intent grammar. The frame writesopen-runs-identityon one pair butopen-runs-identity-offsite/open-runs-git-totaraon others; the built surface parsesopen-runs-<rest>as a dataset id, so a verbatimopen-runs-git-totarawould route to a dataset named "git-totara". Ruled: S3 is per-dataset, so every pair'sruns…door emitsopen-runs-<datasetId>; per-pair element uniqueness lives indata-field="pair-<dataset>-<target>". The frame's suffixed variants are depiction uniqueness, not contract.data-status="gone"at thebadweight with its route emitting the existingopen-gone-target-<datasetId>intent, following the frame's conventions; the frame owes a✎gone-pair row in the commit that implements slice 3 (ADR 0042 discipline).confirm policy…door is in the frame but absent from DDR 0205's action list (which names only runs/retry). Kept: it is DDR 0085's posture (the drafted state leads to confirming) and routes through the existingopen-policy-<datasetId>intent — no new verb.Implementation-time notes
admin.example.nz/backups/replication) is the P7 frames' depiction convention (S3's shows/backups/photos); the built tab has no sub-routes — S7 mounts in place and the URL stays the tab's (story 1).CONTEXT.mdrules the copy: replication matrix (never backup matrix or sender/destination matrix), current for a pair (never up to date or in sync), size on target / snapshots held (never repo size), backup target (never destination). Last known is a label on figures, never an omission of them.matou-distributed-serversBackupMatrix.vue) is a reference for the expandable-matrix mechanics only; nothing visual transfers (ADR 0122), and its env-deriveddest_*topology, host-centric parents, LED dots andup/stale/downtriad are all explicitly rejected by DDR 0205.Produced by
/to-specin an unattended session under ADR 0174 (two-way-door posture — Ben's veto is asynchronous, never blocking). Advances #762.Withdrawn — race duplicate. The interactive session drafted this in parallel while asleep mid-claim; the session-runner overrode the stale claim (its 05:33Z comment on #762) and published the canonical spec #793, which the slice-map fan-in (#770, commit
44cd080,docs/slices/observability.yaml) and/to-ticketshave already consumed. This duplicate is closed in #793's favour. Any materially unique findings from this draft are being transferred to #793 as comments.