Repository navigation
🐛 fix(dashboard): CI chevron no longer stays lit after every check has concluded - #17509
Conversation
…s concluded A required check with no run on the head is a settled word, never inferred motion from a part-filled tally; at 060 reviewed with every reported check concluded, Review is the lit chevron and CI is its blocker only when red. A CI snapshot that still claims a check running or queued after dashboard.stage_tracker.ci_activity_stale_m (default 10) is re-listed from GitHub on the next tracker build, bypassing the batch cache, ETag and stage, coalesced per head. Fixes #17508 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
/lgtm |
|
@clubanderson: you cannot LGTM your own PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: clubanderson The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
There was a problem hiding this comment.
Read against the v5 tree; this looks correct to me.
What I checked:
CIActivityClaimsMotion(src/pkg/github/ci_activity_stale.go) treats onlycompleted/unknown/""as settled. That matches howStateis populated: check runs storecr.GetStatus()(src/pkg/github/pr_ci_activity.go:58, so finished runs arecompleted), and commit statuses are written ascompletedwith the result inConclusion, orpending/unknown(pr_ci_activity.go:133-146,webhook_ci_evidence.go:426-439). So a fully green head is not relisted every window — the stale re-list only fires while a run genuinely still saysqueued/in_progress/pending.- The new
noRunUnreadcaption branch instage_tracker_activity.gois reachable:statusesMissingrequiresout.State == "passing"(stage_tracker_activity.go:199), and a never-reported required name leaves the stateunknown, so it does not shadow the newelse if. RequestHeadCIRelistuses the existingciRefetcher/enqueue/ciEvidenceKey/ciRefetchTarget{…baseRef}plumbing fromwebhook_ci_evidence.go:541-624; the per-headminGapgate bounds it to one listing per window, and the test covers the 11-minute re-arm.- JS: the new 060 rule in
stageTrackerStalledTracksits after thehuman_decisionrule and before theci !== 'passing'fallback, andstageTrackerStageTrackonly claims 050, so 060 rows now light Review unless a check is red — the node fixture asserts exactly that, including therunning+activecase still lighting CI.
One minor observation, not a defect: RequestHeadCIRelist sweeps the whole relisted map under the lock on every call. With ciRelistMemory at 24h and one entry per stale head that is small, so fine as-is.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. Review findings from docs-currency — read head
Review findings from Intent alignment (#17508) — read at head One in-scope gap — the staleness guard on commit statuses is self-defeating and drops status evidence
Consequence on a Prow repo whose presubmit is a commit status and genuinely runs > 10 min (common): the relist cannot resolve the pending status that triggered it; instead the status disappears from the merged view, the required name falls into the Smallest fix: only check runs can make a snapshot stale, since only check runs are relisted: and drop "or a non-merge-gate commit status still Review findings from Correctness review (head The fix lines up with #17508: the Go One low-severity edge case, advisory only:
|
Mutation testing (advisory)No surviving mutants in changed files (or the run hit its time budget before reporting any). Advisory only; this job never blocks the PR (#17349). |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Fixes #17508
Problem
The Activity Monitor on hive's own spoke showed hivecommons/promptargs#467 (head
045b8e1,stage/060-reviewed) with the CI chevron lit —CI 2/3 · 'build-and-te…' running— for ~8 hours after every check on the head had SUCCEEDED (18:24Z); only Prow'stidestatus was pending.Root cause
Branch protection on
promptargs/mainrequiresbuild-and-test (22),(24),(26), but the workflow has no22leg: no run namedbuild-and-test (22)ever existed on the head (governor logs:required-check-missing:build-and-test (22)throughout; the "CI" workflow run has exactly two jobs). The tracker then:stage_tracker_activity.goleft the never-reported required name asunknown(statuses unread) with a2/3tally and the name inchecks_pending;tracker-row-strip.jsstageTrackerTrackRunninginferred motion from any part-filled ring whose state was not a settled word (unknownwas not), lighting CI and spelling the pending name as running;stageTrackerStalledTrackpicks CI at 060 whenever CI is notpassing, so CI, not Review, held the lit slot;Fix
stageTrackerCIActivity: a required name with no run is settled —missingwhen statuses were read,unknown(a status could still provide it) when not — with the hasn't reported caption, never "reported but with no conclusion";Activestays false.unknownis a settled word for inferred motion; at060 reviewedthe stalled track is Review unless CI is red.github.CIActivityStale(check-runstatus != completedor non-merge-gatependingstatus, observed >dashboard.stage_tracker.ci_activity_stale_m, default 10,-1disables) →Client.RequestHeadCIRelistqueues one coalesced REST listing of the head through the existing CI refetcher (budget-aware, lands in the webhook CI evidence store, whichHeadCIActivitylays over the cycle's listing), at most once per window per head.activity-monitor.md, operator-reference key, changelog fragment.Tests
TestStageTrackerCIActivityNeverReportedRequiredIsSettled— fix: cadence 'pause' means off (no kicks), not force-paused #467's data (required 22/24/26, only 24/26 exist, green neighbours, tide pending): not active, tally 2/3, hasn't reported caption, no motion claimed.TestStageTrackerRelistsStaleRunningCI— stale detection table (running 17m → relist; fresh / concluded / tide-only → not; 0 disables).TestRequestHeadCIRelistCoalescesPerHead— one listing per head per window through the refetcher.TestStageTrackerReviewedRowWithConcludedChecksLightsReview— JS: at 060 with CI missing/unknown/passing, Review is the one lit chevron; red CI stays the blocker; genuine motion still lights CI.#16628 shapeJS test updated:unknownbeside a part-filled ring is no longer inferred motion.Evidence
Tracker payload (
/api/stage-tracker, post-merge), pod logs (--since=10h), GraphQLstatusCheckRollupprobes (noEXPECTEDcontexts for missing required checks), branch-protectionrequired_status_checks, and the workflow run's jobs were captured on the operator's machine under~/hive-work/stale-ci-*.json.