Remove long-deprecated commands and aliases#1747
Open
gtrrz-victor wants to merge 5 commits into
Open
Conversation
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>
Contributor
There was a problem hiding this comment.
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
.opencodeplugin 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)
…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
enabled auto-merge
July 17, 2026 09:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://entire.io/gh/entireio/cli/trails/853
What
Deletes the CLI surface that has carried deprecation notices for a long time:
entire resetentire clean --session <id>/entire clean --allentire rewind+entire checkpoint rewindresume,attach,explain,tracesession resume,session attach,checkpoint explain,doctor traceAlso removes code that only those commands used:
hideAsAlias(aliascmd.go), all of rewind.go (~1300 lines),TruncateTranscriptAtUUID, andwriteTranscript. TheunknownSessionIDconst moved from rewind.go to state.go.Test changes
checkpoint rewind --listwas the observability mechanism for many checkpoint tests, so removing the command required reworking them:rewind_test.go,logs_only_rewind_test.go, e2erewind_test.go,TestOpenCodeRewind,TestShadow_RewindAndCondensation, the untracked-file-preservation-during-rewind tests, and rewind phases inside broader workflow tests.BranchExists,FileExistsInBranch,ReadFileFromBranch,tasks/<tool-use-id>/metadata paths, sessionStepCount).RewindList/Rewind/RewindLogsOnlywrappers are gone; the factory e2e test polls shadow-branch trees for/tasks/paths instead.attach --reviewunit tests now invoke the canonicalsession attachpath.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 issuesmise run test— passes exceptTestExplainCmd_PositionalArgConflictsWithFlags/TestExplainCmd_SummaryTimeoutSecondsValidation, which fail identically on an unmodified tree in this environment (the repo's own.entire/settings.local.jsonhasenabled: false, socheckDisabledGuardshort-circuits before validation) — pre-existing, unrelatedmise run test:integration— passmise 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(useentire clean),entire rewindandentire checkpoint rewind(no replacement), and hidden shortcutsresume,attach,explain, andtracein favor ofsession/checkpoint/doctorgroup 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 andCLAUDE.mdcommand layout are aligned with the slimmer tree.Tests drop rewind-specific suites (
rewind_test.go,logs_only_rewind_test.go, etc.) and stop usingcheckpoint rewind --listas an observability hook. Remaining integration tests assert checkpoint creation via shadow branch state (BranchExists,FileExistsInBranch, sessionStepCount). Attach tests callsession attachcanonically.Also bumps
.opencode@opencode-ai/plugin1.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.