Skip to content

refactor(cli): changes share one --reason option per wording - #569

Merged
PiquelChips merged 1 commit into
mainfrom
refactor/544-operations-cli-reason
Nov 21, 2026
Merged

PiquelChips merged 1 commit into
mainfrom
refactor/544-operations-cli-reason

Conversation

@PiquelChips

@PiquelChips PiquelChips commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Part of #544

Every administrative change declared its own --reason, with one of two help texts copied 30 times (this PR converts 28; the two in cli/session.rs wait for the session-revocation change): "Why, recorded with the change: 1 to 500 characters." and the account variant that adds "and shown to the owner in their history". Changing the limit or the wording meant touching every copy.

Two flattened #[derive(Args)] structs beside Confirm in cli/console.rs now hold them: Why and WhyOwnerSees. Commands flatten one and pass why.reason on. Commands whose reason means something else keep theirs inline: user recover, user undo-recovery, handle reserve, alerts update --note, and account's Change.

The line count barely moves (178+/192−), because every field still needs a doc comment. The gain is one copy of each help text.

  • Tests merged or removed: none.
  • Files edited outside the Operations area: none. cli/session.rs keeps its two inline reasons, since a later PR (S4) reroutes it.
  • Proof that the CLI is unchanged:
    • I built auth-service on origin/main and on this branch, and dumped help <path> and <path> -h for all 104 command paths. The two dumps are byte-identical, option order included.
    • just docs reference leaves docs/dev/operations/cli-commands.md unchanged.
    • The CLI tests pass, including every_operation_has_its_command.

Checks run:

  • just fmt, cargo clippy with and without --all-features (-D warnings), cargo doc -D warnings and just rust unused: all clean.
  • just db test: 495 of 497 pass. The keys::tests failures hit statement timeouts on the signing-key lock when run in parallel, and they fail the same way on main (5 failures there).

Note

Written by Claude Opus 5.5 in Claude Code and reviewed by Claude Opus 5.5 (via T3 Code)

🤖 Generated with Claude Code

Each command declared its own --reason with one of two help texts. Why and
WhyOwnerSees, beside Confirm, hold them once; the help is unchanged.
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 42 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 88d65d15-f6d5-4dcd-9c96-64bce2a228e4
Commits

Reviewing files that changed from the base of the PR and between 467e813 and f4d6827.

Files selected for processing: 10

  • apps/auth-service/src/cli/admin.rs
  • apps/auth-service/src/cli/audit.rs
  • apps/auth-service/src/cli/client.rs
  • apps/auth-service/src/cli/console.rs
  • apps/auth-service/src/cli/deliveries.rs
  • apps/auth-service/src/cli/handle.rs
  • apps/auth-service/src/cli/invite.rs
  • apps/auth-service/src/cli/keys.rs
  • apps/auth-service/src/cli/mod.rs
  • apps/auth-service/src/cli/user.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@PiquelChips
PiquelChips marked this pull request as draft November 20, 2026 07:29
@PiquelChips PiquelChips added apps/auth-service Origin Auth at auth.sourceorigin.dev, its settings and developer console, and the operator CLI refactor No behviour changes labels Nov 20, 2026
@PiquelChips
PiquelChips marked this pull request as ready for review November 20, 2026 08:31
@PiquelChips
PiquelChips marked this pull request as draft November 21, 2026 14:00
@PiquelChips
PiquelChips marked this pull request as ready for review November 21, 2026 14:26
@PiquelChips
PiquelChips added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit 4a5336b Nov 21, 2026
13 checks passed
@PiquelChips
PiquelChips deleted the refactor/544-operations-cli-reason branch November 21, 2026 16:47
@github-project-automation github-project-automation Bot moved this from Needs Triage to Done in sourceorigin.dev Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apps/auth-service Origin Auth at auth.sourceorigin.dev, its settings and developer console, and the operator CLI refactor No behviour changes

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant