Checkpoints V2: Add v2 only settings option#970
Merged
gtrrz-victor merged 12 commits intomainfrom Apr 17, 2026
Merged
Conversation
….com/entireio/cli into add-v2-only-option
Entire-Checkpoint: c3583ee7d00f
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a temporary checkpoints_v2_only strategy option to allow writing/pushing checkpoints exclusively via v2 refs (skipping v1), primarily to support migration testing off of v1 checkpoints.
Changes:
- Introduces
checkpoints_v2_onlyin settings, including helper accessors and tests. - Gates v1 checkpoint writes/pushes/fetches behind
IsCheckpointsV1WriteEnabled, while keeping v2 refs enabled (and error-propagating in some v2-only paths). - Adds unit + integration tests verifying v2-only skips v1 branch writes/pushes and emits a migration hint when the committed settings enable v2-only.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/entire/cli/strategy/push_common.go | Prints a one-time migration hint when committed settings enable checkpoints_v2_only; adds committed-settings detection helper. |
| cmd/entire/cli/strategy/push_common_test.go | Unit tests for committed-settings detection and one-time hint emission. |
| cmd/entire/cli/strategy/manual_commit_push.go | Skips pushing v1 metadata branch when v1 writes are disabled; keeps v2 ref pushing. |
| cmd/entire/cli/strategy/manual_commit_hooks.go | Skips v1 finalization updates in v2-only mode; treats v2 update failures as fatal when v2-only. |
| cmd/entire/cli/strategy/manual_commit_condensation.go | Skips v1 writes when v2-only; propagates v2 write errors in v2-only mode. |
| cmd/entire/cli/strategy/checkpoint_remote.go | Skips v1 metadata-branch fetch in v2-only mode; keeps v2 fetch behavior. |
| cmd/entire/cli/settings/settings.go | Adds checkpoints_v2_only and IsCheckpointsV1WriteEnabled; makes v2-only imply v2-enabled and v2 ref pushing enabled. |
| cmd/entire/cli/settings/settings_test.go | Adds coverage for v2-only semantics in settings helpers. |
| cmd/entire/cli/integration_test/v2_push_test.go | Integration test asserting v2-only skips pushing the v1 metadata branch while still pushing v2 refs. |
| cmd/entire/cli/integration_test/v2_dual_write_test.go | Integration test asserting v2-only skips v1 writes but still produces v2 refs. |
| cmd/entire/cli/checkpoint/v2_read.go | Adds V2GitStore.ReadSessionContentByID to mirror v1 store functionality. |
| cmd/entire/cli/attach.go | Skips v1 write when v2-only; makes v2 write errors fatal only in v2-only mode. |
Comments suppressed due to low confidence (1)
cmd/entire/cli/strategy/manual_commit_push.go:44
- The function-level comment for
PrePushstill says v2 refs are pushed only when bothcheckpoints_v2andpush_v2_refsare enabled, butcheckpoints_v2_onlynow forces v2 ref pushes too. Please update the doc comment to match the new behavior so callers/tests aren’t misled.
// Push v2 refs when enabled.
if settings.IsPushV2RefsEnabled(ctx) {
_, pushV2Span := perf.Start(ctx, "push_v2_refs")
pushV2Refs(ctx, ps.pushTarget())
pushV2Span.End()
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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 1e40c95. Configure here.
Entire-Checkpoint: f65e8e778e0c
Entire-Checkpoint: 18fdaa7a417f
Entire-Checkpoint: 626dbb2b44ff
… in v2 Entire-Checkpoint: 901bb19dd002
gtrrz-victor
approved these changes
Apr 17, 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.

Adds a setting option (
checkpoints_v2_only) for writing and pushing only the v2 checkpoints (skipping v1). Used for testing the migration off of v1. Not intended for production use at this time.Sample output after enabling the option and pushing up
.entire/settings.json:The "
Run 'entire migrate --checkpoints v2'" tip only displays when there are un-migrated v1 checkpoints.Also tested to make sure that v1 is used again once
checkpoints_v2_onlyis removed.Note
Medium Risk
Changes checkpoint persistence and push behavior, including skipping the legacy v1 branch entirely under a new flag; misconfiguration could lead to checkpoints not being written where expected. The change is gated by settings and covered by new integration tests, reducing risk.
Overview
Adds a new
checkpoints_v2_onlystrategy option that makes checkpoint creation, finalization, and pre-push operate in v2-only mode (skip v1 metadata branch writes/fetch/push) while still supporting the existing dual-write path.Updates
attachand manual-commit condensation/finalization to conditionally write/update v1, to treat v2 write failures as fatal only in v2-only mode (warnings in dual-write), and addsV2GitStore.ReadSessionContentByIDto support v2-only finalization’s metadata lookup.Extends push UX and coverage: prints a one-time migration hint when
checkpoints_v2_onlyis committed, and adds integration/unit tests ensuring v1 branches are neither written nor pushed in v2-only mode while v2 refs still land.Reviewed by Cursor Bugbot for commit 1e40c95. Configure here.