DD-469 #6 child 7/7: Offline restore, administration and full-profile integration #35

Open
opened 2026-11-19 13:45:51 +00:00 by svc-agent-writer · 6 comments

Parent and authority

Child 7/7 of #6 (DD-469 Attention 4/6). Parent epic: #1. Reviewed scope: decomposition decomposition.md SHA-256 a51ac56839bcd81e6a34166e71ce677ba443a9d92b88423f772f3d84bbe39daa, spec PASS with zero findings in disposition 4598e30997b235ab493c1067cb636b8612abb5eb53780323ee7f4c5cd179c531. Binds frozen docs/planning/issue-6-transition-protocol-v2.md SHA-256 1aaab9cb149d2575879428eaa9ce42d9b401a582a2ffa9bb44c31d4b2ac82cc2 (design PASS 0, #6 comment 42606) and the paired #6 body f771415735c3a9238f03e7e9c4dacd259cb62e55e9a7839c20378a46a83f5b61 and acceptance matrix a02eb1136bcd60f6dec7395e2a2ff337a189af64d0927a9d6f363b8d03003054, both ratified. Contract: mind-spec 3da6a263e6aeb3f37d25590d6ab755045ff53786. Standing grant: #6 comment 42500.

Blocked by

  • #34 — child 6/7 (Forget)
  • #47 — child 5b/7 (Backup lifecycle)

Fixed write set

src/attention_mind_mcp/cli.py, src/attention_mind_mcp/store.py, src/attention_mind_mcp/service.py, src/attention_mind_mcp/recovery_restore.py, README.md, tests/test_recovery_restore.py, tests/test_recovery_profile_integration.py

Expanding this write set, or changing reviewed guarantee semantics, goes back to spec review before dispatch.

Interface and responsibility

Wire managed backup/custody operations and exclusive offline restore/reset through the administrative CLI. Verify that disabling custody after managed activation cannot turn unresolved work into a successful local-only operation. Bind deployment premise recording/invalidation and verified old-write settlement to the existing quarantine and readiness rules. Reject expired, unregistered, contradictory or incompletely covered artifacts. Validate a new local store and reconcile complete authoritative frontier evidence and persistent original-admission reservations before serving any content, mutation or delivery. Check that a newly opened writer and older eligible archive cannot replenish consumed lifetime capacity. Keep whole-queue quarantine for missing candidate/provenance, and preserve old custody debt through explicit empty new-UUID reset. Validate stale generation refusal and deliberate rebinding. Cover successful complete restore and refused incomplete restore, repeated restore and partial expiry, C/M winners with full predecessor state, missing keys/coverage, no sensitive disclosure, and permitted recovery of old encryption keys from separate custody. Run actual max-profile backup, encryption, decrypt, restore, then reserved Forget/cleanup at saturation against the production code and controlled local custody adapter. Measure complete envelopes, staging, SQLite/WAL, disk and process RAM. Include failure/oversize controls, record all limits and assert no hidden quota refund or substitute refusal for successful full-profile operation. Document custody, key rotation/loss, status and reset for the operator.

Serial dispatch. Children 5, 6 and 7 overlap on store.py, service.py and custody.py. Dispatch only after the preceding child has merged; never run two of them at once.

Evidence served

E03–E08, E10, E11, E14 and offline E12/E13 prerequisites. Finish integrated E05/E06 high-water and resource verification, actual E07 key recovery and successful/withheld E10/E11 activation. Its offline tests can exercise decisions under synthetic premises. Live provider behavior and operator deployment attestation stay separate.

Completing this child does not discharge E09, E12 or E13. Those stay owed against the real production custodian under the ratified owner-attested, sample-labelled standard. E15 stays with #6 reconciliation.

Gates

  • Fresh SVD Half-A specification with delegated auto-gate and default caps. Concrete interface signatures, persisted schema and encoded charges, premise freshness rules and exact test schedules belong in that specification under the bound protocol.
  • Merge requires independent Standards and Spec PASS with zero findings, green CI on the exact head, and a raw CI log audit for command not found, errors during collection, = not found and "is_error":true.
  • Existing local mode, attention/1.0, binding 1.1 and compatible schema-2 stores stay supported. New or migrated persisted records need named P09 classes and encoded bounds.
  • Offline only. No provider request, credential, IAM, bucket or configuration change, claim, reservation or live run. Frozen fence/harness/protocol bytes stay unchanged. Balances 57 / 1,943 / 1,504 unchanged.

Filed under: operator word "file tickets" sha256:d982c2768589

## Parent and authority Child 7/7 of #6 (DD-469 Attention 4/6). Parent epic: #1. Reviewed scope: decomposition `decomposition.md` SHA-256 `a51ac56839bcd81e6a34166e71ce677ba443a9d92b88423f772f3d84bbe39daa`, spec PASS with zero findings in disposition `4598e30997b235ab493c1067cb636b8612abb5eb53780323ee7f4c5cd179c531`. Binds frozen `docs/planning/issue-6-transition-protocol-v2.md` SHA-256 `1aaab9cb149d2575879428eaa9ce42d9b401a582a2ffa9bb44c31d4b2ac82cc2` (design PASS 0, #6 comment 42606) and the paired #6 body `f771415735c3a9238f03e7e9c4dacd259cb62e55e9a7839c20378a46a83f5b61` and acceptance matrix `a02eb1136bcd60f6dec7395e2a2ff337a189af64d0927a9d6f363b8d03003054`, both ratified. Contract: mind-spec `3da6a263e6aeb3f37d25590d6ab755045ff53786`. Standing grant: #6 comment 42500. ## Blocked by - #34 — child 6/7 (Forget) - #47 — child 5b/7 (Backup lifecycle) ## Fixed write set `src/attention_mind_mcp/cli.py`, `src/attention_mind_mcp/store.py`, `src/attention_mind_mcp/service.py`, `src/attention_mind_mcp/recovery_restore.py`, `README.md`, `tests/test_recovery_restore.py`, `tests/test_recovery_profile_integration.py` Expanding this write set, or changing reviewed guarantee semantics, goes back to spec review before dispatch. ## Interface and responsibility Wire managed backup/custody operations and exclusive offline restore/reset through the administrative CLI. Verify that disabling custody after managed activation cannot turn unresolved work into a successful local-only operation. Bind deployment premise recording/invalidation and verified old-write settlement to the existing quarantine and readiness rules. Reject expired, unregistered, contradictory or incompletely covered artifacts. Validate a new local store and reconcile complete authoritative frontier evidence and persistent original-admission reservations before serving any content, mutation or delivery. Check that a newly opened writer and older eligible archive cannot replenish consumed lifetime capacity. Keep whole-queue quarantine for missing candidate/provenance, and preserve old custody debt through explicit empty new-UUID reset. Validate stale generation refusal and deliberate rebinding. Cover successful complete restore and refused incomplete restore, repeated restore and partial expiry, C/M winners with full predecessor state, missing keys/coverage, no sensitive disclosure, and permitted recovery of old encryption keys from separate custody. Run actual max-profile backup, encryption, decrypt, restore, then reserved Forget/cleanup at saturation against the production code and controlled local custody adapter. Measure complete envelopes, staging, SQLite/WAL, disk and process RAM. Include failure/oversize controls, record all limits and assert no hidden quota refund or substitute refusal for successful full-profile operation. Document custody, key rotation/loss, status and reset for the operator. **Serial dispatch.** Children 5, 6 and 7 overlap on `store.py`, `service.py` and `custody.py`. Dispatch only after the preceding child has merged; never run two of them at once. ## Evidence served E03–E08, E10, E11, E14 and offline E12/E13 prerequisites. Finish integrated E05/E06 high-water and resource verification, actual E07 key recovery and successful/withheld E10/E11 activation. Its offline tests can exercise decisions under synthetic premises. Live provider behavior and operator deployment attestation stay separate. Completing this child does not discharge E09, E12 or E13. Those stay owed against the real production custodian under the ratified owner-attested, sample-labelled standard. E15 stays with #6 reconciliation. ## Gates - Fresh SVD Half-A specification with delegated auto-gate and default caps. Concrete interface signatures, persisted schema and encoded charges, premise freshness rules and exact test schedules belong in that specification under the bound protocol. - Merge requires independent Standards and Spec PASS with zero findings, green CI on the exact head, and a raw CI log audit for `command not found`, `errors during collection`, `= not found` and `"is_error":true`. - Existing local mode, attention/1.0, binding 1.1 and compatible schema-2 stores stay supported. New or migrated persisted records need named P09 classes and encoded bounds. - Offline only. No provider request, credential, IAM, bucket or configuration change, claim, reservation or live run. Frozen fence/harness/protocol bytes stay unchanged. Balances 57 / 1,943 / 1,504 unchanged. Filed under: operator word "file tickets" sha256:d982c2768589
Author
Member

This was generated by AI during triage.

State: ready-for-agent. The issue body is the agent brief. Its scope, fixed write set, dependencies, E-row debt and gates come verbatim from the decomposition that mind-spec passed with zero findings (disposition 4598e30997b235ab493c1067cb636b8612abb5eb53780323ee7f4c5cd179c531).

CONV-40 walk (advisory): branch 3 proposed ready-for-human. Rule 3 fires: offline restore establishes writer exclusion and generation across hosts.

Applied ready-for-agent under the operator's ruling. The 2026-11-20T00:18:41+11:00 product-first ruling (Q5) routes each #6 child through delegated SVD with auto-gate and default caps. Spec has already ruled the boundary design in transition protocol v2 (design PASS 0, #6 comment 42606). This child implements that contract offline and authorizes no credential, provider or live action.

Dispatch rule: start only when every issue under ## Blocked by has merged. Children #33, #34 and #35 overlap on shared files, so they run one at a time.

> *This was generated by AI during triage.* **State:** `ready-for-agent`. The issue body is the agent brief. Its scope, fixed write set, dependencies, E-row debt and gates come verbatim from the decomposition that mind-spec passed with zero findings (disposition `4598e30997b235ab493c1067cb636b8612abb5eb53780323ee7f4c5cd179c531`). **CONV-40 walk (advisory):** branch 3 proposed `ready-for-human`. Rule 3 fires: offline restore establishes writer exclusion and generation across hosts. **Applied `ready-for-agent` under the operator's ruling.** The 2026-11-20T00:18:41+11:00 product-first ruling (Q5) routes each #6 child through delegated SVD with auto-gate and default caps. Spec has already ruled the boundary design in transition protocol v2 (design PASS 0, #6 comment 42606). This child implements that contract offline and authorizes no credential, provider or live action. **Dispatch rule:** start only when every issue under `## Blocked by` has merged. Children #33, #34 and #35 overlap on shared files, so they run one at a time.
Author
Member

This was generated by AI during the SVD architect gate.

E06 dependency: #43 carries the decoded-frontier memory charge from the PR #42 security review (finding L2). This issue does not discharge E06 until #43 closes.

Filed under: operator-word-d982c2768589 (PR #42 gate L2)

> *This was generated by AI during the SVD architect gate.* E06 dependency: #43 carries the decoded-frontier memory charge from the PR #42 security review (finding L2). This issue does not discharge E06 until #43 closes. Filed under: operator-word-d982c2768589 (PR #42 gate L2)
Author
Member

This was generated by AI during the merge gate.

Carry-forward note from the PR #42 (#31) merge gate. recovery_crypto._resolve keeps a resolver's own FoundationError code. It maps every other resolver exception to key_unavailable, including MemoryError and a transient I/O failure. So key_unavailable alone does not prove that a key is lost. This child must not treat key_unavailable as permanent key loss. Its spec should say how it tells a transient resolver failure apart from a lost key. P11 and E07 already require the loss drill to tell an unavailable key, a wrong key, corrupt ciphertext and expiry apart. Sources: the round-5 security observation in the PR #42 gate record, and mind-spec's canonical-fit answer on the #31 round-1 amendments.

> *This was generated by AI during the merge gate.* **Carry-forward note from the PR #42 (#31) merge gate.** `recovery_crypto._resolve` keeps a resolver's own `FoundationError` code. It maps every other resolver exception to `key_unavailable`, including `MemoryError` and a transient I/O failure. So `key_unavailable` alone does not prove that a key is lost. This child must not treat `key_unavailable` as permanent key loss. Its spec should say how it tells a transient resolver failure apart from a lost key. P11 and E07 already require the loss drill to tell an unavailable key, a wrong key, corrupt ciphertext and expiry apart. Sources: the round-5 security observation in the PR #42 gate record, and mind-spec's canonical-fit answer on the #31 round-1 amendments.
Author
Member

This was generated by AI during the merge gate.

Carried forward from PR #44 (#30), merged as 35d15ff3

The archive header records floor_us, not the replay cutoff that the exporter used. Under D6 that cutoff is the provider's effective time at the snapshot. Restore must raise its floor to the export cutoff. The merge-gate Security review raised this as an observation on PR #44.

The PR #44 gate record (comment 43858) has the details.

Filed under: operator-word-d982c2768589

> *This was generated by AI during the merge gate.* ## Carried forward from PR #44 (#30), merged as 35d15ff3 The archive header records `floor_us`, not the replay cutoff that the exporter used. Under D6 that cutoff is the provider's effective time at the snapshot. Restore must raise its floor to the export cutoff. The merge-gate Security review raised this as an observation on PR #44. The PR #44 gate record (comment 43858) has the details. Filed under: operator-word-d982c2768589
Author
Member

This was generated by AI during the SVD architect gate (minds-guide@voyager).

Carried from #33 revision 11

#33's approved spec, revision 11 (sha256 d306967d25fe6d770dc75280fea9b7f036900b503058f4549a84eb4aee531302, release record #33 comment 44849), moves these items to this issue.

  • Selected-artifact restore (P01, P10, P13). #33 has no managed restore entry. Restore must check fresh, complete, exact-bound P01 evidence. It must also prove the selected artifact's eligibility and through-current coverage against the exact authenticated frontier. Apply P10's limited-availability rule for unrelated overdue copies. #33's pristine-namespace guard covers only #33's new commands and does not carry to restore. Pin a refusal for absent or mismatched selected-artifact evidence and for missing through-current facts. Keep an eligible restore with unrelated overdue copies where P10 permits it.
  • Older-archive authority (P13). Restore must refuse an older archive offered as authority without the required reconciliation. #33 keeps the local reopen and authenticated frontier high-water controls.
  • Repair of contradictory recovery authority. In #33, a Store that reopens with contradictory current recovery authority stays quarantined across reopen, and a refresh cannot clear it. Only a verified, authorized repair can clear it, and that repair is this issue's.
  • CLI modes (R10, an open decision). Decide which CLI entry points open a local, content-free inspection mode and which may open a write-capable managed recovery session, and how configuration and authority select each mode. Read-only show must report local status without driving or applying queued mutations. Serving must recover behind the P03 barrier before content opens. Each recovery pass admits at most four requests, as #33 reserves them. This needs a design decision and a test before this issue releases CLI wiring. Merge order alone cannot settle it. #33 adds no CLI mode.
  • Open-time sends. In #33 a managed Store(...) with custody drives recovery sends before it returns. Without custody, the never-activated local path sends nothing. The CLI wiring here inherits that behaviour, under R10.
  • Fresh-writer advancement (R9). #33 carries F's writer epoch. This issue owns fresh-writer advancement. An epoch bump alone conveys no authority (P02, P12, P13).
  • J projection. #47 defines the bounded terminal and disposition identity projection (J). This issue reuses the same projection; Forget fingerprints stay separate and plain reserves stay out.
  • Sole-prune check at this gate. commands.py:223 stays the only DELETE FROM commands in src. At this merge gate, run the sole-prune grep and the tamper and saturation checks.

Production gates. Production managed activation and new managed admission stay disabled until #34 and #47 land. Two gates must also be implemented and verified first: (1) activation (P01, P03): before production activation enters PREPARED, exclude any other serving process for the queue, stop new release permits, drain active handoffs and discard unreleased buffers, with exclusion proved through cutover and restart; (2) stock-S3 ownership release before managed activation and use, including observation and command sends (#47).

Filed under: operator-word-d982c2768589

> *This was generated by AI during the SVD architect gate (minds-guide@voyager).* ## Carried from #33 revision 11 #33's approved spec, revision 11 (sha256 `d306967d25fe6d770dc75280fea9b7f036900b503058f4549a84eb4aee531302`, release record #33 comment 44849), moves these items to this issue. - **Selected-artifact restore (P01, P10, P13).** #33 has no managed restore entry. Restore must check fresh, complete, exact-bound P01 evidence. It must also prove the selected artifact's eligibility and through-current coverage against the exact authenticated frontier. Apply P10's limited-availability rule for unrelated overdue copies. #33's pristine-namespace guard covers only #33's new commands and does not carry to restore. Pin a refusal for absent or mismatched selected-artifact evidence and for missing through-current facts. Keep an eligible restore with unrelated overdue copies where P10 permits it. - **Older-archive authority (P13).** Restore must refuse an older archive offered as authority without the required reconciliation. #33 keeps the local reopen and authenticated frontier high-water controls. - **Repair of contradictory recovery authority.** In #33, a Store that reopens with contradictory current recovery authority stays quarantined across reopen, and a refresh cannot clear it. Only a verified, authorized repair can clear it, and that repair is this issue's. - **CLI modes (R10, an open decision).** Decide which CLI entry points open a local, content-free inspection mode and which may open a write-capable managed recovery session, and how configuration and authority select each mode. Read-only `show` must report local status without driving or applying queued mutations. Serving must recover behind the P03 barrier before content opens. Each recovery pass admits at most four requests, as #33 reserves them. This needs a design decision and a test before this issue releases CLI wiring. Merge order alone cannot settle it. #33 adds no CLI mode. - **Open-time sends.** In #33 a managed `Store(...)` with custody drives recovery sends before it returns. Without custody, the never-activated local path sends nothing. The CLI wiring here inherits that behaviour, under R10. - **Fresh-writer advancement (R9).** #33 carries F's writer epoch. This issue owns fresh-writer advancement. An epoch bump alone conveys no authority (P02, P12, P13). - **J projection.** #47 defines the bounded terminal and disposition identity projection (J). This issue reuses the same projection; Forget fingerprints stay separate and plain reserves stay out. - **Sole-prune check at this gate.** `commands.py:223` stays the only `DELETE FROM commands` in `src`. At this merge gate, run the sole-prune grep and the tamper and saturation checks. **Production gates.** Production managed activation and new managed admission stay disabled until #34 and #47 land. Two gates must also be implemented and verified first: (1) activation (P01, P03): before production activation enters PREPARED, exclude any other serving process for the queue, stop new release permits, drain active handoffs and discard unreleased buffers, with exclusion proved through cutover and restart; (2) stock-S3 ownership release before managed activation and use, including observation and command sends (#47). Filed under: operator-word-d982c2768589
Author
Member

This was generated by AI during the SVD architect gate (minds-guide@voyager).

Carried from #33 revision 12: the maximum reachable profile

#33's approved spec, revision 12 (sha256 4f7baa16ba1727eeee38d583494e0fb9e2a4e65a213f2759e7ae153230277f24, release record on #33), adds this item to the carries in comment 44858.

  • The joint command limit. The frozen budget charges ordinary commands, reserved commands and one completion reserve per live item against one 1,024-slot command total (recovery_budget.py:180, :186-187). Activation also keeps two protected completion slots free (COMPLETION_RESERVED_COMMANDS). At 512 live items, at most 510 retained commands fit.
  • E06 and E14 evidence. Exercise the maximum reachable joint managed profile: 512 live items plus up to 510 retained ordinary or reserved commands, with both protected slots free. Test the structural 1,024-command total as a separate control. Show reserved Forget and cleanup at ordinary saturation, with either exact winner, C or M, through accounting and recovery. A fixture that only refuses a supposed maximum is not E06 evidence.
  • Retained charges. #33 keeps every authenticated command charge through expiry. #47 owns the proof-based reclamation path (#47 carry from #33 revision 12).

Filed under: operator-word-d982c2768589

> *This was generated by AI during the SVD architect gate (minds-guide@voyager).* ## Carried from #33 revision 12: the maximum reachable profile #33's approved spec, revision 12 (sha256 `4f7baa16ba1727eeee38d583494e0fb9e2a4e65a213f2759e7ae153230277f24`, release record on #33), adds this item to the carries in comment 44858. - **The joint command limit.** The frozen budget charges ordinary commands, reserved commands and one completion reserve per live item against one 1,024-slot command total (`recovery_budget.py:180`, `:186-187`). Activation also keeps two protected completion slots free (`COMPLETION_RESERVED_COMMANDS`). At 512 live items, at most 510 retained commands fit. - **E06 and E14 evidence.** Exercise the maximum reachable joint managed profile: 512 live items plus up to 510 retained ordinary or reserved commands, with both protected slots free. Test the structural 1,024-command total as a separate control. Show reserved Forget and cleanup at ordinary saturation, with either exact winner, C or M, through accounting and recovery. A fixture that only refuses a supposed maximum is not E06 evidence. - **Retained charges.** #33 keeps every authenticated command charge through expiry. #47 owns the proof-based reclamation path (#47 carry from #33 revision 12). Filed under: operator-word-d982c2768589
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.

Dependencies

No dependencies set.

Reference
dev/attention-mind-mcp#35
No description provided.