backups: the two Take-a-copy exports have no packer — stack-config + community-data endpoints, and stackExport wired in production #1429
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1429
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
Control-panel UI pass (Ben, 2026-09-10 → 09-12, commit
078cd5b3onfounding-ui-two-colour-rail-ceremony, merged to main 2026-09-12). Filed from the end-of-pass review (#1399 sweep): every place the shipped UI shows or implies something the product does not do yet. Browser harness:cd dashboard && pnpm harness→http://localhost:5198/panel.html?scenario=steady&tab=<tab>.What the UI shows
Ben's 2026-09-12 ruling: the Backups tab carries Download stack config and Download community data, each opening a dialog (
dashboard/src/components/backups/DownloadBundleDialog.vue) that lists what the bundle holds, then Download / Cancel. Contract:dashboard/src/lib/stackExport.ts—StackExportClient { manifest(kind), pack(kind) }for'stack-config'and'community-data'; the dialog paints ONLY what the manifest says, so it cannot promise what the packer will not pack.What exists
productionDashboardDeps(dashboard/src/lib/mountRegistry.ts) omitsstackExport, so the whole "Take a copy with you" block does not render live (BackupsOverviewScreen.vuev-if="stackExport").dashboard/tests/fakes/stackExport.ts— it emits a JSON index of fixture facts (its own note admits it is the index of the archive a real packer would ship).clan/configrepo.go(clan config),fleetstate/projection.go(devices),provision/assess.go+ the catalogue (service selection),brandkit/kit.go,controlapi/settings.go:224(community settings), the backup policy store,internal/member. Community data would ride the backup engine's packager (ADR 0104) plus/logs/download/{scope}.WithPackagerunwired).Why human — one-way door
The stack-config bundle is "everything needed to rebuild/redeploy the stack" (Ben's words). Taken literally that includes clan secrets and vars (mesh keys, IdP admin, DB passwords). A downloadable file holding those is a security-posture decision.
Proposed default ruling: the stack-config bundle carries clan config, the device ledger (name/kind/location/roles), the service selection and placement, the brand kit, community settings, the backup policy and the member/komiti roster — and no secrets: secrets are referenced by name and restorable from the recovery kit (DDR 0101) so the two artifacts together rebuild the stack and neither alone leaks it.
community-datastreams a tar (files, service DB dumps, logs) through the ADR 0104 packager with the same encryption the offsite copies use. Format version stamped; arebuild.mdinside explains the order of steps.What to do (after the ruling)
GET /export/{kind}/manifestandPOST /export/{kind}(or a streamed GET) in openapi +controlapi; the manifest is computed from the same reads the pack uses.HttpStackExportClientindashboard/src/lib/api/, wired inproductionDashboardDeps;pack()returns anhrefthe browser can fetch (large archives never buffered in JS).Acceptance criteria
dialogstate, the Overview's device/System/service/members rows, the sidebar chrome — unit debt from Ben's 2026-09-10/11 UI pass #1399Ruled 2026-09-12 — KEEP, rescoped to the no-secrets default (Ben deferred the call to the session: "the purpose was something the operator could use to rebuild the stack if ever needed, but since the recovery kit is being worked on this can be discarded unless you think it's worth keeping both"). Ruled by agent under ADR 0174 — veto anytime.
Worth keeping both, because they answer different questions:
rebuild.mdthat says which order to do it in and where the kit fits;So: the proposed default in the body stands (no secrets in
stack-config;community-datathrough the ADR 0104 packager with offsite-grade encryption; format version +rebuild.md). Depends on #1428 only for the sentence inrebuild.mdthat names the kit. Relabelledready-for-session: step 1 is an ADR recording the two bundle shapes (design-tier, a session), steps 2–3 (Go endpoints +HttpStackExportClientwired inproductionDashboardDeps) can then goready-for-agent.Session ruling (ADR 0174 — veto anytime). Adopting the no-secrets default Ben confirmed above and beginning the two-way-door work. Scope, split by what is revertible + provable in one session:
stack-config; sealedcommunity-data).stack-config— full, live, proven. A real packer assembles the blueprint (clan definition, device ledger, service selection + placement, brand kit, community details, backup policy, member/komiti roster) into a portable tar with arebuild.mdand a stampedformatVersion, carrying no secret material — secrets are referenced by name and restored from the recovery kit (#1428, DDR 0101), named inrebuild.mdas the other half.GET /export/{kind}/manifest+POST /export/{kind}+ a streamed download route, modelled on the #1430 mint-token/serve-by-TTL packager.HttpStackExportClientwired inproductionDashboardDeps. This satisfies AC1 + AC2.community-data— honest fail-loud, not a fabricated success. The ruling requires it sealed with offsite-grade encryption (ADR 0104's age-sealed artifacts + service DB dumps +/logs/download). Shipping it unsealed would put member content in plaintext in a browser download — a security-posture decision I will not make unilaterally (one-way door). Wiring the full sealed multi-dataset packer end-to-end is a larger slice than one session can prove. Socommunity-data's pack refuses with a clear named reason (the same fail-loud discipline #1430's resting composition uses forErrNoPackager), which drives the dialog's download-failed state honestly (AC3 — "a resting or faulted packer … never a silent empty file"). A follow-up issue will carry the sealed packer.Proof: red-green Go seam + controlapi integration test (pack over HTTP → ref serves the tar off the real route → expires), dashboard seam + live-fetch tests;
go build/vet/test, dashboardvitest/vue-tsc, openapicheck:client. All revertible (a new on-disk packager + additive routes/field), no product loss on revert.Close report — landed (ADR 0174, veto anytime)
Commits:
f291b54(the feature) +713f5cc(an incidental gate fix — see below). Both onmain.What landed
ADR 0242 records the two bundle shapes.
stack-config— the BLUEPRINT, live and proven (AC1 + AC2):internal/stackexport.Store— a domain-free packager (injected read-funcs → plain fact DTOs) assembling the clan definition, device ledger, service selection + placement, brand kit, community details, backup policy and member/komiti roster into a portable.tar(stack-config.json,formatVersionstamped, a curated projection — never a raw inventory dump; +rebuild.md), served by an opaque handle under a 1h TTL (the #1430 mint-token/serve pattern).cautionandrebuild.mdname the kit as the other half. A Go test fails on key-material markers in the archive.GET /export/{kind}/manifest,POST /export/{kind},GET /exports/{ref}(openapi +controlapi.WithStackExports/registerStackExports).HttpStackExportClient(dashboard/src/lib/api/stackExportClient.ts) wired REAL inproductionDashboardDeps.backups.stackExport;pack()returns anhrefoff/exports/{ref}the browser fetches (large archives never buffered in JS). The "Take a copy with you" block now renders live.community-data— honest fail-loud (AC3): its sealed multi-dataset packer (ADR 0104 age-sealed artifacts + service-DB dumps + a log archive) does not exist yet — the backup engine packages one locally-readable snapshot at a time today and there is no log-archive primitive. So it 501s with a named reason (ErrCommunityDataUnavailable), which the dialog reads out as its download-failed state — never a fabricated archive and never unsealed member content in a browser download (ADR 0100; the same discipline #1430's resting composition uses forErrNoPackager). Follow-up filed: #1457.Proof (red→green)
internal/stackexport— manifest counts + names the recovery kit; archive matches the manifest and carries no secrets; community-data refuses; TTL expiry.internal/controlapi/stackexport_test.go— manifest → pack → the ref serves the tar off the REAL route (application/x-tarattachment); community-data 501; unknown kind/ref 404.dashboard/tests/unit/stackExportLive.test.ts— manifest over real HTTP; browser-fetchable href off/exports/{ref}; community-data refusal surfaces the packer's sentence; production wiring is the real client.go build ./...,go vet,go test ./internal/stackexport/ ./internal/controlapi/ ./control-plane/...green; dashboardvue-tsc+ fullvitest(129 files / 1635 tests) green; openapicheck:clientin sync.Incidental gate fix (
713f5cc)The pre-push TS lint gate (#1252) blocked on ~2,341 eslint errors — all in
result-payload/(the closure-build payload's minifieddashboard/assets/*.js), a gitignored build artifact eslint's flat config didn't ignore. Added**/result-payload/**to the ignore list — the same documented class/cause asdist-electron/dist-keriweb/dist-packagealready listed there (#871, #1352). Not #1429's feature, but it stood between the work andmain.Scope note
The two acceptance criteria that require a working download (AC1, AC2) are met by
stack-config; AC3 (a resting/faulted packer shows the failed state, never a silent empty file) is met bycommunity-data's honest 501. The sealedcommunity-datapacker is #1457.Ruled by agent under ADR 0174 — veto anytime (two-way door: a revertible on-disk packager + additive routes + a nil-at-rest seam; no product loss on revert).