Skip to content

fix(cli): add missing Copilot variant to CliProviderType enum#713

Open
johntmyers wants to merge 1 commit intomainfrom
fix/707-copilot-cli-enum
Open

fix(cli): add missing Copilot variant to CliProviderType enum#713
johntmyers wants to merge 1 commit intomainfrom
fix/707-copilot-cli-enum

Conversation

@johntmyers
Copy link
Copy Markdown
Collaborator

Summary

  • Adds the missing Copilot variant to the CliProviderType enum and its as_str() match arm, fixing --provider copilot CLI argument parsing.
  • Adds a parity test (cli_provider_types_match_registry) that asserts CliProviderType variants match ProviderRegistry::known_types(), preventing this class of drift in the future.

Related Issue

Closes #707

Changes

  • crates/openshell-cli/src/main.rs: Added Copilot variant to CliProviderType enum and "copilot" arm to as_str().
  • crates/openshell-cli/src/main.rs (tests): Added cli_provider_types_match_registry test that iterates all CliProviderType variants via ValueEnum::value_variants() and compares against ProviderRegistry::known_types().

Testing

  • cargo test -p openshell-cli --bin openshell cli_provider_types_match_registry passes.
  • cargo fmt --check and cargo clippy clean on changed file.

Checklist

  • Conventional commit format
  • Pre-commit checks pass
  • Tests added for regression prevention

PR #476 added Copilot as a supported provider but missed adding the
Copilot variant to the CliProviderType enum, causing --provider copilot
to fail at CLI argument parsing. Also adds a parity test to prevent
future drift between CliProviderType and ProviderRegistry.

Closes #707
@johntmyers johntmyers requested a review from a team as a code owner March 31, 2026 20: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.

fix(cli): missing Copilot variant in CliProviderType enum

1 participant