Complete durable sandbox backup, restore, failover, and lifecycle resilience
Contribution provenance
AI assistance is self-reported provenance, not a request for hidden reasoning.
- AI assistance: yes
- AI provider/model: OpenAI / gpt-5.6-sol
- Client / agent tooling: Codex
- Contribution skill revision: elizaOS/eliza@2d89d6b0a9897457ef1a452f0c8bc76684c23a1:packages/skills/skills/contribute-to-eliza
- Attribution status: self-reported
Goal
Make Hetzner Robot and Cloud sandboxes recoverable without silent empty boots: authenticated manifest-v3 backups on independent primary/secondary stores, bounded RPO/RTO, durable restore/failover, capacity backpressure, and backup-before-destructive billing/lifecycle operations.
The current state is explicitly NO-GO until every acceptance proof below is complete.
Design doc
Scope
- Agent + Cloud backup format, catalogue, streaming capture/publication and restore
- R2 primary and independent Hetzner secondary storage
- Durable restore coordinator, immutable source/target authorities, vault key seeding, quarantine commit, functional probes and route CAS
- Robot/Cloud node-loss recovery and capacity admission
- Billing freeze/recovery and destructive lifecycle gates
- Scheduler, GC, observability, restore drills and staging evidence
Non-goals
- Touching production without separate explicit authorization
- Treating cryptographic verification without a booted runtime as a successful restore drill
- Falling back to a fresh/empty boot after any restore error
Current progress and next work — 2026-09-06
The previous restore foundation stack is merged: #29951, #29957, #29958, #29959, #29990, #29991, #29992 and #29993. The capacity-test dependency #30443 is also merged. All nine merge commits are present in inspected develop@de30ecf38c4e64999aa90bcaf8d77b7d8be956a4. Verified merge and source inventory.
These merges retire the former review backlog; they do not prove a booted, functional manifest-v3 restore. The current quarantine runtime stops at container creation, and the new stream/materializer entry points still lack production callers.
Next active work item: #20732 — complete explicit restore before routing. Connect the candidate database and file materializers to the Agent/coordinator protocol, commit the exact generation, boot and attest it, verify functional state, then publish activation and routes under their existing fences. Keep the feature disabled until the required staging evidence is available.
Existing follow-on work, without creating duplicate issues:
- #24594: automatic Robot/Cloud node-loss recovery, using the completed explicit restore path; includes returning-node and old-placement fencing.
- #24601: bounded incremental chains, compaction and durable multipart publication. The object primitive from #29958 is merged; the durable publication lifecycle is still a separate requirement.
- #24407: fair scheduler admission, cohorts, legacy-cron retirement and 10,000-agent evidence.
- #24123: provision/wake activation and vault-authority writers; retain as an open integration work item until its own criteria are verified.
- #23098 and related PR #30815: lifecycle/billing/deletion coordination. Track their acceptance separately; do not absorb their unrelated scope here.
- Finish the real provider restore drills, measured RPO/RTO/cost and artifacts A–E before overall acceptance.
#20730 and #20735 are closed foundation issues. Broad acceptance rows below remain open wherever operational integration or evidence is still missing. PR merge status alone does not mark these rows complete.
Work Items
- 1. Lifecycle and immutable DB authorities
- 2. Manifest-v3 contracts, record stream and key bundle
- 3. Catalogue, R2/secondary storage, retention and GC
- 4. Streaming capture/publication and bounded RPO scheduler
- 5. Durable restore coordinator, Robot/Cloud recovery and capacity fencing
- 6. Billing freeze/recovery and backup-before-destructive lifecycle
- 7. E2E, observability, cost model, deployment and restore drills
Acceptance Criteria
- Robot and Cloud node loss both restore DB, media, vault, persona and state files without split-brain or silent empty boot.
- Verified local-state RPO is at most 15 minutes and unit restore RTO on existing capacity is at most 15 minutes.
- Primary and secondary copies are independently verified; retention/GC cannot race capture or restore.
- Capacity floods remain queued/deferred without oversubscription or unplanned autoscale.
- Every destructive lifecycle and billing freeze takes, uploads and verifies a final restorable backup first.
- Daily primary and weekly secondary restore drills boot a runtime and verify functional state.
- All related implementation PRs have independent approvals and applicable green CI for their final reviewed revisions; the original seven-work-item plan is not a fixed PR count.
- Exact-SHA staging artifacts A-E are posted; production remains untouched.
Evidence Plan
- Screenshots or recording: staging restore/failover/freeze walkthroughs posted inline; N/A during code-only foundation PRs.
- Logs: privacy-safe phase timelines, RPO/RTO, fences and cleanup.
- Real-LLM trajectories: one restored agent recalls a unique acknowledged fact and produces exactly one response.
- Domain artifacts: pseudonymized operation IDs, hashes, receipts, schema/image identity, inventory and before/after quota/capacity.
- CI runs: focused tests plus package/root gates on every rebased PR head.
Dependencies / Sequencing
The seven work items are stacked because later recovery and lifecycle paths consume the immutable authorities, v3 contracts and storage foundations. No stack head may contain a partially applied or subsequently edited migration.
— [/root]
Source: elizaOS/eliza