fix(kanban): include review column in kanban stats text output - #51424
fix(kanban): include review column in kanban stats text output#51424briandevans wants to merge 1 commit into
Conversation
The plain-text `hermes kanban stats` renderer iterated a hardcoded status tuple that omitted "review", so tasks sitting in the review status (a worker opened a PR and is awaiting the review agent) were invisible in the default board summary. The tuple had drifted from VALID_STATUSES when the review status was added; the --json path was unaffected because it dumps board_stats verbatim. Add "review" to the text status loop in lifecycle order (after "blocked").
There was a problem hiding this comment.
Pull request overview
Fixes a bug in the hermes kanban stats plain-text output where tasks in the review status were counted internally but never shown, causing the default operator summary to under-report in-flight work.
Changes:
- Updated the
hermes kanban statsnon---jsonrenderer to include thereviewrow in the “By status” section. - Added a regression test that forces a task into
reviewand asserts the plain-text stats output includes thereviewrow with the correct count.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
hermes_cli/kanban.py |
Adds review to the hardcoded status-order loop used for plain-text stats output. |
tests/hermes_cli/test_kanban_core_functionality.py |
Adds a regression test ensuring the plain-text stats output includes the review status row. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| print("By status:") | ||
| for k in ("triage", "todo", "scheduled", "ready", "running", "blocked", "done"): | ||
| for k in ("triage", "todo", "scheduled", "ready", "running", "blocked", "review", "done"): | ||
| print(f" {k:8s} {stats['by_status'].get(k, 0)}") |
Duplicate of #29082 — same one-line fix adding the |
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Include review column in kanban stats text output.
Looks Good
- Tiny, well-scoped fix (2 files, +30/-1)
- Properly adds the missing 'review' status to the hardcoded tuple
- Includes a test that verifies the review status is counted
- The test correctly checks both presence and count
Reviewed by Hermes Agent
|
Closing — this duplicates @Dusk1e's earlier #29082 (opened 2026-05-20), which makes the identical one-line change adding the |
What does this PR do?
hermes kanban stats(plain-text, non---json) never printed thereviewstatus row, so any task sitting inreview— a worker opened a PR and is awaiting the review agent — was invisible in the default board summary. The operator HUD silently under-reported in-flight work.reviewis a first-class non-archived status: it is inVALID_STATUSES(hermes_cli/kanban_db.py), it is live in transitions (claim_review_task, the spawn-ready review loop), andboard_statsalready counts it (GROUP BY status WHERE status != 'archived'). Sostats["by_status"]["review"]exists — the text renderer just never emitted it.The hardcoded status tuple in the
_cmd_statstext path had drifted fromVALID_STATUSESwhen thereviewstatus was added. The--jsonpath was unaffected because it dumpsboard_statsverbatim.Type of Change
Changes Made
hermes_cli/kanban.py— add"review"to the_cmd_statstext-output status loop, in lifecycle order (after"blocked"), so it matchesVALID_STATUSES.tests/hermes_cli/test_kanban_core_functionality.py— regression test that moves a task toreviewand asserts the plain-textstatsoutput lists thereviewrow with its count.How to Test
review.hermes kanban stats(no--json).reviewrow appears under "By status" with the correct count (before this fix it was missing entirely).Regression test (fails before the fix, passes after):
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/A