Skip to content

Align prune defaults to delete all non-running runs - #102

Merged
vm-mishchenko merged 1 commit into
mainfrom
260521-spec-list-prune-delete-alignment
May 22, 2026
Merged

vm-mishchenko merged 1 commit into
mainfrom
260521-spec-list-prune-delete-alignment

Conversation

@vm-mishchenko

Copy link
Copy Markdown
Owner

Summary

Remove the --all flag from draft prune and change its default behavior to delete every non-running run in the selected project scope, not just successfully finished ones.

Add a run status classification system (classify_run) that categorizes runs as running, done, stopped, missing, or corrupt. Use this to make the selection process and output more transparent: the selection list now shows each run's status and is grouped by status (done → stopped → missing → corrupt) with descending run-id within groups.

Update the summary line format from deleted N; skipped M active; selected K to deleted N; skipped M active, printed on all code paths including no-op and dry-run. When the current project has no non-running runs but other projects do, provide a helpful hint mentioning the count and --all-projects flag (suppressed when --project is explicit).

Update draft delete output to include the resolved project name: deleted run <id> (project: <project>). Update README documentation accordingly.

Test plan

  • Added test_prune_status_grouping_order: verifies selection groups by status and sorts run-ids descending within each group
  • Added test_prune_all_projects_hint_fires: confirms hint appears when current project is empty and other projects have non-running runs
  • Added test_prune_all_projects_hint_suppressed_under_project_flag: confirms hint does not appear when --project is explicit
  • Added test_prune_status_column_in_selection_line: verifies status column appears in selection output
  • Added test_prune_all_flag_rejected: confirms parser rejects --all with non-zero exit
  • Renamed and updated test_prune_all_includes_incomplete → test_prune_default_includes_incomplete: verifies default now includes non-finished runs
  • Renamed and updated test_prune_all_skips_active → test_prune_default_skips_active: verifies default still skips active runs
  • Updated test_prune_no_runs: assertion changed to new summary format
  • Updated test_prune_yes_deletes_run: assertion changed to new summary format
  • Updated test_command_delete_with_delete_branch_flag and test_command_delete_without_flag_skips_branch_deletion: assertions verify project name in output
  • Updated test_prune_one_finished_one_in_progress_default_selection: verifies both finished and partial runs appear in selection with correct statuses
  • Existing tests continue to pass with removal of include_all parameter

Remove the --all flag and change prune's default behavior to delete
every non-running run in the selected project scope, not just those
that finished successfully. Add run status classification (done,
stopped, missing, corrupt) to make the selection more transparent.

Update delete to include the resolved project name in its output.
Provide a helpful hint when non-running runs exist in other projects.
@vm-mishchenko
vm-mishchenko marked this pull request as ready for review May 22, 2026 04:57
@vm-mishchenko
vm-mishchenko merged commit fb7f02c into main May 22, 2026
1 check passed
@vm-mishchenko
vm-mishchenko deleted the 260521-spec-list-prune-delete-alignment branch May 22, 2026 05: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.

1 participant