Add fast path checks for checkpoints migrations#1108
Merged
computermode merged 1 commit intomainfrom May 4, 2026
Merged
Conversation
Adds fast path checks for a few cases during migration: * avoid the whole repair branch when critical components are missing * check if required v2 fields are already present when rerunning migration to skip more quickly Entire-Checkpoint: 1e3e28c2a692
pfleidi
approved these changes
May 4, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Speeds up entire migrate --checkpoints v2 reruns by short-circuiting checkpoints that already look fully migrated and by avoiding unnecessary v1 reads during compact-transcript backfill. This fits into the migration path for the CLI’s v1→v2 checkpoint storage.
Changes:
- Added a fast-path in
migrateOneCheckpointto skip already-complete v2 checkpoints. - Added
v2CheckpointFullyMigratedto detect when compact transcripts and/full/*artifacts already exist. - Optimized compact-transcript backfill to inspect v2 metadata first and skip v1 transcript reads for sessions with no recorded agent.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
cmd/entire/cli/migrate.go |
Adds the new rerun fast-path and the metadata-first backfill shortcut. |
cmd/entire/cli/migrate_test.go |
Adds tests for the fast-path helper and the no-agent backfill shortcut. |
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.
https://entire.io/gh/entireio/cli/trails/289
Speed up
entire migrate --checkpoints v2reruns by short-circuiting checkpoints that are already fully migrated and avoiding redundant v1 reads for permanently unmigratable compact transcripts.migrateOneCheckpointthat returnserrAlreadyMigratedwhen the v2 checkpoint already has a compact transcript and/full/<n>artifacts for every sessionbackfillCompactTranscripts, read the v2 session metadata first and skip the v1 transcript decode whenAgent == ""(compact is permanently unrecoverable for those sessions)Note
Medium Risk
Changes checkpoint migration control-flow to short-circuit work on reruns, which could affect whether repairs/backfills run for partially migrated data. Covered by new tests, but it still touches a data-migration path.
Overview
Speeds up
entire migrate --checkpoints v2reruns by adding a fast-path inmigrateOneCheckpointthat immediately skips checkpoints already fully migrated (all sessions have compact transcripts and archived/full/<n>artifacts).Optimizes compact transcript backfill by first checking v2 session metadata and skipping v1 reads for sessions with no recorded agent type (permanently non-generatable compact transcripts). Adds focused tests for the new predicate, fast-path behavior, and the no-agent skip case.
Reviewed by Cursor Bugbot for commit 7d09b51. Configure here.