crabbox
crabbox copied to clipboard
Design: checkpoint lifecycle verification and pruning
Problem
Crabbox now has provider-native checkpoints from https://github.com/openclaw/crabbox/pull/99. That creates a new lifecycle surface: local checkpoint metadata can drift from provider snapshots/images, provider resources can keep accruing cost after local metadata is lost, and users do not yet have a cheap way to audit what is still forkable.
This is adjacent to the current checkpoint direction, but it is more operational: make saved agent workspaces observable and cleanable without turning checkpoints into a full version-control product.
Proposed v1
Add a small checkpoint lifecycle layer:
crabbox checkpoint list --verify: refresh provider state for native checkpoints and mark missing/deleted/available/pending/failed resources.crabbox checkpoint inspect <id> --verify: show local metadata plus provider state, region/project/kind, and a concrete next action.crabbox checkpoint prune --older-than <duration> [--kind native|archive] [--dry-run]: delete old local archives and provider-native resources through the existing image deletion path.- A machine-readable JSON shape for automation, with explicit
localState,providerState, andnextActionfields.
Why this fits Crabbox
- Checkpoints are scenario handles for agents, so users need to know whether a saved scenario is still real before forking it.
- Provider snapshots/images can contain secrets and cost money, so cleanup needs to be first-class.
- It builds on the existing admin/provider deletion APIs instead of inventing a registry or sharing service.
Non-goals
- No team checkpoint registry in v1.
- No automatic deletion without an explicit prune command.
- No cross-account import/export yet.
- No replacement for
crabbox image promote; promoted base images stay a separate operator workflow.
Open questions
- Should verification require admin-token auth for all native checkpoints, or can user-scoped coordinator auth verify resources that were created from the user's lease?
- Should prune default to local archives only unless
--nativeor--provideris explicit? - Should checkpoint records store coordinator URL/provider account identity to make drift safer across self-hosted coordinators?
Related context: https://github.com/openclaw/crabbox/pull/99 and https://github.com/openclaw/crabbox/pull/100.