idip: identity-dataset-backup — the identity dataset: quiesce-then-copy, atomic with the roster #783

Closed
opened 2026-08-25 04:27:20 +00:00 by ben · 3 comments
Owner

Parent

Feature spec: #767 (idip; wayfinder map #725).

What to build

The community identity as one backup dataset (ADR 0201): the keria adapter's port declares a single dataset — the whole keripy root plus the witness's own state dirs ("the more precious copy") — member keys are NOT in it (client-side, passcode-derived). Backup is quiesce-then-copy: LMDB is single-writer, so the run stops the keria + witness units, snapshots, restarts — seconds of sign-in blip recorded honestly in the backup ledger (ADR 0083). The control-plane members roster snapshots atomically in the same quiesce window: a roster/TEL mismatch after restore would make IsIssued lie to the bridge, and a stale-agent-vs-fresher-witness restore is the KERI duplicity trap — one window removes both.

Acceptance criteria

  • (story 33) Given an IDIP community, when the backup engine enumerates datasets, then the identity dataset appears, port-declared, covering keripy root + witness state and nothing client-side.
  • (story 33) Given a backup run, when it executes, then units quiesce → snapshot → restart, and the ledger records the blip honestly.
  • (story 33) Given the same run, then the roster snapshot is taken inside the same quiesce window — never separately.

Blocked by

  • #775 — idip:keria-adapter-core
  • engine-adapters:backup-engine-exec (done — satisfied)
  • backups:coverage-map-and-first-run (done — satisfied)

Task manifest

task: idip:identity-dataset-backup
interface: 'the keria adapter''s dataset declaration on the backup engine''s port: keripy root + witness
  state, quiesce-then-copy execution, roster snapshot in-window, honest ledger blip'
seam: 'backup dataset port tests (smoke-backups pattern) against the real packaged stack: dataset declared;
  quiesce window proven (units stopped during snapshot); roster atomicity (both or neither)'
acceptance:
- given: an IDIP community
  when: datasets enumerate
  then: the identity dataset is port-declared with keripy root + witness state
- given: a backup run
  when: it executes
  then: quiesce → snapshot → restart with the blip in the ledger
- given: the run
  when: the roster snapshots
  then: inside the same quiesce window
depends_on:
- keria-adapter-core
- engine-adapters:backup-engine-exec
- backups:coverage-map-and-first-run
out_of_scope:
- restore + the no-backup rung — identity-restore
- offsite S3 targets (#310, refused later slice)
needs_human_decision: []
## Parent Feature spec: #767 (idip; wayfinder map #725). ## What to build The community identity as one backup dataset (ADR 0201): the keria adapter's port declares a single dataset — the whole keripy root plus the witness's own state dirs ("the more precious copy") — member keys are NOT in it (client-side, passcode-derived). Backup is quiesce-then-copy: LMDB is single-writer, so the run stops the keria + witness units, snapshots, restarts — seconds of sign-in blip recorded honestly in the backup ledger (ADR 0083). The control-plane members roster snapshots atomically in the same quiesce window: a roster/TEL mismatch after restore would make IsIssued lie to the bridge, and a stale-agent-vs-fresher-witness restore is the KERI duplicity trap — one window removes both. ## Acceptance criteria - [ ] (story 33) Given an IDIP community, when the backup engine enumerates datasets, then the identity dataset appears, port-declared, covering keripy root + witness state and nothing client-side. - [ ] (story 33) Given a backup run, when it executes, then units quiesce → snapshot → restart, and the ledger records the blip honestly. - [ ] (story 33) Given the same run, then the roster snapshot is taken inside the same quiesce window — never separately. ## Blocked by - #775 — idip:keria-adapter-core - engine-adapters:backup-engine-exec (done — satisfied) - backups:coverage-map-and-first-run (done — satisfied) ## Task manifest ```yaml task: idip:identity-dataset-backup interface: 'the keria adapter''s dataset declaration on the backup engine''s port: keripy root + witness state, quiesce-then-copy execution, roster snapshot in-window, honest ledger blip' seam: 'backup dataset port tests (smoke-backups pattern) against the real packaged stack: dataset declared; quiesce window proven (units stopped during snapshot); roster atomicity (both or neither)' acceptance: - given: an IDIP community when: datasets enumerate then: the identity dataset is port-declared with keripy root + witness state - given: a backup run when: it executes then: quiesce → snapshot → restart with the blip in the ledger - given: the run when: the roster snapshots then: inside the same quiesce window depends_on: - keria-adapter-core - engine-adapters:backup-engine-exec - backups:coverage-map-and-first-run out_of_scope: - restore + the no-backup rung — identity-restore - offsite S3 targets (#310, refused later slice) needs_human_decision: [] ```

swarm-claim host=elitebook-distributed-server-03 run=10057
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=10057 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #783 — status success

⛔ close-report gates REFUSED this close — the following claims did not verify:

  • commit 4e26fa849a is not reachable from origin/main (not landed)
  • changed_files: 'internal/keria/backup.go' is not in the diff of the claimed commits
  • changed_files: 'internal/keria/backup_test.go' is not in the diff of the claimed commits
  • changed_files: 'STATUS.md' is not in the diff of the claimed commits
envelope
{
  "issue": 783,
  "status": "success",
  "commits": [
    "4e26fa849a34b8cdeec083f7a979e44339da7fa9"
  ],
  "changed_files": [
    "internal/keria/backup.go",
    "internal/keria/backup_test.go",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "go test ./internal/keria/",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/keria/",
      "exit_code": 0
    },
    {
      "command": "go build ./...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci (pre-push gate: build/vet/test/lint across all packages)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "(story 33) Given an IDIP community, when the backup engine enumerates datasets, then the identity dataset appears, port-declared, covering keripy root + witness state and nothing client-side": "internal/keria/backup.go IdentityDataset() returns a port-declared backup.DatasetDecl (ID=identity, FromFounding=true, 'Community identity'); IdentityBackupContract's snapshot copies only KeriRoot (/var/lib/keria) + WitnessState (/var/lib/keri-witness) + the roster — nothing client-side, since member keys are passcode-derived and never on the gateway (documented, ADR 0197). Proven by TestIdentityDatasetDeclared and the copy assertions in TestSnapshotQuiesceWindowAndRosterAtomicity.",
    "(story 33) Given a backup run, when it executes, then units quiesce -> snapshot -> restart, and the ledger records the blip honestly": "snapshot() stamps the clock, stops keria+keri-witness, copies the state trees, restarts (deferred resume), then writes blip.json — the honest sign-in-blip ledger (ADR 0083) naming the quiesced units, covered trees and wall-clock downtime. Proven by TestSnapshotQuiesceWindowAndRosterAtomicity: the recording Conn shows both stops before every copy and both starts after, and blip.json parses with units [keria keri-witness] and a non-negative window.",
    "(story 33) Given the same run, then the roster snapshot is taken inside the same quiesce window — never separately": "the members roster (ADR 0198) is copied between the unit stops and starts, inside the one window; TestSnapshotQuiesceWindowAndRosterAtomicity asserts the roster copy index lies within [windowOpen, windowClose], and TestSnapshotRefusedWhenQuiesceFailsSnapshotsNeither proves the 'both or neither' half: a failed quiesce captures neither the dataset nor the roster and still brings the units back."
  },
  "summary": "The keria adapter declares the IDIP community identity as one port-declared backup dataset: quiesce-then-copy of keripy root + witness state, the members roster snapshotted atomically in the same quiesce window, and an honest sign-in-blip ledger.",
  "blockers": []
}
**close-report** for #783 — status `success` :no_entry: **close-report gates REFUSED this close** — the following claims did not verify: - commit 4e26fa849a34b8cdeec083f7a979e44339da7fa9 is not reachable from origin/main (not landed) - changed_files: 'internal/keria/backup.go' is not in the diff of the claimed commits - changed_files: 'internal/keria/backup_test.go' is not in the diff of the claimed commits - changed_files: 'STATUS.md' is not in the diff of the claimed commits <details><summary>envelope</summary> ```json { "issue": 783, "status": "success", "commits": [ "4e26fa849a34b8cdeec083f7a979e44339da7fa9" ], "changed_files": [ "internal/keria/backup.go", "internal/keria/backup_test.go", "STATUS.md" ], "tests": [ { "command": "go test ./internal/keria/", "exit_code": 0 }, { "command": "go vet ./internal/keria/", "exit_code": 0 }, { "command": "go build ./...", "exit_code": 0 }, { "command": "nix develop .#go-ci (pre-push gate: build/vet/test/lint across all packages)", "exit_code": 0 } ], "criteria": { "(story 33) Given an IDIP community, when the backup engine enumerates datasets, then the identity dataset appears, port-declared, covering keripy root + witness state and nothing client-side": "internal/keria/backup.go IdentityDataset() returns a port-declared backup.DatasetDecl (ID=identity, FromFounding=true, 'Community identity'); IdentityBackupContract's snapshot copies only KeriRoot (/var/lib/keria) + WitnessState (/var/lib/keri-witness) + the roster — nothing client-side, since member keys are passcode-derived and never on the gateway (documented, ADR 0197). Proven by TestIdentityDatasetDeclared and the copy assertions in TestSnapshotQuiesceWindowAndRosterAtomicity.", "(story 33) Given a backup run, when it executes, then units quiesce -> snapshot -> restart, and the ledger records the blip honestly": "snapshot() stamps the clock, stops keria+keri-witness, copies the state trees, restarts (deferred resume), then writes blip.json — the honest sign-in-blip ledger (ADR 0083) naming the quiesced units, covered trees and wall-clock downtime. Proven by TestSnapshotQuiesceWindowAndRosterAtomicity: the recording Conn shows both stops before every copy and both starts after, and blip.json parses with units [keria keri-witness] and a non-negative window.", "(story 33) Given the same run, then the roster snapshot is taken inside the same quiesce window — never separately": "the members roster (ADR 0198) is copied between the unit stops and starts, inside the one window; TestSnapshotQuiesceWindowAndRosterAtomicity asserts the roster copy index lies within [windowOpen, windowClose], and TestSnapshotRefusedWhenQuiesceFailsSnapshotsNeither proves the 'both or neither' half: a failed quiesce captures neither the dataset nor the roster and still brings the units back." }, "summary": "The keria adapter declares the IDIP community identity as one port-declared backup dataset: quiesce-then-copy of keripy root + witness state, the members roster snapshotted atomically in the same quiesce window, and an honest sign-in-blip ledger.", "blockers": [] } ``` </details>

close-report for #783 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 783,
  "status": "success",
  "commits": [
    "4e26fa849a34b8cdeec083f7a979e44339da7fa9"
  ],
  "changed_files": [
    "internal/keria/backup.go",
    "internal/keria/backup_test.go",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "go test ./internal/keria/",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/keria/",
      "exit_code": 0
    },
    {
      "command": "go build ./...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci (pre-push gate: build/vet/test/lint across all packages)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "(story 33) Given an IDIP community, when the backup engine enumerates datasets, then the identity dataset appears, port-declared, covering keripy root + witness state and nothing client-side": "internal/keria/backup.go IdentityDataset() returns a port-declared backup.DatasetDecl (ID=identity, FromFounding=true, 'Community identity'); IdentityBackupContract's snapshot copies only KeriRoot (/var/lib/keria) + WitnessState (/var/lib/keri-witness) + the roster — nothing client-side, since member keys are passcode-derived and never on the gateway (documented, ADR 0197). Proven by TestIdentityDatasetDeclared and the copy assertions in TestSnapshotQuiesceWindowAndRosterAtomicity.",
    "(story 33) Given a backup run, when it executes, then units quiesce -> snapshot -> restart, and the ledger records the blip honestly": "snapshot() stamps the clock, stops keria+keri-witness, copies the state trees, restarts (deferred resume), then writes blip.json — the honest sign-in-blip ledger (ADR 0083) naming the quiesced units, covered trees and wall-clock downtime. Proven by TestSnapshotQuiesceWindowAndRosterAtomicity: the recording Conn shows both stops before every copy and both starts after, and blip.json parses with units [keria keri-witness] and a non-negative window.",
    "(story 33) Given the same run, then the roster snapshot is taken inside the same quiesce window — never separately": "the members roster (ADR 0198) is copied between the unit stops and starts, inside the one window; TestSnapshotQuiesceWindowAndRosterAtomicity asserts the roster copy index lies within [windowOpen, windowClose], and TestSnapshotRefusedWhenQuiesceFailsSnapshotsNeither proves the 'both or neither' half: a failed quiesce captures neither the dataset nor the roster and still brings the units back."
  },
  "summary": "The keria adapter declares the IDIP community identity as one port-declared backup dataset: quiesce-then-copy of keripy root + witness state, the members roster snapshotted atomically in the same quiesce window, and an honest sign-in-blip ledger.",
  "blockers": []
}
**close-report** for #783 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 783, "status": "success", "commits": [ "4e26fa849a34b8cdeec083f7a979e44339da7fa9" ], "changed_files": [ "internal/keria/backup.go", "internal/keria/backup_test.go", "STATUS.md" ], "tests": [ { "command": "go test ./internal/keria/", "exit_code": 0 }, { "command": "go vet ./internal/keria/", "exit_code": 0 }, { "command": "go build ./...", "exit_code": 0 }, { "command": "nix develop .#go-ci (pre-push gate: build/vet/test/lint across all packages)", "exit_code": 0 } ], "criteria": { "(story 33) Given an IDIP community, when the backup engine enumerates datasets, then the identity dataset appears, port-declared, covering keripy root + witness state and nothing client-side": "internal/keria/backup.go IdentityDataset() returns a port-declared backup.DatasetDecl (ID=identity, FromFounding=true, 'Community identity'); IdentityBackupContract's snapshot copies only KeriRoot (/var/lib/keria) + WitnessState (/var/lib/keri-witness) + the roster — nothing client-side, since member keys are passcode-derived and never on the gateway (documented, ADR 0197). Proven by TestIdentityDatasetDeclared and the copy assertions in TestSnapshotQuiesceWindowAndRosterAtomicity.", "(story 33) Given a backup run, when it executes, then units quiesce -> snapshot -> restart, and the ledger records the blip honestly": "snapshot() stamps the clock, stops keria+keri-witness, copies the state trees, restarts (deferred resume), then writes blip.json — the honest sign-in-blip ledger (ADR 0083) naming the quiesced units, covered trees and wall-clock downtime. Proven by TestSnapshotQuiesceWindowAndRosterAtomicity: the recording Conn shows both stops before every copy and both starts after, and blip.json parses with units [keria keri-witness] and a non-negative window.", "(story 33) Given the same run, then the roster snapshot is taken inside the same quiesce window — never separately": "the members roster (ADR 0198) is copied between the unit stops and starts, inside the one window; TestSnapshotQuiesceWindowAndRosterAtomicity asserts the roster copy index lies within [windowOpen, windowClose], and TestSnapshotRefusedWhenQuiesceFailsSnapshotsNeither proves the 'both or neither' half: a failed quiesce captures neither the dataset nor the roster and still brings the units back." }, "summary": "The keria adapter declares the IDIP community identity as one port-declared backup dataset: quiesce-then-copy of keripy root + witness state, the members roster snapshotted atomically in the same quiesce window, and an honest sign-in-blip ledger.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#783
No description provided.