checkpointing-assembly-state-for-resume
Saves and restores the state of a long assembly run (a 550-piece jigsaw, a LEGO build, a domino layout) so a run stopped after hours resumes where it was. save_checkpoint writes one versioned JSON checkpoint atomically (temp file, fsync, rename) with a SHA-256 over its payload - task, step, placed pieces / bricks / items with cells and poses, the pending queue, backtracking-a-wrong-placement's ledger, the reference snapshot and items for detecting-disturbed-pieces-by-snapshot-diff, arms and what they hold, timestamps and an activity stream of what changed - keeping the newest N. resume_from_checkpoint loads the newest checkpoint that passes its hash (migrating older schema versions), compares it with a fresh observation through the snapshot-diff skill and, for bricks, verifying-build-against-model, and lists the items to re-verify before going on. Use after every few verified placements of a long run (save), and when a stopped run starts up again (resume); files and CPU only, no motion.
checkpoint_dir stringcheckpoint_path string, task_id string, step_index int, seq int, sha256 string, n_recheck int, n_skipped int, age_s float, state_json stringrobot.get_observationExits
What the skill reports when it ends; a policy branches on these.
saved save_checkpoint wrote the checkpoint (whole or not at all) and removed the ones past `keep`; `checkpoint_path`, `seq`, `sha256`.save_failed The write raised (disk full, no permission, an unstorable value); the earlier checkpoints are untouched.resumed resume_from_checkpoint loaded a valid checkpoint and every placed item was cleared by a check against the fresh view (unchanged in the snapshot diff, matched by the build check); nothing held or half done.resumed_with_rechecks A valid checkpoint was loaded but some items must be re-verified first; `recheck` lists them, surest problems first, each with its reasons (lost, held_when_stopped, missing, misplaced, wrong_colour, moved with its shift, appearance_changed, in_progress_when_stopped, ledger_after_checkpoint, unseated, extra, unexpected_object, occluded, unverified_at_save, placed_after_reference, not_checked).no_checkpoint The directory has no checkpoint for the task, or none passes its hash and schema checks (`skipped` says why for each); start the task fresh.state_mismatch The fresh view does not register onto the reference snapshot, at least a quarter (and 3) of the checked items moved, vanished or are wrong, or the grid differs from expect_grid; re-perceive the board instead of trusting the checkpoint.Scripts
save_checkpoint, resume_from_checkpoint
Use it
Take this bundle (and the tools it calls) into a registry for your task, then point your policy generator at it:
git clone https://github.com/runtime-si/RoboSkillHub
cd RoboSkillHub && uv sync
uv run --no-sync roboskillhub search "saves and restores the state of a long assembly run (a…" --why
uv run --no-sync roboskillhub view --bundles checkpointing-assembly-state-for-resume --out my_registrySee Get started for searching by task and robot, locking what a policy uses, and fetching it on the robot.