v1.6: align Board inventory and service guidance - #1109
Conversation
| stale = [board for board in boards if board.get("restart_recommended")] | ||
| if stale: | ||
| managed_commands = [ | ||
| str(board.get("restart_command") or "") | ||
| for board in stale | ||
| if board.get("restart_command") | ||
| ] | ||
| if len(managed_commands) == 1 and len(stale) == 1: | ||
| return "restart stale managed Board", managed_commands[0] | ||
| ports = ", ".join(str(board.get("port")) for board in stale) | ||
| return "restart stale Board", f"stop stale Board port(s) {ports}, then restart with code-mower board serve --repo OWNER/REPO" | ||
| return ( | ||
| "restart stale Board", | ||
| f"use the restart or promotion command on stale Board port(s) {ports}", | ||
| ) |
There was a problem hiding this comment.
💡 Edge Case: Stale-board guidance drops the one available restart command
In _inventory_next_action (src/code_mower/board.py:5105-5118), when there are multiple stale boards but only one of them is managed (has restart_command), len(managed_commands) == 1 and len(stale) == 1 is False, so the specific, copyable restart_command is discarded in favor of the generic "use the restart or promotion command on stale Board port(s) ..." message — even though the exact command for the managed one is known and available on that board's row. This mainly affects operators with mixed managed/transient stale Boards, where the guidance is less helpful than it could be.
List all known commands when more than one stale board exists, instead of falling back to a generic message whenever counts don't match exactly.:
if managed_commands:
if len(managed_commands) == 1:
return "restart stale managed Board", managed_commands[0]
return "restart stale managed Boards", "; ".join(managed_commands)
ports = ", ".join(str(board.get("port")) for board in stale)
return (
"restart stale Board",
f"use the restart or promotion command on stale Board port(s) {ports}",
)
Was this helpful? React with 👍 / 👎
|
Note Automatic reviews are paused because your team has used its included automatic processing for this billing period (headroom scales with your seat count). You can still comment "Gitar review" to run one anytime, and automatic reviews resume on their own by October 1. Add seats for more headroom. Code Review 👍 Approved with suggestions 0 closed / 1 findings🟡 Medium risk · Changes local Board discovery, version staleness, and service-management commands. Aligns Board inventory and service guidance so 💡 Edge Case: Stale-board guidance drops the one available restart command📄 src/code_mower/board.py:5105-5118 In List all known commands when more than one stale board exists, instead of falling back to a generic message whenever counts don't match exactly.🤖 Prompt for agentsOptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
Claude audit (merge-authority lane)Head SHA: |
256da6f to
536a37d
Compare
|
Code Mower notice: previously audited head |
Claude audit (merge-authority lane)Head SHA: |
board list --repo OWNER/REPOnow returns only Boards whose/api/identityresponse verifies that repository. Legacy, malformed, and unresponsive listeners fail closed instead of being selected from process command-line hints.Board inventory and
lanes statusnow share invoking, serving, and installed versions plus managed-service identity. The invoking CLI independently marks an old serving version stale even when that process reports its own installed and serving versions as equal. Identity-verified transient rows include a copyable stop-and-install promotion command; stale managed rows include an exact restart command with recording posture preserved.Validation:
python -m pytest -q tests/test_board.py tests/test_lane_status.py(341 passed, 385 subtests)python -m pytest -q tests/test_release_hygiene.py(364 passed, 1,313 subtests)python -m ruff check .python scripts/privacy_scan.pypython -m compileall -q src scriptsboard list --repo codemower-ai/code-mower --jsonsmoke against four local listenersCloses #1063