Skip to content

chore: rename cascade to restack more generally#94

Merged
boneskull merged 1 commit intomainfrom
cascade-to-restack-redux
Apr 18, 2026
Merged

chore: rename cascade to restack more generally#94
boneskull merged 1 commit intomainfrom
cascade-to-restack-redux

Conversation

@boneskull
Copy link
Copy Markdown
Owner

@boneskull boneskull commented Apr 18, 2026

cascade is still retained as an alias of restack.

`cascade` is still retained as an alias of `restack`.
@boneskull
Copy link
Copy Markdown
Owner Author

📚 Pull Request Stack


Managed by gh-stack

@claude
Copy link
Copy Markdown

claude Bot commented Apr 18, 2026

Claude finished @boneskull's task in 1m 21s —— View job


Code Review

  • Gather context
  • Read CLAUDE.md and relevant changed files
  • Analyze changes
  • Post review feedback

Overall this is a clean, mechanical rename — the diff is exactly what you'd expect from s/cascade/restack/g applied thoughtfully with the alias preserved. No logic was changed, which is the right approach for a rename-only PR. I found two minor issues worth fixing and two observations worth noting.


Issues

1. Typo: restackdSha in e2e/undo_test.go

e2e/undo_test.go:71-84 — the variable was renamed from cascadedSha but gained a typo in the process:

restackdSha := env.BranchTip("feature-a")       // ← "restackd" missing an 'e'
if restackdSha == featureASha {
    t.Fatal("restack didn't change SHA")
}
// Branch should still be at restackd SHA              // ← same typo in comment
afterDryRunSha := env.BranchTip("feature-a")
if afterDryRunSha != restackdSha {

Should be restackedSha (and "restacked SHA" in the comment). Fix this →

2. Stale comment in cmd/continue.go

cmd/continue.go:87 — one comment was only half-updated:

// If there are more branches to restack, continue cascading

The first half was updated but "continue cascading" was not changed to "continue restacking". Fix this →


Observations (not blocking)

3. State file name still contains "cascade"

internal/state/state.go:11 — the on-disk state file is still named STACK_CASCADE_STATE. This is probably intentional (avoids breaking existing state files on disk), and the doc comments already acknowledge the mismatch ("Save persists restack state to .git/STACK_CASCADE_STATE"). Fine to leave as-is, but could be worth a code comment explaining the intentional choice to preserve the filename for backward compatibility.

4. "operation": "cascade""operation": "restack" is a breaking change for in-flight operations

internal/state/state.go:47OperationCascade = "cascade" is now OperationRestack = "restack". The string value stored in the JSON state file changes. If a user has an in-progress cascade operation (i.e., a STACK_CASCADE_STATE file on disk with "operation": "cascade") when they upgrade, displayOperationName and any operation comparisons will silently fall through. The impact is small (edge case; just affects display name and submit-vs-restack routing during conflict resume), but worth being aware of. A migration or note in the changelog would be nice.


Summary: Approve with minor fixes — the two issues above are quick cleanup and don't affect behavior.

@boneskull boneskull changed the title chore: rename cascade to restack more generally cascade is still retained as an alias of restack. chore: rename cascade to restack more generally Apr 18, 2026
@boneskull boneskull merged commit 115ce65 into main Apr 18, 2026
9 checks passed
@boneskull boneskull deleted the cascade-to-restack-redux branch April 18, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant