Skip to content

Checkpoints V2: Allow for a force flag to rerun a migration that previously completed#885

Merged
computermode merged 3 commits intomainfrom
migrate-checkpoints-v2-force-option
Apr 10, 2026
Merged

Checkpoints V2: Allow for a force flag to rerun a migration that previously completed#885
computermode merged 3 commits intomainfrom
migrate-checkpoints-v2-force-option

Conversation

@computermode
Copy link
Copy Markdown
Contributor

@computermode computermode commented Apr 9, 2026

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. (migrate is a hidden CLI option to switch to v2, it's only used for testing atm)


Note

Medium Risk
Adds a --force path 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 --force flag to the hidden migrate --checkpoints v2 command to re-run checkpoint migrations even when v2 data already exists, printing a distinct "Force-migrating" message.

Threads the force option through the migration pipeline and changes migrateOneCheckpoint to 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.

Copilot AI review requested due to automatic review settings April 9, 2026 00:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 --force flag to rerun v1→v2 migration and reprocess already-migrated checkpoints.
  • Plumb force through 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.

@computermode computermode force-pushed the transcript-start-at-metadata branch from c130e79 to 9f1fdec Compare April 9, 2026 18:29
@computermode computermode force-pushed the migrate-checkpoints-v2-force-option branch from f2569e8 to efa5e1d Compare April 9, 2026 19:09
@computermode computermode marked this pull request as ready for review April 10, 2026 21:50
@computermode computermode requested a review from a team as a code owner April 10, 2026 21:50
pfleidi
pfleidi previously approved these changes Apr 10, 2026
Base automatically changed from transcript-start-at-metadata to main April 10, 2026 23:50
@computermode computermode dismissed pfleidi’s stale review April 10, 2026 23:50

The base branch was changed.

@computermode computermode enabled auto-merge April 10, 2026 23:53
@computermode computermode merged commit e69abd3 into main Apr 10, 2026
9 checks passed
@computermode computermode deleted the migrate-checkpoints-v2-force-option branch April 10, 2026 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants