Skip to content

Add partio migrate command for checkpoint v1-to-v2 format upgrades #173

@jcleira

Description

@jcleira

Summary

Add a partio migrate --checkpoints v2 CLI command that migrates existing checkpoint data from the v1 orphan branch format to the v2 compact format (compact transcript.jsonl + metadata on /main ref layout).

Why

Before checkpoints v2 can become the default, users with existing v1 checkpoint data need a migration path. Without this, adopting v2 means losing historical checkpoint data or maintaining two parallel formats indefinitely.

What to implement

  • New partio migrate Cobra command with --checkpoints v2 flag
  • --dry-run flag for previewing migration without writing
  • Migration logic: read v1 branch commits → extract session/transcript data → write to v2 ref layout
  • Idempotent execution (safe to run twice)
  • Progress output showing migration status

Acceptance criteria

  • partio migrate --checkpoints v2 converts existing v1 checkpoint data to v2 format
  • Migration is idempotent
  • --dry-run previews without writing
  • All existing checkpoint metadata is preserved
  • make test and make lint pass

Source

Inspired by entireio/cli#855 (Checkpoints V2 migration) and entireio/cli changelog 0.5.3.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions