Skip to content

test(cli): cover event remove command contracts#121

Draft
overtrue wants to merge 1 commit intomainfrom
codex/event-remove-command-contract-gap
Draft

test(cli): cover event remove command contracts#121
overtrue wants to merge 1 commit intomainfrom
codex/event-remove-command-contract-gap

Conversation

@overtrue
Copy link
Copy Markdown
Contributor

Summary

Recent CLI help/example work covered event add, but event remove still had an untested contract gap. The noun-first parser path rc bucket event remove ... also had no dedicated assertion. That left a regression hole in a recently changed area of the command surface.

This change adds focused coverage for both paths and fixes the missing help example output on the remove subcommand itself. RemoveArgs now exposes an after_help example block so the top-level and noun-first help text both advertise the remove workflow consistently.

Root cause

The event command group defined shared help examples at the group level and dedicated examples for add, but remove had no subcommand-specific after_help. Help-contract coverage also skipped both rc event remove and rc bucket event remove, so the missing examples were never asserted.

Validation

I first added the new help-contract assertions, which failed because event remove help did not include an examples section. After adding the remove-specific after_help, the targeted help-contract test passed.

The repository does not contain a Makefile or justfile, so make pre-commit cannot run in this checkout. I ran the equivalent required validations directly instead:

  • 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