Skip to content

Remove long-deprecated commands and aliases#1747

Open
gtrrz-victor wants to merge 5 commits into
mainfrom
remove-deprecated-commands
Open

Remove long-deprecated commands and aliases#1747
gtrrz-victor wants to merge 5 commits into
mainfrom
remove-deprecated-commands

Conversation

@gtrrz-victor

@gtrrz-victor gtrrz-victor commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

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

What

Deletes the CLI surface that has carried deprecation notices for a long time:

Removed Replacement
entire reset entire clean --session <id> / entire clean --all
entire rewind + entire checkpoint rewind none (deprecation announced removal)
hidden top-level shortcuts resume, attach, explain, trace session resume, session attach, checkpoint explain, doctor trace

Also removes code that only those commands used: hideAsAlias (aliascmd.go), all of rewind.go (~1300 lines), TruncateTranscriptAtUUID, and writeTranscript. The unknownSessionID const moved from rewind.go to state.go.

Test changes

checkpoint rewind --list was the observability mechanism for many checkpoint tests, so removing the command required reworking them:

  • Deleted tests whose subject was rewind behavior itself: integration rewind_test.go, logs_only_rewind_test.go, e2e rewind_test.go, TestOpenCodeRewind, TestShadow_RewindAndCondensation, the untracked-file-preservation-during-rewind tests, and rewind phases inside broader workflow tests.
  • Adapted tests that used rewind points only to observe checkpoint creation: they now assert directly against shadow-branch contents (BranchExists, FileExistsInBranch, ReadFileFromBranch, tasks/<tool-use-id>/ metadata paths, session StepCount).
  • TestEnv rewind helpers and the e2e RewindList/Rewind/RewindLogsOnly wrappers are gone; the factory e2e test polls shadow-branch trees for /tasks/ paths instead.
  • attach --review unit tests now invoke the canonical session attach path.
  • Docs updated: README (quick start, command table, feature claims, troubleshooting), CLAUDE.md command layout, e2e README.

Deliberately out of scope

The strategy-level rewind machinery (strategy.Rewind, GetRewindPoints, manual_commit_rewind.go) still exists but now has no CLI callers. Removing it cascades much wider; follow-up PR if desired.

Verification

  • golangci-lint run ./... — 0 issues
  • mise run test — passes except TestExplainCmd_PositionalArgConflictsWithFlags / TestExplainCmd_SummaryTimeoutSecondsValidation, which fail identically on an unmodified tree in this environment (the repo's own .entire/settings.local.json has enabled: false, so checkDisabledGuard short-circuits before validation) — pre-existing, unrelated
  • mise run test:integration — pass
  • mise run test:e2e:canary (Vogon) — pass

🤖 Generated with Claude Code


Note

High Risk
This is a breaking CLI change that removes rewind-based file recovery; users and scripts must migrate to session resume/clean, and leftover strategy rewind code could confuse future maintenance until removed.

Overview
Removes deprecated CLI surface that had been announced for removal: entire reset (use entire clean), entire rewind and entire checkpoint rewind (no replacement), and hidden shortcuts resume, attach, explain, and trace in favor of session / checkpoint / doctor group commands. hideAsAlias, reset.go, rewind.go, and related helpers/tests go away with them.

Docs and UX copy no longer promote rewind; recovery is framed as entire session resume. README and CLAUDE.md command layout are aligned with the slimmer tree.

Tests drop rewind-specific suites (rewind_test.go, logs_only_rewind_test.go, etc.) and stop using checkpoint rewind --list as an observability hook. Remaining integration tests assert checkpoint creation via shadow branch state (BranchExists, FileExistsInBranch, session StepCount). Attach tests call session attach canonically.

Also bumps .opencode @opencode-ai/plugin 1.4.7 → 1.14.28. Strategy-level rewind APIs remain in the codebase but have no CLI callers (follow-up noted in the PR).

Reviewed by Cursor Bugbot for commit 47f100f. Configure here.

Remove the CLI surface that has been marked deprecated for a long time:

- `entire reset` (replaced by `entire clean --session/--all`)
- `entire rewind` and `entire checkpoint rewind` (deprecation announced
  removal with no replacement; deletes rewind.go and its tests)
- hidden top-level alias shortcuts `resume`, `attach`, `explain`, `trace`
  (canonical forms live under `session`, `checkpoint`, and `doctor`)
- the now-unused `hideAsAlias` helper, `TruncateTranscriptAtUUID`, and
  `writeTranscript`

Integration and e2e suites that used `checkpoint rewind --list` as
checkpoint observability now assert directly against shadow-branch
contents (branch existence, file presence, tasks/<tool-use-id>/ metadata
paths). Tests whose subject was rewind behavior itself are deleted.
Docs (README, CLAUDE.md, e2e README) drop the deprecated commands and
rewind claims.

The strategy-level rewind machinery (strategy.Rewind, GetRewindPoints,
manual_commit_rewind.go) is intentionally untouched; removing it is a
larger follow-up.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 14, 2026 13:44
@gtrrz-victor
gtrrz-victor requested a review from a team as a code owner July 14, 2026 13:44

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.

Pull request overview

This PR removes long-deprecated CLI commands/aliases (notably reset and checkpoint rewind/rewind) and deletes their associated implementation code, then updates documentation and test suites to validate checkpoint creation via shadow-branch state rather than rewind-based observability.

Changes:

  • Remove deprecated command surface (reset, rewind, checkpoint rewind, and hidden top-level shortcuts) and delete related implementation/helpers.
  • Refactor integration/E2E tests to assert checkpoint/task-checkpoint creation via shadow-branch contents and session state instead of rewind --list.
  • Update docs/help text and supporting artifacts to reflect the slimmer command tree; bump .opencode plugin dependency.

Reviewed changes

Copilot reviewed 36 out of 37 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
README.md Removes rewind-focused UX/docs; reframes recovery around resume.
e2e/tests/rewind_test.go Deletes E2E coverage for removed rewind CLI behavior.
e2e/tests/factory_hooks_test.go Replaces rewind-list polling with shadow-branch tree polling for task checkpoints.
e2e/README.md Updates E2E directory documentation to remove “rewind” wrapper mention.
e2e/entire/entire.go Removes rewind CLI wrappers/types used by deleted E2E tests.
cmd/entire/cli/transcript.go Removes rewind-only transcript truncation/write helpers.
cmd/entire/cli/transcript_test.go Deletes tests for removed transcript truncation helper.
cmd/entire/cli/state.go Moves unknownSessionID constant into shared state code.
cmd/entire/cli/sessions.go Updates imported-history note text to remove “rewindable” wording.
cmd/entire/cli/root.go Stops registering removed deprecated/alias commands on the root command.
cmd/entire/cli/rewind.go Deletes the rewind command implementation.
cmd/entire/cli/rewind_test.go Deletes unit tests specific to the removed rewind command.
cmd/entire/cli/rewind_imports_test.go Deletes tests for imported-checkpoint rewind refusal path.
cmd/entire/cli/resume_test.go Removes tests for helpers that were only used by rewind flows.
cmd/entire/cli/reset.go Deletes deprecated reset command implementation.
cmd/entire/cli/reset_test.go Deletes unit tests for removed reset command.
cmd/entire/cli/integration_test/testenv.go Removes rewind CLI wrappers used by integration tests.
cmd/entire/cli/integration_test/subdirectory_test.go Asserts shadow-branch content instead of rewind points.
cmd/entire/cli/integration_test/setup_cmd_test.go Removes integration coverage for rewind-when-disabled behavior.
cmd/entire/cli/integration_test/rewind_test.go Deletes integration coverage for removed rewind workflows.
cmd/entire/cli/integration_test/opencode_hooks_test.go Replaces rewind-point assertions with shadow-branch assertions.
cmd/entire/cli/integration_test/mid_session_rebase_test.go Replaces rewind verification with shadow-branch/state verification.
cmd/entire/cli/integration_test/manual_commit_workflow_test.go Removes rewind phase; validates checkpoint creation via branch/state.
cmd/entire/cli/integration_test/manual_commit_untracked_files_test.go Deletes rewind-related untracked-file preservation suites.
cmd/entire/cli/integration_test/logs_only_rewind_test.go Deletes logs-only rewind integration suites (CLI removed).
cmd/entire/cli/integration_test/import_claude_test.go Removes “rewind refusal” assertion for imported checkpoints.
cmd/entire/cli/integration_test/deferred_finalization_test.go Updates reset-session flow to use clean --session.
cmd/entire/cli/integration_test/default_branch_test.go Uses shadow-branch assertions (and task checkpoint path checks) instead of rewind points.
cmd/entire/cli/integration_test/attribution_test.go Verifies checkpoint count via session state instead of rewind list.
cmd/entire/cli/integration_test/agent_strategy_test.go Removes rewind-based assertions; checks shadow-branch writes.
cmd/entire/cli/import_cmd.go Updates import help text to remove rewind claims for imported history.
cmd/entire/cli/checkpoint_group.go Removes deprecated rewind subcommand registration.
cmd/entire/cli/attach_test.go Updates tests to invoke canonical session attach path.
cmd/entire/cli/aliascmd.go Deletes hideAsAlias helper (no longer needed).
cmd/entire/cli/aliascmd_test.go Deletes tests for removed alias helper.
CLAUDE.md Updates command layout docs to remove shortcut/rewind/reset references.
.opencode/package-lock.json Bumps @opencode-ai/plugin (and SDK) dependency versions.
Files not reviewed (1)
  • .opencode/package-lock.json: Generated file
Comments suppressed due to low confidence (1)

cmd/entire/cli/integration_test/deferred_finalization_test.go:1044

  • This test now calls clean, but several variable names and log/error strings still refer to "reset", which makes failures harder to interpret when debugging.
	t.Logf("TurnCheckpointIDs before reset: %v", state.TurnCheckpointIDs)

	// Clean the session using the CLI
	output, resetErr := env.RunCLIWithError("clean", "--session", sess.ID, "--force")
	t.Logf("Reset output: %s", output)
	if resetErr != nil {
		t.Fatalf("Reset failed: %v", resetErr)
	}

	// Verify session state is cleared (file deleted)
	state, err = env.GetSessionState(sess.ID)
	if err != nil {
		t.Fatalf("GetSessionState after reset failed unexpectedly: %v", err)
	}
	if state != nil {
		t.Errorf("Session state should be nil after reset, got: phase=%s, TurnCheckpointIDs=%v",
			state.Phase, state.TurnCheckpointIDs)

Comment thread cmd/entire/cli/import_cmd.go
gtrrz-victor and others added 4 commits July 17, 2026 10:41
…mands

# Conflicts:
#	CLAUDE.md
#	cmd/entire/cli/checkpoint_group.go
#	cmd/entire/cli/integration_test/setup_cmd_test.go
#	cmd/entire/cli/integration_test/testenv.go
#	cmd/entire/cli/rewind.go
#	cmd/entire/cli/rewind_test.go
#	cmd/entire/cli/root.go
#	e2e/entire/entire.go
Copilot review: dropping 'not rewindable' (rewind is gone) also lost the
read-only caveat. Imported sessions still cannot be resumed, so say that.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
RunResume/RunResumeForce, attach helpers, and the explain subprocess still
invoked the removed top-level shortcuts, failing 20 integration tests with
'unknown command'. Point them at session/checkpoint group forms.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gtrrz-victor
gtrrz-victor enabled auto-merge July 17, 2026 09:20
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.

2 participants