engine-adapters: backup-engine-schedule — runs per policy, deliberate restore, export; the family closes #170

Closed
opened 2026-07-29 05:09:50 +00:00 by ben · 1 comment
Owner

Parent

Engine-adapters child spec: #161 (ADRs 0102–0107; scoped on wayfinder #160 — Ben ruled live: per-family clan-lab smokes gate each family, the arc closes on a real-hardware end-to-end, tickets arm the swarm). Everything else agent-decided, post-hoc review pending.

What to build

The family close (ADRs 0104/0107): the scheduler executes confirmed policy (a run that didn't happen is a failure — staleness per DDR 0083), in-place restore takes the pre-restore snapshot, brackets with quiesce/resume, verifies before done, falls back on mid-way failure (P7-S5x); export packages a fresh sealed snapshot via the same artifact path. Then restingBackupPorts is replaced whole in main.go — the P7 write flows (confirm / retry / restore / export) go truthful end-to-end.

Acceptance criteria

  • Given a confirmed policy, When its window passes, Then a real run executes snapshot→seal→replicate→verify and coverage counts verified copies only
  • Given a run missing its next due, When coverage is read, Then the dataset is stale — as loud as an honest failure
  • Given an in-place restore failing mid-way, When it stops, Then the pre-restore snapshot restores the prior state and the failure is named, retryable
  • Given main.go, When this slice lands, Then no resting backup port remains (family whole, neighbours untouched)

Blocked by

  • engine-adapters:backup-engine-targets
  • engine-adapters:store-config-repo-docs

Task manifest

task: engine-adapters:backup-engine-schedule
implements_seam: "the confirmed seams + ADRs 0102-0107 are the design contract (no flow/wireframe — spec #161)"
interface: "the full eight-port backup engine set behind *backup.Orchestrator — contracts unchanged"
seam: "internal/backup integration test driving the real engine over a real orchestrator; existing seam tests stay green"
acceptance:
  - given: the composition root; when: the family lands; then: all eight ports real in one commit (ADR 0107)
depends_on: [engine-adapters:backup-engine-targets, engine-adapters:store-config-repo-docs]
out_of_scope: [screen changes (no UI surface in this arc), the release source / rollout mechanics (out of arc, wayfinder #160)]
needs_human_decision: []
## Parent Engine-adapters child spec: #161 (ADRs 0102–0107; scoped on wayfinder #160 — Ben ruled live: per-family clan-lab smokes gate each family, the arc closes on a real-hardware end-to-end, tickets arm the swarm). Everything else agent-decided, post-hoc review pending. ## What to build The family close (ADRs 0104/0107): the scheduler executes confirmed policy (a run that didn't happen is a failure — staleness per DDR 0083), in-place restore takes the pre-restore snapshot, brackets with quiesce/resume, verifies before done, falls back on mid-way failure (P7-S5x); export packages a fresh sealed snapshot via the same artifact path. Then `restingBackupPorts` is replaced whole in main.go — the P7 write flows (confirm / retry / restore / export) go truthful end-to-end. ## Acceptance criteria - [ ] Given a confirmed policy, When its window passes, Then a real run executes snapshot→seal→replicate→verify and coverage counts verified copies only - [ ] Given a run missing its next due, When coverage is read, Then the dataset is stale — as loud as an honest failure - [ ] Given an in-place restore failing mid-way, When it stops, Then the pre-restore snapshot restores the prior state and the failure is named, retryable - [ ] Given main.go, When this slice lands, Then no resting backup port remains (family whole, neighbours untouched) ## Blocked by - engine-adapters:backup-engine-targets - engine-adapters:store-config-repo-docs ## Task manifest ```yaml task: engine-adapters:backup-engine-schedule implements_seam: "the confirmed seams + ADRs 0102-0107 are the design contract (no flow/wireframe — spec #161)" interface: "the full eight-port backup engine set behind *backup.Orchestrator — contracts unchanged" seam: "internal/backup integration test driving the real engine over a real orchestrator; existing seam tests stay green" acceptance: - given: the composition root; when: the family lands; then: all eight ports real in one commit (ADR 0107) depends_on: [engine-adapters:backup-engine-targets, engine-adapters:store-config-repo-docs] out_of_scope: [screen changes (no UI surface in this arc), the release source / rollout mechanics (out of arc, wayfinder #160)] needs_human_decision: [] ```
Author
Owner

Done in 1649ad6 (on origin/main). Family 3 (the backup engine) closed.

main.go's restingBackupPorts — a blanket fail-loud port set — is replaced whole by the REAL *backupengine.Engine (control-plane/cmd/control-plane/backup_wiring.go: productionBackupPorts / backupEnginePorts / localOwnerDialer). The eight verb ports are the real engine; the catalogue's DatasetPort stays external (empty at founding — Identity is the built-in dataset, ADR 0080). No resting backup port remains (AC4); the fleet-state input still rests (its real read is the compose's, #180).

Seam: internal/backup/engine_integration_test.go (package backup_test, composing backup + backupengine without a cycle) drives both engine halves end to end over the real engine + orchestrator:

  • AC1 — a confirmed policy's scheduled run executes snapshot→seal→replicate→verify; coverage counts verified copies only.
  • AC2 — a dataset that missed its next due reads STALE (DDR 0083).
  • AC3 — an in-place restore that stops partway falls back to the pre-restore snapshot (prior state restored, failure named + retryable; P7-S5x / DDR 0084).

The movement half's mesh/S3 target surfaces + SSH-behind-clan owner resolution ride the cross-orchestrator compose (#180, ADR 0104) and are proven on hardware by the family-3 smoke (#177); until then a replicate reaches the real engine and reports ErrMovementNotWired honestly (ADR 0100), never a fake success — and no confirmed policy exists at a freshly-founded control plane, so no run fires against it yet. Existing internal/backup + internal/backupengine seam tests stay green; go build ./... / vet / control-plane suite clean.

Done in `1649ad6` (on `origin/main`). **Family 3 (the backup engine) closed.** `main.go`'s `restingBackupPorts` — a blanket fail-loud port set — is replaced whole by the REAL `*backupengine.Engine` (`control-plane/cmd/control-plane/backup_wiring.go`: `productionBackupPorts` / `backupEnginePorts` / `localOwnerDialer`). The eight verb ports are the real engine; the catalogue's DatasetPort stays external (empty at founding — Identity is the built-in dataset, ADR 0080). No resting backup port remains (AC4); the fleet-state input still rests (its real read is the compose's, #180). Seam: `internal/backup/engine_integration_test.go` (`package backup_test`, composing backup + backupengine without a cycle) drives both engine halves end to end over the real engine + orchestrator: - **AC1** — a confirmed policy's scheduled run executes snapshot→seal→replicate→verify; coverage counts **verified copies only**. - **AC2** — a dataset that missed its next due reads **STALE** (DDR 0083). - **AC3** — an in-place restore that stops partway **falls back to the pre-restore snapshot** (prior state restored, failure named + retryable; P7-S5x / DDR 0084). The movement half's mesh/S3 target surfaces + SSH-behind-clan owner resolution ride the cross-orchestrator compose (#180, ADR 0104) and are proven on hardware by the family-3 smoke (#177); until then a replicate reaches the real engine and reports `ErrMovementNotWired` honestly (ADR 0100), never a fake success — and no confirmed policy exists at a freshly-founded control plane, so no run fires against it yet. Existing internal/backup + internal/backupengine seam tests stay green; `go build ./...` / `vet` / control-plane suite clean.
ben closed this issue 2026-07-29 22:14:12 +00:00
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.

Reference
Matou/idss#170
No description provided.