Skip to content

Make git-refs the sole enable default; drop backend picker - #1900

Merged
gtrrz-victor merged 1 commit into
mainfrom
git-refs-as-default-backend
Aug 5, 2026
Merged

gtrrz-victor merged 1 commit into
mainfrom
git-refs-as-default-backend

Conversation

@gtrrz-victor

@gtrrz-victor gtrrz-victor commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

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

Summary

  • entire enable no longer prompts new users to choose between the git-refs and branch checkpoint backends — a storage-topology decision they can't meaningfully answer during first-run setup.
  • git-refs (already the recommendation) is now written silently on first run.
  • The branch backend stays fully reachable non-interactively via --checkpoint-backend branch.

Changes

  • Removed promptCheckpointBackend / checkpointBackendChoices and the huh picker from checkpoint_backend.go.
  • Simplified resolveFirstRunCheckpointBackend: flag wins, else git-refs default on first run.
  • ENTIRE_CHECKPOINTS_PRIMARY env override and the config-less git-branch runtime fallback are unchanged, so existing repos are untouched.
  • Dropped the picker unit test and the redundant "without --yes" subtest (only covered the deleted prompt branch).

Test plan

  • go build ./cmd/...
  • go test ./cmd/entire/cli/ -run 'TestRunEnableInteractive_FirstRunDefaultsToGitRefs|TestResolveCheckpointBackendType|TestApplyCheckpointBackend|TestUpdateCheckpointBackend' — pass
  • golangci-lint v2.11.3 on cmd/entire/cli/... — 0 issues

🤖 Generated with Claude Code


Note

Low Risk
Setup UX and default-selection logic only; env override, configure path, and legacy config-less behavior are explicitly preserved.

Overview
First-time entire enable no longer asks users to pick checkpoint storage in an interactive form. git-refs is applied silently on first run (same as the former recommendation), while --checkpoint-backend branch still selects the shared branch backend.

The huh picker (promptCheckpointBackend / checkpointBackendChoices) is removed from checkpoint_backend.go, and resolveFirstRunCheckpointBackend is reduced to: explicit flag wins, else first-run default via firstRunCheckpointBackendDefault() (still empty when ENTIRE_CHECKPOINTS_PRIMARY is set so settings are not written). Config-less repos keep the git-branch runtime fallback; entire configure --checkpoint-backend is unchanged.

Tests for the picker contract and the headless “without --yes” branch that only exercised the deleted prompt are dropped.

Reviewed by Cursor Bugbot for commit 408435d. Configure here.

Choosing the checkpoint backend during first-run setup added a
storage-topology decision new users can't meaningfully answer. git-refs
is already the recommendation, so write it silently and remove the
interactive prompt. Branch stays reachable via --checkpoint-backend.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 01KZ8MGVACAGY6FZR9173MD034
@gtrrz-victor
gtrrz-victor requested a review from a team as a code owner August 5, 2026 09:38
Copilot AI lite review requested due to automatic review settings August 5, 2026 09:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Ready to approve

The change cleanly removes the interactive picker while preserving explicit flag selection and the env-override suppression behavior, with remaining tests covering the intended first-run defaults.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

This PR streamlines first-time entire enable by removing the interactive checkpoint-backend picker and making git-refs the sole default written on first run, while preserving non-interactive selection via --checkpoint-backend branch and honoring the ENTIRE_CHECKPOINTS_PRIMARY env override (so settings aren’t written when the env fully controls backend selection).

Changes:

  • Removed the interactive checkpoint-backend picker (promptCheckpointBackend / checkpointBackendChoices) and simplified first-run selection to: explicit flag wins, else first-run default.
  • Updated runEnableInteractive to use the new non-interactive resolveFirstRunCheckpointBackend signature.
  • Removed tests that only covered the deleted prompt/choice contract.
File summaries
File Description
cmd/entire/cli/setup.go Simplifies first-run backend selection to flag-first, else git-refs default (or empty when env override is active).
cmd/entire/cli/setup_test.go Drops the subtest that only exercised the removed prompt branch.
cmd/entire/cli/checkpoint_backend.go Removes the huh-based picker helpers and prompt implementation.
cmd/entire/cli/checkpoint_backend_test.go Removes tests that validated the now-deleted picker option ordering/labeling contract.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

@gtrrz-victor
gtrrz-victor enabled auto-merge August 5, 2026 09:43

@pjbgf pjbgf left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great to see this landing. 🙌

@gtrrz-victor
gtrrz-victor merged commit 61192f5 into main Aug 5, 2026
14 checks passed
@gtrrz-victor
gtrrz-victor deleted the git-refs-as-default-backend branch August 5, 2026 11:33
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