Skip to content

test(cli): cover top-level alias parsing#97

Draft
overtrue wants to merge 1 commit intomainfrom
codex/top-level-command-alias-gaps
Draft

test(cli): cover top-level alias parsing#97
overtrue wants to merge 1 commit intomainfrom
codex/top-level-command-alias-gaps

Conversation

@overtrue
Copy link
Copy Markdown
Contributor

@overtrue overtrue commented Apr 8, 2026

Summary

This change adds focused parser coverage for deprecated top-level command aliases introduced in the recent bucket CORS and event work.

Problem

The recent command surface expansion added deprecated top-level rc cors and rc event entry points alongside the nested rc bucket ... forms. Existing tests already covered the nested bucket forms and one top-level cors remove case, but two parser paths were still untested:

  • rc cors get <alias/bucket> should resolve to the List command through the get alias.
  • rc event list <alias/bucket> should continue to parse through the deprecated top-level entry point.

Without direct assertions, a future clap refactor could silently break these compatibility paths while leaving adjacent tests green.

Fix

The patch adds two small command parser tests in crates/cli/src/commands/mod.rs:

  • cli_accepts_top_level_cors_get_alias
  • cli_accepts_top_level_event_subcommand

The production code is unchanged. The diff is intentionally limited to command-surface tests around the recently added aliases.

Validation

make pre-commit is not available in this checkout because the repository does not define a pre-commit target.

The branch was validated with:

  • cargo fmt --all --check
  • cargo clippy --workspace -- -D warnings
  • cargo test --workspace

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