Skip to content

Add pipeline resume with checkpoint persistence#9

Merged
viamus merged 1 commit intomainfrom
feature/pipeline-resume-checkpoint
Mar 1, 2026
Merged

Add pipeline resume with checkpoint persistence#9
viamus merged 1 commit intomainfrom
feature/pipeline-resume-checkpoint

Conversation

@viamus
Copy link
Owner

@viamus viamus commented Mar 1, 2026

Summary

  • Automatically save a JSON checkpoint after each successful pipeline step, enabling resume on failure without re-running completed work
  • Add --resume flag to pick up from the last failed step, and --from-step <name> to re-execute from a specific step
  • Checkpoints stored in .codegenesis/{pipeline}.checkpoint.json next to the YAML file, deleted on successful completion
  • Detect YAML changes via SHA-256 hash and warn when resuming a modified pipeline

Details

New files:

  • Pipeline/PipelineCheckpoint.cs — Data model (version, yaml hash, completed steps, step outputs, metrics)
  • Pipeline/CheckpointManager.cs — Atomic load/save/delete with SHA-256 hash computation

Modified files:

  • Cli/RunPipelineCommandSettings.cs--resume and --from-step flags with mutual exclusivity validation
  • Pipeline/PipelineExecutor.cs — Explicit IStepExecutor interface impl (no resume) vs public overload (with resume params), skip logic, checkpoint save after each step
  • Cli/RunPipelineCommand.cs — Checkpoint wiring, cached output restoration, resume hint on failure
  • UI/PipelineRenderer.csRenderStepSkipped() (cached indicator) and RenderResumeHint() (tip message)
  • Program.cs — DI registration + CLI help examples

Test plan

  • Run a multi-step pipeline — verify .codegenesis/ checkpoint created after each step
  • Force a step failure — verify checkpoint persists with FailedStepName
  • Run with --resume — verify completed steps show "(cached)" and execution resumes from failed step
  • Run with --from-step <name> — verify re-execution starts at the specified step
  • Modify YAML between runs — verify warning about changed config
  • Successful pipeline completion — verify checkpoint file is deleted
  • Run --resume without checkpoint — verify clear error message
  • Run --resume + --from-step together — verify validation error

🤖 Generated with Claude Code

Save a checkpoint after each successful step so failed pipelines can be
resumed without re-running completed steps. Introduces --resume (picks up
from the last failure) and --from-step <name> (re-executes from a specific
step). Checkpoints are stored in .codegenesis/ next to the YAML file and
are automatically deleted on successful completion.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@viamus viamus merged commit 22fc73a into main Mar 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant