Skip to content

✨ Stabilize migrate subcommand#2992

Open
ChanTsune wants to merge 1 commit intomainfrom
cli/stabilize-experimental-migrate
Open

✨ Stabilize migrate subcommand#2992
ChanTsune wants to merge 1 commit intomainfrom
cli/stabilize-experimental-migrate

Conversation

@ChanTsune
Copy link
Copy Markdown
Owner

@ChanTsune ChanTsune commented Apr 23, 2026

The migrate command has been moved out of experimental and is now a stable CLI subcommand. A deprecation warning is added to the experimental migrate alias to inform users to use the new stable migrate command, and related module visibility and command dispatch logic are updated accordingly. Mirrors the prior pattern applied to sort (f2f15d3) and delete (5417b47).

Summary by CodeRabbit

  • New Features

    • Added migrate command to upgrade archives created by previous versions.
  • Deprecations

    • The experimental migrate subcommand is now stabilized; use the standard migrate command instead.

The migrate command has been moved out of experimental and is now a
stable CLI subcommand. A deprecation warning is added to the
`experimental migrate` alias to inform users to use the new stable
`migrate` command, and related module visibility and command dispatch
logic are updated accordingly. Mirrors the prior pattern applied to
`sort` (f2f15d3) and `delete` (5417b47).
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 23, 2026

📝 Walkthrough

Walkthrough

The PR stabilizes the Migrate subcommand by adding it as a public variant to the Commands enum, exporting the migrate module publicly, and wiring the command dispatch. The experimental migrate subcommand now emits a stabilization warning and delegates to the stable command.

Changes

Cohort / File(s) Summary
CLI Command Dispatch
cli/src/cli.rs, cli/src/command.rs
Added Migrate(MigrateCommand) variant to Commands enum with corresponding import; exported migrate module publicly and added dispatch match-arm to execute migrate commands.
Experimental Subcommand Handling
cli/src/command/experimental.rs
Updated experimental migrate subcommand to emit stabilization warning, direct users to the stable migrate command, and delegate execution to MigrateCommand.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • #1561: Makes analogous edits to stabilize another CLI command by adding enum variants, exporting modules, and wiring match-arms in the same CLI infrastructure.
  • #2544: Adds test coverage for the migrate subcommand functionality that this PR stabilizes and exposes.
  • #2987: Updates experimental subcommand stabilization patterns in the same file for a different command (delete), following the same warning-and-delegate approach.

Suggested labels

cli

Poem

🐰 A migrate command, once cloaked in experimental shade,
Now steps into the light, stable and unafraid!
The enum grows, the match-arm springs to life,
No more warnings whisper—just smooth archive strife! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly reflects the main objective: stabilizing the migrate subcommand by moving it from experimental to stable. However, it includes an emoji which adds noise rather than clarity.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cli/stabilize-experimental-migrate

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ChanTsune ChanTsune linked an issue Apr 23, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
cli/src/command/experimental.rs (1)

42-52: LGTM — mirrors the sort/delete stabilization pattern.

The deprecation warning and the updated about text for Migrate are consistent with the existing Delete and Sort branches, and delegation to cmd.execute(ctx) preserves behavior for existing users.

Minor nit (optional, not blocking): the warning string starts a new sentence with lowercase "this command will be removed…" after a period — this is pre-existing style shared across the Delete/Sort warnings, so keeping it consistent here is reasonable. If you want to polish these as a small follow-up, capitalizing "This" across all three messages would read slightly better.

Also applies to: 88-91

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@cli/src/command/experimental.rs` around lines 42 - 52, The warning message in
the ExperimentalCommands::Migrate branch uses a lowercase "this" after a period
(mirroring the Delete/Sort branches) — update the log::warn message in
ExperimentalCommands::Migrate and the analogous warning strings in the Delete
and Sort branches to capitalize "This" so the sentence reads "...use `{0}
migrate` instead. This command will be removed in the future."; keep the rest of
the string and the delegation to cmd.execute(ctx) unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@cli/src/command/experimental.rs`:
- Around line 42-52: The warning message in the ExperimentalCommands::Migrate
branch uses a lowercase "this" after a period (mirroring the Delete/Sort
branches) — update the log::warn message in ExperimentalCommands::Migrate and
the analogous warning strings in the Delete and Sort branches to capitalize
"This" so the sentence reads "...use `{0} migrate` instead. This command will be
removed in the future."; keep the rest of the string and the delegation to
cmd.execute(ctx) unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f6b5c63e-1eb2-4d76-832b-83a450c1b4ac

📥 Commits

Reviewing files that changed from the base of the PR and between 54b743c and b4a02ed.

📒 Files selected for processing (3)
  • cli/src/cli.rs
  • cli/src/command.rs
  • cli/src/command/experimental.rs

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request stabilizes the migrate command by promoting it from an experimental subcommand to a top-level command. The experimental migrate command now includes a warning message advising users to transition to the new top-level command. Review feedback suggests minor grammatical and capitalization improvements to the warning messages and command descriptions for better consistency.

Comment thread cli/src/command/experimental.rs
Comment thread cli/src/command/experimental.rs
@github-actions github-actions Bot added the cli This issue is about cli application label Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli This issue is about cli application

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stabilize migrate subcommand

1 participant