(Do not merge) One-time migration script for v2 checkpoints to v1#1257
Closed
computermode wants to merge 8 commits into
Closed
(Do not merge) One-time migration script for v2 checkpoints to v1#1257computermode wants to merge 8 commits into
computermode wants to merge 8 commits into
Conversation
Entire-Checkpoint: c9bc625237a6
Entire-Checkpoint: e25de9aab773
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a standalone, one-time Bash script to migrate legacy v2 checkpoint artifacts (raw transcripts + companion metadata) into the v1 checkpoint tree and optionally write a single migration commit updating refs/heads/entire/checkpoints/v1.
Changes:
- Introduces
scripts/migrate-v2-checkpoints-to-v1.shwith modes to list, dry-run, or apply a migration. - Scans git history for
Entire-Checkpoint: <12-hex>trailers and maps them to v2full/*andmainref artifacts. - (On
--apply) rewrites checkpoint-levelmetadata.jsonto include discovered session entries and writes a migration commit.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 1ea7f14. Configure here.
Entire-Checkpoint: 0951efc5bce0
Entire-Checkpoint: 80c40cdeb702
Entire-Checkpoint: 2134122b88bc
Entire-Checkpoint: c006f720c485
Entire-Checkpoint: d4f6517be448
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Example command:
To see all the checkpoints to migrate:
To go through a dry run:
To create the commit that copies the checkpoints from v2 to v1:
To validate:
git show --stat refs/heads/entire/checkpoints/v1To push after:
git push origin refs/heads/entire/checkpoints/v1:refs/heads/entire/checkpoints/v1Note
Medium Risk
Adds a one-off migration script that can create and update the
refs/heads/entire/checkpoints/v1ref based on parsed commit trailers and checkpoint refs; misuse could write incorrect history or overwrite the local ref.Overview
Introduces
scripts/migrate-v2-checkpoints-to-v1.sh, a standalone tool to plan or apply migration of legacy v2 checkpoint artifacts back into the v1 checkpoint tree.The script scans commits after a given
--since(optionally constrained by--head) forEntire-Checkpointtrailers, maps those checkpoint IDs to v2 data underrefs/entire/checkpoints/v2/full/*(raw transcripts + hashes), and pulls companion session/prompt metadata fromrefs/entire/checkpoints/v2/mainwhen available.It supports
--list(checkpoint IDs + commit IDs),--dry-run(print every source artifact), and--apply, which builds a new v1 tree, rewrites checkpoint-levelmetadata.jsonto include discovered sessions, and writes a single migration commit updatingrefs/heads/entire/checkpoints/v1.Reviewed by Cursor Bugbot for commit 1ea7f14. Configure here.