backups: policy-confirm-and-edit — confirm the drafted policy, then edit it #86
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.
Blocks
Depends on
Reference
Matou/idss#86
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
Feature spec: #20 (backups).
What to build
The policy screen (P7-S2) where the operator turns the drafted recommended policy into a dataset's confirmed backup policy and, later, edits it. Confirming is a single act: the drafted policy (nightly 02:00, 30-day retention, recommended targets) becomes the dataset's confirmed policy and scheduled runs begin — the system recommends, the operator confirms; advice never veto (DDR 0085). Target recommendations are drawn from fleet topology with zone spread: each recommended target shows its reason, and both a cross-device and an offsite target are recommended where the fleet allows (ADR 0079/DDR 0085). An intermittent-tagged helper is offered only as an additional copy with its candid status shown, never as a dataset's sole target (DDR 0085). Encryption is shown as "Encrypted — always" — a fact with no toggle; snapshots are encrypted with keys in the community's crown-jewel secret store, so offsite holders only ever hold ciphertext (DDR 0085/ADR 0082).
Editing keeps the defaults a starting point, not a cage: changing a dataset's frequency, retention window, or targets saves to the policy and takes effect on the next scheduled run. Policy commits ride the existing clan Config hatch — no new seam amendment — and the policy is homed in the config repo (versioned; the operator app's replica means Tier-1 rescue already holds the arrangements, ADR 0082). Every policy confirm and edit lands a structured entry in the standing logging pipeline, attributed to the acting operator and drillable from the overview (ADR 0027).
Notes: the Identity dataset is in the drafted default policy from day one (ADR 0078) — a founding-seeded runtime coupling to members, not a build edge. This slice carries one open human decision — the offsite pairing mechanism (see below) — which does not block building the confirm/edit path against operator-supplied and node targets.
Acceptance criteria
Blocked by
Task manifest
clanpackage + fake adapter behind DDR 0010Triage: routed
ready-for-humanJudgement call, not a spec gap: the ticket body names its own open decision — "This slice carries one open human decision — the offsite pairing mechanism." The confirm/edit path against operator-supplied and node targets, the zone-spread recommendation logic, the intermittent-helper handling, and the always-encrypted framing (DDR 0085) are all fully specified and buildable now.
What needs deciding: the offsite pairing mechanism — whether an offsite backup target is a partner-community pairing, and/or a Matou-brokered offsite target, and on what terms. This determines what a recommended offsite target actually is in the UI, which is a partnership/commercial arrangement outside this agent's authority to invent.
Not blocking: per the ticket, this decision "does not block building the confirm/edit path against operator-supplied and node targets" — the agent can build the full policy screen now; wiring the offsite-target source waits on the human call.
Human decision: offsite pairing mechanism (resolves
needs_human_decision)Ruled by Ben, 2026-07-25. The ticket moves to
ready-for-agent.Offsite target = the community's own devices, in another location; Matou as fallback
Primary offsite mechanism — intra-community. An offsite backup target is a device in the community's own clan located at a different place from the dataset's home node. Offsite is achieved internally: at least one community device in a different location, surfaced through the existing zone-spread recommendation (ADR 0079 / DDR 0085). Partner-community pairing is not needed and is dropped — no community-to-community pairing mechanism at v1.
Matou-brokered fallback. If the community has no offsite-located device provisioned as a backup target yet, the recommendation offers a Matou-brokered offsite target as the fallback, so day-one fleets still get an offsite ciphertext copy. Once the community provisions its own offsite device, that becomes the recommended offsite target (the Matou target is the stopgap, not the default).
Terms of the Matou fallback — same commercial model as #39 (see the decision comment on #39): Matou absorbs the underlying provider storage cost and re-bills the community at 100% margin (2× cost), monthly via Stripe, under the same drafted ToS family as the server broker (⚠ same legal-review gate before real payments). Matou only ever holds ciphertext (ADR 0082), same as any offsite holder.
Build note: in the target-recommendation UI this means the "offsite" slot is filled by (a) a community device tagged with a different location/zone when one exists, else (b) the Matou-brokered target with its price and "your community's own offsite device will replace this" framing. The fake fleet-state provider in the seam should cover both cases.
Done in
023ef69(onorigin/main).Seam —
internal/backup/policy.go(7 Go tests,policy_test.go): the P7-S2 face of thebackuporchestrator.PolicyView(dataset)composes the screen (drafted-or-confirmed frequency/keep/due,EncryptionFact"Encrypted — always" — a fact with no toggle, ADR 0082, and the recommended targets).RecommendTargetsdraws from fleet topology with zone spread — the first always-on candidate in a different building is the recommended cross-device copy, an offsite target recommended wherever the fleet allows (the only real coverage on a one-device fleet), each with its reason; an intermittent-tagged helper is additional-only, candid status shown, never a dataset's sole copy (DDR 0085 §5), read from a newZonefield onfleetstate.Device+ the uptime pattern.Confirm/Editare the operator's act: attribution mandatory (ErrUnattributed), committed to the config repo via a fakedPolicyStorecommit path (ADR 0082 — versioned, an edit a new commit), the in-memory policy the scheduler reads updated (scheduled runs begin / edit takes effect next run), and a structuredAuditEntrylanded in the standing logging pipeline attributed to the operator, drillable per dataset (ADR 0027).UI —
BackupPolicyScreen.vue(6 Vue tests,backupPolicy.test.ts): to the wireframe'sdata-field/data-action/data-statuscontract (frequency/keep selects, the encryption fact, target rows withtarget-selected/target-additional-only/target-unselected, confirm→save), composed underBackupsSurface(edges S1 → S2 / S1x → S2, back re-reads the overview).backups.tsgains the policy types +FakeBackupPolicyClient.All 6 acceptance clauses (stories 6, 7, 8, 9, 10, 32) covered. Full Go suite + all 344 dashboard tests green;
vue-tsc+ eslint + gofmt clean.Deferred (out of scope): the offsite pairing mechanism stays a human decision — built against operator-supplied + node targets per the issue note; scheduled runs & verification (stories 11–14) and the gone-target state (S2x) are their own slices.
deploy-files' switch stopsidss-control-plane, whose cgroup holds theclanCLI, andswitch-to-configurationdies at 101 before it ever restarts anything #858/run/current-system, so the deploy'sswitch-to-configuration bootcollides with the still-running switch and exits 11 #1009