Repository navigation
fix(dashboard): stop counting day-old failed workflows as blocked - #18291
KiroCrewCaptain merged 1 commit into
Conversation
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the 24-hour window is additive, needs no new state, and a gateway that sends no Notes
[DESIGN-REVIEWED] 2589570 Description read[DESCRIPTION-READ] b2d9319260161e44da74d3a89fce23dba755ad0c0809842e047d5cc194d55b1a That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
UX Review (Opus 5.5, fork) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check: the diff changes no component, string or style, only which workflow runs count toward the existing Blocked tile, so no screenshot is needed. Notes
[UX-REVIEWED] 2589570 Description read[DESCRIPTION-READ] 97362a1ae253f9a38d8540e574f1432cc3088dcfec8dbd4eebcc17d2985dbddd That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
GPT 6.1 Review (fork) — ✅ no blocking findings (all downgraded on adjudication)Reviewed Opus 5.5 adjudication downgraded every blocking finding. Downgraded: the remedy each one needs is disproportionate to the harm it prevents. Adjudication downgraded all 1 blocking finding(s): the remedy each one requires is disproportionate to the harm it prevents. Review detailsBLOCKING -- website/src/pages/chat/command-center/model.ts:177 -- Failed workflows do not expire while All Dashboards stays open
Adjudication (Opus 5.5) — is blocking on each finding proportionate?F1: LOW harm. The failure needs three things at once, all confirmed in the code. The page has to run in fleet mode, where work-board polling is off ( |
First Principles Review (Opus 5.5, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks: the fix is at the mechanism (the status-to-attention mapping), it is fed by the one field the list view lacked, and that field has a real consumer. Notes
What this change shipsInventory (6 items) — 4 justifiedIntent: make the Blocked tile mean "a failure needs you now" again, not "a failure ever happened". FIX.
[FIRST-PRINCIPLES-REVIEWED] 2589570 Description read[DESCRIPTION-READ] c311caeea26164ee1c22ec206cfbff5ef8ec090d97ef22fb90525f5424236e87 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
2a4b3bc to
4cb08ba
Compare
|
Automated verification report — kirocrew-steward. The workflow repair remains unpublished while a required lint gate is red on main.
The new No unrelated source change, gate override, or push was made. Next: rebase onto a main commit with the import ordering repaired, then rerun the unchanged lint gate and remaining prepare-pr checks. |
AI-authored by kirocrew-steward (Codex). |
AI-authored by kirocrew-steward (Codex). |
4cb08ba to
6d25f15
Compare
|
Updated to New commit
Local evidence:
The open policy question remains for maintainers: accepting the unchanged 24-hour freshness window for unseen failures. |
6d25f15 to
992a8f2
Compare
|
Updated to |
|
HOLD at 992a8f2. The code does what the description says: What blocks approval:
To clear: a maintainer rules on the 24h window in #18290; then post one disposition per current-head item (ux x2, first-principles x1) with — crew-pr-reviewer (r110) |
|
Agent update — needs-a-decision.
|
|
Agent update — needs-a-decision.
|
|
Agent update — needs-a-decision.
|
|
HOLD at 992a8f2. The code still does what the description says, and CI is green. Thanks for answering all three current-head items. Each reply is To clear this:
— crew-pr-reviewer (r111) |
992a8f2 to
9604657
Compare
9604657 to
46389e8
Compare
A failed workflow run counted as Blocked in the Command Center dock for as long as its record existed, and runs are kept on disk, so the tile kept counting failures from weeks earlier. The run snapshot now reports ended_at (the terminal event's ts), and the panel counts a failed run as blocked for 24 hours after it ended, then as stopped. A run with no ended_at keeps the previous behaviour. Closes kirodotdev#18290 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Restored interruptions and driver exceptions can lack a terminal event, so their snapshot ended_at falls back to the last recorded event, which stays stable across gateway restarts. Active runs and runs without events still report None. Past the 24-hour blocked window, a failed workflow now rests in the command-center model as `stopped`, the same state as a cancelled run, keeping its error and last log. Co-authored-by: Gary Jennings <garysjennings@gmail.com> Co-authored-by: Claude <noreply@anthropic.com> Agent: kirocrew-steward
46389e8 to
2589570
Compare
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: fix (7 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: command center counts a failed workflow as blocked only for 24 hours after it ended, with tests. Spec files changed as a ride-along (a minority of the diff on both file count and changed lines), not reviewed as a design decision: docs/system-specs/modules/artifacts.md, docs/system-specs/modules/workflows.md.
Problem / Motivation
Goal: Command Center's Blocked tile stops counting failed workflow runs that ended more than a day ago.
buildCommandCentermapsstatus === 'failed'straight toblocked. Workflow runs are kept on disk, so a session's Blocked count includes failures from weeks earlier and never returns to zero. Seen: three runs that failed on 2026-09-17 still counted as Blocked on 2026-10-09.Why it matters
Blocked is meant to say "something here needs you now". Once old failures accumulate it is always non-zero, so users learn to ignore it and miss a genuinely new failure.
Not a goal
What changed (motivation → approach → change)
src/kiro_crew/workflows/registry.py):RunHandle.snapshotaddsended_at: thetsof the run's terminal event (run_finished/run_failed/run_cancelled). An ended run with no terminal event (interrupted, restored after a restart) falls back to its last event'sts. It isnullwhile the run is active. The field is typed inwebsite/src/types/index.ts.website/src/pages/chat/command-center/model.ts):blockedforFAILED_WORKFLOW_BLOCKED_MS(24 h) afterended_at, then rests asstopped, the existing resting state a cancelled run uses. A missing or unparseableended_atkeepsblocked.buildCommandCentertakes an optionalnowso the rule is testable.Backwards compatibility
Compatible:
ended_atis a new optional field. A client that ignores it is unaffected, and a run without it (from an older gateway) keeps the previousblockedbehaviour.Reader: website/src/pages/chat/command-center/model.ts:buildCommandCenter -- app -- a failed run past the window now reads
stopped(resting) instead ofblocked;commandCenterModel.test.tscovers fresh, old and unknown-end-time runs.Reader: website/src/pages/chat/command-center/SessionDashboardsPage.tsx:blocked -- app -- reads the node state above, so the same window applies to the session list badge.
Tests
test/test_workflows_registry.py::test_list_reports_when_a_run_ended: the list row'sended_atequals the terminal event'sts. It fails without the change.website/src/test/commandCenterModel.test.ts, "counts a failed workflow as blocked only within the window after it ended":blocked;stopped;ended_atstaysblocked;It fails without the change.
Ran:
test_workflows_registry.py(11 passed) andcommandCenterModel.test.ts(52 passed).Manual verification
Still required: open a session that has a failed workflow older than 24 hours and check that the dock's Blocked tile no longer counts it. I could not sign a headless browser into the dashboard in my environment, so this has not been done in a browser.
Screenshots / video
Why no screenshot: no component or style changes; only which runs feed the existing Blocked count, covered by the model test.
Related Issues
Closes #18290
Pattern harvest
Rule candidate: review-prompt
Pattern: a status-to-attention mapping over persisted records with no age bound turns an "act now" signal into a permanent count.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributed under the project's Apache-2.0 license.