backups: rebuild-from-nothing-property — offsite ciphertext survives a total loss #94
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.
Depends on
Reference
Matou/idss#94
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 disaster-survival contract, asserted as harness properties rather than a screen (no wireframe): every backup artifact is shaped so a total loss is genuinely recoverable with no step consulting infrastructure that burned down (ADR 0082). Offsite copies are ciphertext only: in a rebuild-from-nothing, the recovery kit / combined shares yield the crown jewels → the config repo comes back → the restored policy names the offsite target → the target's self-describing inventory lists the snapshots → the crown-jewel keys decrypt them → every dataset restores, and the offsite host can never read the data (story 29). Run history and coverage are re-derivable, not durable: losing the gateway never means losing the backups' truth — when the gateway is rebuilt the run ledger and coverage map are recomputed from policy (config repo) + target inventories (targets, where "last good" and verification results travel) + per-service health, never a gateway-local table (story 30).
This slice builds the artifact shapes and the properties that guarantee them — the encryption boundary, the self-describing target inventory, the re-derivable projection — and the harness that asserts them. The running rebuild engine is rescue's; this slice's obligation is that every artifact rescue's Tier-3 ceremony consumes exists with these rebuild-from-nothing properties. Notes: the kit-held keys live in the crown-jewel secret store seeded at founding (ADR 0044/0082) — a runtime coupling, not a build edge; consumed by rescue:tier3-ceremony (artifacts + properties only).
Acceptance criteria
Blocked by
Task manifest
Done in
bf09e7e(onorigin/main).The disaster-survival contract shipped as harness properties (no screen — engineering slice), in
internal/backup/rebuild.go+rebuild_test.go:Seal/Open(AES-GCM) put a snapshot on a target asCiphertext— sealed bytes + a key ref, never the key. Keys live only in the crown-jewel store (CrownJewelKeys, seeded at founding, ADR 0044/0082). TestTestOffsiteHolderSeesOnlyCiphertextproves an offsite holder holds ciphertext it can never read; only the crown-jewel key opens it.TargetInventory/InventoryMomentcarry datasets, moments, verification results and the ciphertext;Orchestrator.InventoryFor/SealedInventoryForemit it from real run state. Last good + verification results travel in the inventory, not a gateway-local table.RebuildFromNothing(kit, inventories)walks recovery kit → crown jewels → config-repo policy names the offsite target → self-describing inventory lists the snapshots → crown-jewel keys decrypt → every dataset restores.TestTotalLossDecryptChainRestoresEveryDatasetrestores every dataset from artifacts alone (no gateway); without recovered crown jewels the same inventories restore nothing.TestRebuildErrorsRatherThanSilentlyLosingADatasetproves a broken rung errors, never silently drops a dataset.Rederive(fleet, ports, clock, policies, inventories)recomputes ledger + coverage from policy + target inventories + per-service health only (coalescing a moment seen on several targets into one run).TestGatewayRebuildRederivesLedgerAndCoverageasserts the re-derivedOverview()/RunsView()read identically to the live gateway — no durable gateway table.Out of scope, unchanged: the running Tier-3 rebuild engine is rescue's (consumes these artifacts); a run/coverage DB as durable state stays rejected (ADR 0082). 5 Go property tests + existing 8 run tests green;
go vet+gofmtclean. STATUS.md updated (header + milestone log).