Skip to content

Checkpoints V2: Add v2 only settings option#970

Merged
gtrrz-victor merged 12 commits intomainfrom
add-v2-only-option
Apr 17, 2026
Merged

Checkpoints V2: Add v2 only settings option#970
gtrrz-victor merged 12 commits intomainfrom
add-v2-only-option

Conversation

@computermode
Copy link
Copy Markdown
Contributor

@computermode computermode commented Apr 16, 2026

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:

➜  test-repo git:(main) ✗ git push origin HEAD
[entire] Pushing v2/main to origin... already up-to-date
[entire] Note: .entire/settings.json enables checkpoints_v2_only. Run 'entire migrate --checkpoints v2' to migrate existing checkpoints to v2.
[entire] Use 'entire migrate --checkpoints v2 --force' to rewrite all checkpoints in v2.
[entire] Pushing v2/full/current to origin... already up-to-date

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_only is 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_only strategy 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 attach and 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 adds V2GitStore.ReadSessionContentByID to support v2-only finalization’s metadata lookup.

Extends push UX and coverage: prints a one-time migration hint when checkpoints_v2_only is 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.

Copilot AI review requested due to automatic review settings April 16, 2026 20:22
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 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_only in 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 PrePush still says v2 refs are pushed only when both checkpoints_v2 and push_v2_refs are enabled, but checkpoints_v2_only now 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()

Comment thread cmd/entire/cli/strategy/manual_commit_hooks.go Outdated
Comment thread cmd/entire/cli/strategy/manual_commit_condensation.go Outdated
Comment thread cmd/entire/cli/checkpoint/v2_read.go Outdated
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread cmd/entire/cli/strategy/manual_commit_hooks.go Outdated
Entire-Checkpoint: f65e8e778e0c
Entire-Checkpoint: 18fdaa7a417f
Entire-Checkpoint: 626dbb2b44ff
@computermode computermode marked this pull request as ready for review April 16, 2026 22:18
@computermode computermode requested a review from a team as a code owner April 16, 2026 22:18
@computermode computermode requested a review from pfleidi April 17, 2026 04:13
@gtrrz-victor gtrrz-victor merged commit 98c86d1 into main Apr 17, 2026
9 checks passed
@gtrrz-victor gtrrz-victor deleted the add-v2-only-option branch April 17, 2026 15:51
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