Skip to content

Unify session cleanup commands with flags instead of separate subcommands #87

@jcleira

Description

@jcleira

Description

If Partio has overlapping cleanup commands (e.g., reset and clean, or similar), consolidate them into a single partio clean command with flags: default behavior cleans sessions at current HEAD, --all for repo-wide orphan cleanup, --session <id> for single-session cleanup, --dry-run for preview, and --force to skip confirmation. Deprecate any redundant command with a Cobra Deprecated field so users see an automatic warning and migration path. Make --all and --session mutually exclusive.

Why

Overlapping cleanup commands with similar-but-different scope confuse users and increase support burden. A single unified command with explicit flags is easier to document, discover, and reason about.

Source

Target Repos

  • cli
  • docs

Acceptance Criteria

  • Single clean command handles current-HEAD, all-orphan, and single-session cleanup via flags
  • --all and --session flags are mutually exclusive and produce a clear error if both are passed
  • --dry-run outputs what would be deleted without modifying state
  • Any deprecated command prints an automatic deprecation warning pointing to the replacement
  • Tests cover: nothing to clean, force mode, dry-run, session-specific cleanup, mutual exclusion of flags

Context Hints

  • cli/cmd/

Comment /minion build or add the minion-approved label to begin implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions