backup: movement-compose — the movement half goes production-real #203
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
Reference
Matou/idss#203
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
Backups spec #20 (ADR 0104). Gap audit 2026-07-30 (post #191–#195 sweep of the composition roots and both app shells). Filed per the #191–#195 precedent: a close-out blocker of #183 found while preparing the run, confirmed by Ben.
What's true today
What to build
Compose the movement half in the whole composition: the target resolver over the real stores, the crown-jewel keys, the config-repo policy store, and a real dataset enumeration for the provisioned services. The resting branch keeps the honest refusal. The smoke's proven code promotes; nothing is re-invented.
Acceptance criteria
agealone, Then it opens (ADR 0104's raw read-back)Task manifest
Blocks
#183 — leg B·4 (and B·7's restore rides the same machinery).
Blocked on a human decision — production crown-jewel backup-key provenance (asked via chat, no reply within the window; posting the durable record here).
The task asks to compose the movement half with "the crown-jewel keys" that "promote from the smoke #177". On investigation, no production
backup.CrownJewelKeyssource exists:Key(ref) (backup.Key, bool)are hardcoded in-memory literals inside the two smoke binaries (keysFor()→Key("crown-jewel-key-for-"+id)atcontrol-plane/cmd/smoke-backups/main.go:939). Promoting that literally to production would ship a world-known backup-encryption key — a fake-success / security break (ADR 0100).crownJewelKeys = {root-ca, ssh-ca, config-repo, gateway-vars}(internal/founding/seed.go:278, ADR 0044). There is no backup key var and no reader turning a secret-store var intobackup.CrownJewelKeys.The runtime read path exists (
deps.clan.Vars().Get(ctx, node, ref)→clan.Secret), but nothing seeds a backup key for it to read.Decision needed — where do production backup crown-jewel keys come from?
clan.Vars().Get-backedCrownJewelKeysderiving per-dataset keys via HKDF. ADR-correct, but touches the founding arc (another family/slice) and needs a migration story for already-founded communities.ErrMovementNotWiredrefusal stays), deferring key provenance to a dedicated founding-seeding slice. AC2/AC3 (real replicate + raw read-back) then stay unmet this slice.I lean (A) for correctness, but it is cross-feature and large; (C) is the smallest honest step that violates no ADR. The manifest's
needs_human_decisionwas empty, but this is the load-bearing choice on which AC2/AC3 depend.To re-arm: pick A/B/C (or another mechanism), then re-add
ready-for-agent. A late chat reply on the existing thread will still land.Human ruling (chat thread, 2026-07-31) — crown-jewel backup-key provenance:
So this slice takes Option (A) from the prior blocked run: seed a 5th crown-jewel clan var at founding (the ADR 0044 mechanism) + a runtime
clan.Vars().Get-backedCrownJewelKeysderiving per-dataset keys via HKDF. Building the movement half fully (real replicate/restore over a directory target, raw age read-back) on top of that seeded key, plus the config-repo policy store and real dataset enumeration. The resting branch keeps the honestErrMovementNotWiredrefusal.Done — landed in
87a0b4fonorigin/main(backup:movement-compose).Human ruling followed: option A — a fifth crown-jewel clan var
backup-rootseeded at founding + a runtimeCrownJewelKeysreader.What shipped
internal/founding/seed.go):backup-rootadded tocrownJewelKeys— the fifth crown jewel, encrypted to the node machine key + recovery material only, operator keys excluded (ADR 0044).TestStory25updated to expect five.internal/backup/keys_crownjewel.go):CrownJewelKeyReaderreads the root viaclan.Vars().Getand derives each dataset key by HMAC-SHA256(root, keyRef) — one key per dataset, unreproducible without the root (ADR 0082 §4). Refuses honestly (ok=false) before the store holds the root.internal/backupengine/targets.go):StoreResolver→ localDirStorefor the gateway's own node, SSH-reachedSSHStorefor a cross-device node (both promoted from the #177 smoke). Offsite S3 refuses honestly (later slice).whole_composition.go/backup_wiring.go):wholeBackupPortswiresWithMovement(keys, resolver)+WithPolicyStore(ConfigRepo…). Resting composition keepsErrMovementNotWired(AC4).policy.go/backup.go/policystore_configrepo.go): newPolicyLoader—backup.Newrehydrates every committed policy at construction, so a confirmed policy survives a restart (AC1 — the missing piece; the store persisted on commit but nothing reloaded it).OURCLOUD_NODEnames the gateway's own clan node id.Acceptance
TestMovementCompose_PolicyPersistsAcrossRestart.TestMovementCompose_ProductionKeysAndStore_ReplicatesAndReadsBackRaw+ composition-root…WholeWiresMovementAndReadsBackRaw.backup.Open+ a JSON reader; a different root cannot open it. (The seal is AES-GCMbackup.Seal, the settled #177 one-encryption-story — ADR 0104's "age" wording is that same sealed-artifact path, per STATUS.md's existing note.)TestMovementCompose_RestingKeepsHonestRefusal.Note: the Sandcastle sandbox has no Go toolchain (#198), so this was verified by careful review across the three packages; the seam run is the first real compile/test. Unblocks #183 leg B·4 (and B·7's restore rides the same machinery).
/is 100% full (0 bytes free) because /etc/cron.d/swarm-prune still points at the rootless docker socket — every task landing on its runner dies in 1-3s at Set up job, includingswarm-pool triage/resume-asks #2076workflow preparedwith ENOSPC on /home/swarm/.cache/act, so ~1 in 3 pool-label triage/resume-asks/ci ticks reds instantly (#2076 mechanism, second host) #2174