Checkpoints v2 push speedup: simplify v2 migration hint check#1209
Conversation
Replace the v1↔v2 cross-check in the migration hint with a single "does v2 /main exist?" ref probe. The hint now only fires when migration was never run; partial migrations are no longer flagged (drift is acceptable post-migration since we still fall back to v1 in the UI when displaying transcripts). This also drops the per-push cost of listing the full v1 and v2 committed-checkpoint sets just to decide whether to print one line. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 4538743510a7
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 f7a4cb4. Configure here.
There was a problem hiding this comment.
Pull request overview
This PR simplifies when the CLI prints the “checkpoints v2 migration” hint during push-related flows by replacing the previous v1↔v2 inventory comparison with a single probe for the v2 /main ref (refs/entire/checkpoints/v2/main). This reduces per-push overhead and changes the hint to only trigger when the v2 /main ref is absent.
Changes:
- Replace the v1 vs v2 checkpoint set cross-check with a v2
/mainref existence probe. - Update the user-facing hint text to reflect the new condition (missing v2
/mainref). - Simplify and update unit tests to match the new hinting behavior; remove tests for the old inventory-based helper.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cmd/entire/cli/strategy/push_common.go | Switch hint gating logic to a v2 /main ref existence probe and update messaging. |
| cmd/entire/cli/strategy/push_common_test.go | Update tests to validate the new ref-probe-based hint behavior; remove old helper coverage. |

https://entire.io/gh/entireio/cli/trails/375
Summary
This PR improves the performance of the pre-push hook for v2-enabled repos with 100+ checkpoints down from ~60s (!) to 20s. Tested with the
entiredbrepo. Observed push times went down from close to a minute to about 20 seconds (still unacceptable but much better while the refs fixes are being addressed). Double-checked and ensured checkpoints were pushed up correctly.Extracted from #1208 — the rotation/blob-fetch perf fixes from that PR are left in place there.
Test plan
mise run fmt && mise run lintcleango test ./cmd/entire/cli/strategy/ -run TestPrintCheckpointsV2MigrationHintpassesv2/mainexists, even with v1 checkpoints that were never mirrored🤖 Generated with Claude Code
Note
Low Risk
Low risk: changes are limited to advisory stderr hint logic during pushes and corresponding tests, with no impact on checkpoint data writes or syncing behavior.
Overview
printCheckpointsV2MigrationHintnow decides whether to warn solely by probing forrefs/entire/checkpoints/v2/main(viav2MainRefExists) whencheckpoints_version: 2is committed, rather than listing and cross-checking v1/v2 checkpoint inventories.Tests were updated accordingly by removing v1-mirroring fixtures and deleting the
hasUnmigratedV1Checkpointstest suite, and by asserting the hint is suppressed once v2/mainexists and printed otherwise.Reviewed by Cursor Bugbot for commit f7a4cb4. Configure here.