Checkpoints V2: Allow for a force flag to rerun a migration that previously completed#885
Merged
computermode merged 3 commits intomainfrom Apr 10, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a --force option to the hidden entire migrate --checkpoints v2 command so users can rerun the v1→v2 checkpoint migration even when v2 data already exists (e.g., after migration logic changes).
Changes:
- Add
--forceflag to rerun v1→v2 migration and reprocess already-migrated checkpoints. - Plumb
forcethrough migration functions to bypass the “already migrated” repair/backfill-only path. - Add unit tests covering forced remigration behavior and flag registration.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cmd/entire/cli/migrate.go | Adds --force and updates migration flow to rewrite existing v2 checkpoints when enabled. |
| cmd/entire/cli/migrate_test.go | Updates existing tests for new function signatures and adds tests for --force behavior. |
c130e79 to
9f1fdec
Compare
Entire-Checkpoint: f7f21da24771
f2569e8 to
efa5e1d
Compare
…ireio/cli into migrate-checkpoints-v2-force-option
pfleidi
previously approved these changes
Apr 10, 2026
pfleidi
approved these changes
Apr 10, 2026
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.
Allow for the option to re-migrate all v1 checkpoints to v2 just in case we need to make changes to how we write v2 checkpoints while testing/validating. (
migrateis a hidden CLI option to switch to v2, it's only used for testing atm)Note
Medium Risk
Adds a
--forcepath that overwrites existing v2 checkpoint data, which increases the chance of unintended data loss if used incorrectly. Logic change is localized to migration flow and covered by new tests.Overview
Adds a
--forceflag to the hiddenmigrate --checkpoints v2command to re-run checkpoint migrations even when v2 data already exists, printing a distinct "Force-migrating" message.Threads the
forceoption through the migration pipeline and changesmigrateOneCheckpointto skip repair/backfill behavior when forcing, instead rewriting v2 session data from v1.Updates and expands tests to pass the new parameter everywhere and to validate forced re-migration behavior (single/multiple checkpoints) plus flag registration.
Reviewed by Cursor Bugbot for commit f2569e8. Configure here.