Skip to content

CLI: add JSON output to history prune dry runs #1240

@Timi16

Description

@Timi16

Overview

History pruning currently reports human text only, which makes retention checks harder to automate.

Background

Run history is already present in the repository, but the current implementation leaves a concrete gap for users or maintainers. Relevant files: src/cli/args.rs, src/cli/commands.rs, src/history/mod.rs.

Specifications

  • Add --format pretty|json to history-prune.
  • Return removed and remaining counts in JSON.
  • Include dry_run boolean in structured output.
  • Keep current text output as the default.

Acceptance Criteria

  • Behavior is covered by focused tests or documented manual verification.
  • Errors are handled gracefully with actionable suggestions.
  • Help text or docs are updated when the user-facing behavior changes.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions