Skip to content

Add --phase flag to filter tasks by phase#433

Merged
gjkim42 merged 1 commit intomainfrom
axon-task-422
Feb 25, 2026
Merged

Add --phase flag to filter tasks by phase#433
gjkim42 merged 1 commit intomainfrom
axon-task-422

Conversation

@axon-agent
Copy link

@axon-agent axon-agent bot commented Feb 25, 2026

Summary

  • Adds a --phase flag to axon get tasks that allows filtering tasks by their current phase
  • Supports all task phases: Pending, Running, Waiting, Succeeded, Failed
  • Multiple phases can be specified: --phase Running,Pending,Waiting
  • Includes shell completion for phase values
  • Includes validation with deterministic, clear error messages for invalid phase values
  • Filtering works with all output formats (table, yaml, json) and with --all-namespaces

Usage examples

# Show only running tasks
axon get tasks --phase Running

# Show non-completed tasks
axon get tasks --phase Pending,Running,Waiting

# Combine with other flags
axon get tasks --phase Running -A -o yaml

Closes #422

Test plan

  • Unit tests for validatePhases covering valid phases, invalid phases, empty input, and case sensitivity
  • Unit tests for filterTasksByPhase covering single phase, multiple phases, all phases, and no matches
  • Unit test verifying the --phase flag is properly registered on the get task command
  • CI passes (make test, make verify, make build)

🤖 Generated with Claude Code

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Copy link
Collaborator

@gjkim42 gjkim42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm
/squash-commits

@gjkim42 gjkim42 added this pull request to the merge queue Feb 25, 2026
Merged via the queue into main with commit 1c55d0c Feb 25, 2026
6 checks passed
@gjkim42 gjkim42 deleted the axon-task-422 branch February 25, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

axon get tasks (but non-completed?)

1 participant