Skip to content

Restore checkpoints v1 as source of truth#1285

Merged
pfleidi merged 9 commits into
mainfrom
fix/checkpoints-v2-remove-dual-reads
May 30, 2026
Merged

Restore checkpoints v1 as source of truth#1285
pfleidi merged 9 commits into
mainfrom
fix/checkpoints-v2-remove-dual-reads

Conversation

@pfleidi
Copy link
Copy Markdown
Contributor

@pfleidi pfleidi commented May 28, 2026

https://entire.io/gh/entireio/cli/trails/442

What

  • Restores committed checkpoint reads, resume, explain, export, and related workflows to entire/checkpoints/v1.
  • Removes checkpoint v2 reader/store/migration/settings/fetch/reconcile paths and tests.
  • Keeps the transcript compact package for the next v1 iteration.

How

  • Replaces dual-reader paths with direct v1 GitStore reads.
  • Deletes v2 stores, resolvers, fixtures, migrate command, and v2 push/fetch/reconcile behavior.
  • Updates tests and docs around explain, resume, dispatch, cleanup, settings, doctor, and checkpoint remotes.

Verification

  • mise run build
  • mise run lint
  • mise run test:ci:core
  • mise run test:integration
  • mise run test:e2e:canary TestDoctorNoIssues
  • go test ./cmd/entire/cli -run 'Test(Explain|Resume)'
  • mise run lint

Note

High Risk
Large removal across checkpoint storage, explain/resume/export, and fetch paths; wrong v1 assumptions could break reading older repos that relied on v2-only data until re-migrated.

Overview
This PR rolls back checkpoints v2 and makes v1 (entire/checkpoints/v1 via GitStore) the only committed checkpoint backend for reads, writes, explain, resume, dispatch, and status.

The large deletion in checkpoint removes NewCommittedReader, DualCheckpointReader, V2GitStore, v2 read/resolve helpers, and their fixtures/tests. Explain and export no longer prefer v2 /main or compact transcripts: they open GitStore directly, prefetch only v1 blobs, and stream stored JSONL for --transcript / --raw-transcript. Git fetch drops v2 ref helpers (FetchV2Main*, checkpoint-remote v2 fetch); tests and docs no longer mention migrate or v2 settings.

Help text and comments are updated so v1 is described as the checkpoint store; migration-era dual-read behavior is gone.

Reviewed by Cursor Bugbot for commit 8377a19. Configure here.

pfleidi added 6 commits May 27, 2026 15:43
Entire-Checkpoint: 1ad9d2a3faae
Entire-Checkpoint: d59de540a72b
Entire-Checkpoint: 562af1370dd9
The wrapper existed to handle NewCommittedReader's error return and
blob-fetcher plumbing; with the factory gone it only added a
WarnIfMetadataDisconnected call on top of getCheckpointStore. Inline
the warning + store call at the three callers.

Entire-Checkpoint: 520cd98dabca
Entire-Checkpoint: f624cbbc46fd
Entire-Checkpoint: dc5a3c686792
Copilot AI review requested due to automatic review settings May 28, 2026 00:39
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

This PR removes checkpoints v2 runtime and test paths and restores entire/checkpoints/v1 (checkpoint.GitStore) as the sole committed-checkpoint source of truth for explain/resume/export/list and related workflows across the CLI.

Changes:

  • Replaces version-aware/dual committed-checkpoint readers with direct checkpoint.NewGitStore(repo) usage (with blob fetcher wiring where needed).
  • Removes checkpoints v2 refs/constants, v2 store/resolve/read implementations, v2 fixtures/tests, and the hidden migrate command.
  • Updates tests and help/docs to reflect v1-only committed checkpoint behavior (including transcript export semantics).

Reviewed changes

Copilot reviewed 50 out of 50 changed files in this pull request and generated no comments.

Show a summary per file
File Description
e2e/tests/doctor_test.go Drops assertions related to removed v2 doctor output.
cmd/entire/cli/v2_checkpoint_fixture_test.go Deletes CLI-level v2 checkpoint fixture helpers.
cmd/entire/cli/strategy/v2_checkpoint_fixture_test.go Deletes strategy-level v2 checkpoint fixture helpers.
cmd/entire/cli/strategy/session.go Removes v2 fallback when deriving checkpoint descriptions.
cmd/entire/cli/strategy/session_test.go Removes tests covering v1→v2 description fallback.
cmd/entire/cli/strategy/push_common_test.go Removes tests for v2-settings push-time warnings.
cmd/entire/cli/strategy/metadata_reconcile.go Deletes v2 ref disconnection/repair helpers used by doctor/reconcile.
cmd/entire/cli/strategy/manual_commit.go Removes committed-reader factory method; keeps v1 GitStore accessor.
cmd/entire/cli/strategy/manual_commit_test.go Removes tests asserting v2-local listing behavior.
cmd/entire/cli/strategy/manual_commit_rewind.go Switches RestoreLogsOnly to use v1 GitStore directly (with metadata warning).
cmd/entire/cli/strategy/manual_commit_push.go Removes v2-settings warning call in pre-push flow.
cmd/entire/cli/strategy/manual_commit_condensation.go Switches list/log reads to v1 GitStore directly (with metadata warning).
cmd/entire/cli/strategy/common.go Removes v2 fetch tmp ref constant and switches listing to v1 GitStore.
cmd/entire/cli/strategy/checkpoint_remote.go Removes URL-based v2 /main fetch helper.
cmd/entire/cli/strategy/checkpoint_remote_test.go Removes tests for v2 URL fetch behavior.
cmd/entire/cli/settings/settings.go Removes checkpoints v2 settings parsing and warning helpers.
cmd/entire/cli/settings/settings_test.go Updates tests to focus on non-v2 settings behavior; removes v2-related tests.
cmd/entire/cli/root.go Unregisters the hidden migrate command.
cmd/entire/cli/rewind.go Uses v1 GitStore for committed transcript restore.
cmd/entire/cli/review_helpers.go Uses v1 GitStore for “head has review checkpoint” checks.
cmd/entire/cli/review_context.go Uses v1 GitStore for building review context from committed checkpoints.
cmd/entire/cli/resume.go Switches resume committed reads to v1 GitStore and removes v2 metadata fetch path.
cmd/entire/cli/resume_test.go Updates tests to assert v1-only resolution/transcript behavior.
cmd/entire/cli/paths/paths.go Removes v2 ref constants and compact/v2 transcript filename constants.
cmd/entire/cli/migrate.go Deletes deprecated hidden migrate command stub.
cmd/entire/cli/migrate_test.go Deletes tests for the removed migrate command.
cmd/entire/cli/integration_test/v2_resume_test.go Deletes integration tests specifically covering v2 resume modes/fallbacks.
cmd/entire/cli/integration_test/testenv.go Generalizes ref-reading comment (no longer v2-specific).
cmd/entire/cli/integration_test/explain_test.go Removes v2-mode matrix and v2 treeless assertions; keeps v1 treeless coverage.
cmd/entire/cli/git_operations.go Removes origin/checkpoint-remote v2 fetch helpers.
cmd/entire/cli/fetch_no_config_pollution_test.go Removes v2 fetch cases and v2 shallow-repo regression test.
cmd/entire/cli/explain.go Uses v1 GitStore directly for explain read/list/generate; removes v2 content preference logic.
cmd/entire/cli/explain_test.go Removes v2-only explain tests and updates remaining tests to v1-only expectations.
cmd/entire/cli/explain_export.go Removes v2 metadata fetch heuristics and compact transcript streaming; streams stored v1 transcript bytes.
cmd/entire/cli/explain_export_test.go Reworks export fixtures to write v1 committed checkpoints via GitStore.
cmd/entire/cli/dispatch/mode_local.go Uses v1 GitStore for candidate enumeration (no version-aware reader).
cmd/entire/cli/dispatch/mode_local_test.go Updates settings fixture to non-v2 keys consistent with v1-only behavior.
cmd/entire/cli/clean_test.go Removes v2 help-text expectation.
cmd/entire/cli/checkpoint/v2_store.go Deletes v2 store implementation.
cmd/entire/cli/checkpoint/v2_store_test.go Deletes v2 store tests.
cmd/entire/cli/checkpoint/v2_resolve.go Deletes v2 metadata tree resolver.
cmd/entire/cli/checkpoint/v2_resolve_test.go Deletes v2 resolver tests.
cmd/entire/cli/checkpoint/v2_read.go Deletes v2 read paths (main/full refs, archived refs, compact transcript).
cmd/entire/cli/checkpoint/v2_read_test.go Deletes v2 read-path tests.
cmd/entire/cli/checkpoint/v2_fixture_test.go Deletes v2 checkpoint fixture utilities in checkpoint package.
cmd/entire/cli/checkpoint/committed_reader_resolve.go Removes dual-reader factory and v2 interfaces; keeps v1 reader interfaces + helpers.
cmd/entire/cli/checkpoint/committed_reader_resolve_test.go Replaces dual-reader tests with v1-focused normalization and latest-session transcript tests.
cmd/entire/cli/checkpoint/checkpoint.go Updates v1 committed-write comment to remove v2 migration reference.
cmd/entire/cli/attach.go Removes migrate from logging-close comment list.
CLAUDE.md Updates hidden command inventory to remove migrate.

Entire-Checkpoint: 79dde9bf9b95
@pfleidi
Copy link
Copy Markdown
Contributor Author

pfleidi commented May 28, 2026

Bugbot run

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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 8377a19. Configure here.

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

Copilot reviewed 52 out of 52 changed files in this pull request and generated no new comments.

@pfleidi pfleidi marked this pull request as ready for review May 28, 2026 17:17
@pfleidi pfleidi requested a review from a team as a code owner May 28, 2026 17:17
computermode
computermode previously approved these changes May 28, 2026
pfleidi added 2 commits May 28, 2026 11:40
…li into fix/checkpoints-v2-remove-dual-reads
Entire-Checkpoint: bbf397c6ef51
@pfleidi pfleidi merged commit b732950 into main May 30, 2026
9 checks passed
@pfleidi pfleidi deleted the fix/checkpoints-v2-remove-dual-reads branch May 30, 2026 00:34
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