Skip to content

fix(kanban): include review column in kanban stats text output - #51424

Closed
briandevans wants to merge 1 commit into
NousResearch:mainfrom
briandevans:fix/kanban-stats-review-column
Closed

fix(kanban): include review column in kanban stats text output#51424
briandevans wants to merge 1 commit into
NousResearch:mainfrom
briandevans:fix/kanban-stats-review-column

Conversation

@briandevans

Copy link
Copy Markdown
Contributor

What does this PR do?

hermes kanban stats (plain-text, non---json) never printed the review status row, so any task sitting in review — 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.

review is a first-class non-archived status: it is in VALID_STATUSES (hermes_cli/kanban_db.py), it is live in transitions (claim_review_task, the spawn-ready review loop), and board_stats already counts it (GROUP BY status WHERE status != 'archived'). So stats["by_status"]["review"] exists — the text renderer just never emitted it.

The hardcoded status tuple in the _cmd_stats text path had drifted from VALID_STATUSES when the review status was added. The --json path was unaffected because it dumps board_stats verbatim.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

Changes Made

  • hermes_cli/kanban.py — add "review" to the _cmd_stats text-output status loop, in lifecycle order (after "blocked"), so it matches VALID_STATUSES.
  • tests/hermes_cli/test_kanban_core_functionality.py — regression test that moves a task to review and asserts the plain-text stats output lists the review row with its count.

How to Test

  1. Create a task and move it to review.
  2. Run hermes kanban stats (no --json).
  3. The review row appears under "By status" with the correct count (before this fix it was missing entirely).

Regression test (fails before the fix, passes after):

pytest tests/hermes_cli/test_kanban_core_functionality.py::test_cli_stats_text_includes_review_status -q

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS 15 (Python 3.11)

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) — or N/A (pure output formatting)
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

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").
Copilot AI review requested due to automatic review settings June 23, 2026 15:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 stats non---json renderer to include the review row in the “By status” section.
  • Added a regression test that forces a task into review and asserts the plain-text stats output includes the review row 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.

Comment thread hermes_cli/kanban.py
Comment on lines 2389 to 2391
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)}")
@alt-glitch alt-glitch added type/bug Something isn't working comp/cron Cron scheduler and job management P3 Low — cosmetic, nice to have duplicate This issue or pull request already exists labels Jun 23, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #29082 — same one-line fix adding the review status row to the plain-text hermes kanban stats output (the _cmd_stats hardcoded status tuple had drifted from VALID_STATUSES). #29082 is the earlier open PR for this exact fix. Related: #42896 / #49368 (review lifecycle work).

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

@briandevans

Copy link
Copy Markdown
Contributor Author

Closing — this duplicates @Dusk1e's earlier #29082 (opened 2026-05-20), which makes the identical one-line change adding the review lane to the plain-text _cmd_stats status tuple in hermes_cli/kanban.py. Theirs is the original and should land; thanks @alt-glitch for catching the overlap. Happy to help review #29082.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cron Cron scheduler and job management duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants