backups: export-sovereignty-valve — take a dataset out of OurCloud, logged #93

Closed
opened 2026-07-25 04:59:46 +00:00 by ben · 1 comment
Owner

Parent

Feature spec: #20 (backups).

What to build

Export (P7-S6, DDR 0084) — the sovereignty valve. The community can take its data and go, dataset by dataset, with no one's permission. Choosing Export for a dataset takes a fresh snapshot, packages it, and downloads it from the dashboard as an archive (P7-S1 → S6, S6 → S1). Export changes nothing on the fleet: it touches no service data and no service is confirmed or changed — but it is still logged and audit-visible like every operation, because a copy of community data is leaving the fleet (ADR 0027). The backup orchestrator drives it through the port's snapshot verb; the packaged archive is the operator's to keep.

Acceptance criteria

  • (story 27) Given I choose Export for a dataset, when I run it, then a fresh snapshot is taken, packaged, and downloaded from the dashboard as an archive — the sovereignty valve.
  • (story 28) Given an export runs, then it touches no service data and no service is confirmed or changed, but the export is logged and audit-visible like every operation (a copy of community data leaving the fleet).

Blocked by

  • #88 — the snapshot/verb machinery an export rides

Task manifest

task: backups:export-sovereignty-valve
implements_flow: p7-backups
implements_edge: S1→S6, S6→S1
interface: backup orchestrator — export a dataset (fresh snapshot via the port's snapshot verb → package → download archive), touches no service data / confirms nothing, emits an audit entry attributed to the operator
wireframe: docs/ux/wireframes/p7-backups/p7-s6-export-a-dataset.html
seam: backup orchestrator seam tests (control plane, Go) — fake port snapshot verb, fake packaging/download, in-memory audit ledger; assert no service-data mutation
acceptance:
  - given: I choose Export for a dataset
    when: I run it
    then: a fresh snapshot is taken, packaged, and downloaded from the dashboard as an archive
  - given: an export runs
    then: it touches no service data and confirms/changes no service, but is logged and audit-visible
depends_on: [scheduled-runs-and-verification]
out_of_scope:
  - restore (stories 20–26) — the restore slices'
  - throttling / bandwidth shaping (out of scope)
needs_human_decision: []
## Parent Feature spec: #20 (backups). ## What to build Export (P7-S6, DDR 0084) — the **sovereignty valve**. The community can take its data and go, dataset by dataset, with no one's permission. Choosing Export for a dataset takes a **fresh snapshot**, packages it, and downloads it from the dashboard as an archive (P7-S1 → S6, S6 → S1). Export **changes nothing** on the fleet: it touches no service data and no service is confirmed or changed — but it is still **logged and audit-visible** like every operation, because a copy of community data is leaving the fleet (ADR 0027). The `backup` orchestrator drives it through the port's snapshot verb; the packaged archive is the operator's to keep. ## Acceptance criteria - [ ] (story 27) Given I choose Export for a dataset, when I run it, then a fresh snapshot is taken, packaged, and downloaded from the dashboard as an archive — the sovereignty valve. - [ ] (story 28) Given an export runs, then it touches no service data and no service is confirmed or changed, but the export is logged and audit-visible like every operation (a copy of community data leaving the fleet). ## Blocked by - #88 — the snapshot/verb machinery an export rides ## Task manifest ```yaml task: backups:export-sovereignty-valve implements_flow: p7-backups implements_edge: S1→S6, S6→S1 interface: backup orchestrator — export a dataset (fresh snapshot via the port's snapshot verb → package → download archive), touches no service data / confirms nothing, emits an audit entry attributed to the operator wireframe: docs/ux/wireframes/p7-backups/p7-s6-export-a-dataset.html seam: backup orchestrator seam tests (control plane, Go) — fake port snapshot verb, fake packaging/download, in-memory audit ledger; assert no service-data mutation acceptance: - given: I choose Export for a dataset when: I run it then: a fresh snapshot is taken, packaged, and downloaded from the dashboard as an archive - given: an export runs then: it touches no service data and confirms/changes no service, but is logged and audit-visible depends_on: [scheduled-runs-and-verification] out_of_scope: - restore (stories 20–26) — the restore slices' - throttling / bandwidth shaping (out of scope) needs_human_decision: [] ```
Author
Owner

Done in d5b9852 (on origin/main).

Export — the sovereignty valve (P7-S6, DDR 0084 §4). Orchestrator.Export(actor, datasetID) (internal/backup/export.go) takes a fresh snapshot via the port's snapshot verb (ADR 0080), packages it through the new Packager port into a portable Archive (name · size · download handle), and returns it for the dashboard to download (story 27).

Changes nothing on the fleet (story 28): unlike a scheduled run it does not record the snapshot, verify it, promote to last good, count in coverage, arm a schedule, confirm a policy, or publish a fault — the seam proves Overview() is byte-identical before/after and no verify verb runs. It still lands a structured audit entry attributed to the operator (not the scheduler), because a copy of community data is leaving the fleet (ADR 0027). Attribution is mandatory (ErrExportUnattributed); a failed packaging surfaces and logs nothing.

UI: BackupExportScreen.vue (P7-S6) composed under BackupsSurface (edge S1→S6, back S6→S1) — the LOGGED · AUDIT-VISIBLE chip, the dataset picker (export-dataset), the fresh-snapshot / packaged-archive stages (export-stages), the no-confirm note, and Download (download-export). New BackupExportClient + FakeBackupExportClient in dashboard/src/lib/backups.ts.

Tests: 6 Go seam (internal/backup/export_test.go) + 6 Vue (dashboard/tests/unit/backupExport.test.ts); full Go suite + 354 Vue tests green, vue-tsc + eslint clean. Out of scope (untouched): restore (stories 20–26), throttling/bandwidth shaping.

Done in d5b9852 (on origin/main). **Export — the sovereignty valve (P7-S6, DDR 0084 §4).** `Orchestrator.Export(actor, datasetID)` (`internal/backup/export.go`) takes a **fresh snapshot** via the port's snapshot verb (ADR 0080), packages it through the new `Packager` port into a portable `Archive` (name · size · download handle), and returns it for the dashboard to download (story 27). **Changes nothing on the fleet (story 28):** unlike a scheduled run it does not record the snapshot, verify it, promote to last good, count in coverage, arm a schedule, confirm a policy, or publish a fault — the seam proves `Overview()` is byte-identical before/after and no verify verb runs. It still lands a structured audit entry **attributed to the operator** (not the scheduler), because a copy of community data is leaving the fleet (ADR 0027). Attribution is mandatory (`ErrExportUnattributed`); a failed packaging surfaces and logs nothing. **UI:** `BackupExportScreen.vue` (P7-S6) composed under `BackupsSurface` (edge S1→S6, back S6→S1) — the `LOGGED · AUDIT-VISIBLE` chip, the dataset picker (`export-dataset`), the fresh-snapshot / packaged-archive stages (`export-stages`), the no-confirm note, and Download (`download-export`). New `BackupExportClient` + `FakeBackupExportClient` in `dashboard/src/lib/backups.ts`. **Tests:** 6 Go seam (`internal/backup/export_test.go`) + 6 Vue (`dashboard/tests/unit/backupExport.test.ts`); full Go suite + 354 Vue tests green, vue-tsc + eslint clean. Out of scope (untouched): restore (stories 20–26), throttling/bandwidth shaping.
ben closed this issue 2026-07-26 01:23:18 +00:00
Sign in to join this conversation.
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.

Reference
Matou/idss#93
No description provided.