Repository navigation
✨ Activity Monitor chevrons: active-with-text / icon-only spec, ring glyph, workflow-approval stall caption - #16600
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found 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
|
…glyph, workflow-approval stall Fixes #16599 - 1 <= active <= 2 chevrons per row: the stage column is always lit (at 050 the Review column, even while queued); a CI/Review track lights only while genuinely running on the current head. Inactive chevrons are icon only (neutral / red / green); counts move to the tooltip. - CI/Review icons become a segmented ring (stageTrackerRingSvg) that fills with passed checks / posted perspectives, newest step pulsing while running; tokens only, aria-labelled. - When nothing runs the blocker column is filled in a still stalled style, with a person glyph for human actions: 'CI 1/11 · waiting on workflow approval' from pkg/github's new PRCIActivity.WorkflowApproval probe of action_required runs (90s per-head cache). - Review-pending rows never read unknown / default 5/5: stageTrackerReview- PendingState yields reviewing (N/5 in progress) or adjudicating. - Node + Go tests: ring, workflow approval, review pending, row fixtures (#16567 gated, #427 queued, #16456, #16268, both-running) asserting words only on active chevrons and 1 <= lit <= 2. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
c7473cf to
be6882b
Compare
|
@clubanderson this PR is back in your court (
Once the new head lands, CI and the review swarm re-run automatically and the PR returns to the normal path. |
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. hive/awaiting-ci: rebased onto 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 Review findings from Read against 1. 2. The approval probe pays for every pending head, but only the Minor: Review findings from Correctness — delta re-review at be6882b (previous head c7473cf) Previous findings: merge conflict with v5 — fixed (PR is MERGEABLE after the rebase).
--- a/src/pkg/github/workflow_approval.go
+++ b/src/pkg/github/workflow_approval.go
@@ -94,8 +94,2 @@
return out
}
-
-// forgetWorkflowApproval drops the cached probe for a head so the next
-// cycle re-lists after an approval was issued.
-func forgetWorkflowApproval(repo, sha string) {
- workflowApprovalCache.Delete(repo + "@" + sha)
-}
--- a/src/pkg/dashboard/stage_tracker_motion_test.go
+++ b/src/pkg/dashboard/stage_tracker_motion_test.go
@@ -697,3 +697,5 @@
- cmd := exec.Command(node, "-e", script)
+ // Over stdin: the lifted fixture exceeds Linux's per-argument limit.
+ cmd := exec.Command(node, "-")
+ cmd.Stdin = strings.NewReader(script)
if out, err := cmd.CombinedOutput(); err != nil {(The Review findings from intent-alignment · delta re-review (c7473cf → be6882b) The PR's own added/removed lines are byte-identical to the previous head; the delta is a rebase onto v5 (#16587, #16590, #16593, #16596). Intent still matches #16599. The rebase, however, left CI red in three places the PR must own:
Prior findings: merge conflict in |
There was a problem hiding this comment.
Read the Go side at c7473cf (pkg/github/workflow_approval.go, client.go, stage_tracker_activity.go, stage_tracker_build.go). The probe and the review-pending state look sound; three concrete things before this lands:
-
Operator text names a config key that does not exist —
src/pkg/dashboard/stage_tracker_activity.go:211tells the maintainer "Hive approves trusted bot heads automatically whengovernor.ci.auto_approve_workflowsis on." That key appears nowhere else insrc/pkg(grep -rn auto_approve_workflows src/pkgreturns only this line), so an operator following the tooltip will look for a switch that is not there. Either drop the sentence or land the setting it refers to. -
forgetWorkflowApprovalhas no callers —src/pkg/github/workflow_approval.go:99. Its comment says it is called "after an approval was issued", but nothing invokes it, so after a human clicks Approve the "waiting on workflow approval" blocker persists for up to 90 s (workflowApprovalCacheTTL). Minor, but the comment promises behaviour the tree does not have. Related:workflowApprovalCacheis a package-globalsync.Mapwith no eviction beyond that unused helper, so it grows by one entry per pendingrepo@shafor the hub's lifetime. -
Rebase needed — the branch conflicts with v5 only in
src/pkg/dashboard/stage_tracker_ui_rows_test.go(merging v563533f1into the head reports that single conflict); theneeds-rebaselabel already says so.
Nit (style only): trackerReviewPendingStage = 50 at stage_tracker_activity.go:375 duplicates the existing trackerNumberReviewPending used by stage_tracker_build.go:446; reuse the one constant.
Body vs diff otherwise match for the parts I read; I did not review the JS/CSS strip rendering.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
CI triage at
Not pushing to this branch (human-authored). Will re-check after the next push. 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
- forgetWorkflowApproval now has callers: CI webhook deliveries for a head drop its cached probe; the cache also evicts entries older than 30m so the package-global map stays bounded (reviewer finding). - Detail no longer names a config key that does not exist yet. - Drop trackerReviewPendingStage duplicate of trackerNumberReviewPending. - MotionPreviewSample writes its node script to a temp file instead of node -e (argument list too long on Linux runners). - Fix RankActionableIssues citation drift in scale-envelope.md. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
@clubanderson this PR is back in your court (
Once the new head lands, CI and the review swarm re-run automatically and the PR returns to the normal path. |
There was a problem hiding this comment.
Read the pkg/github half in full against the tree at ce96649, plus the Go missing branch in stage_tracker_activity.go and stageTrackerRingSvg in tracker-row-strip.js. No defects found in what I read; details below so a maintainer can skip re-deriving them. I did not read the CSS, index.html, the JS test files or scale-envelope.md line by line — this is an XXL diff and I'd rather report a bounded verified read than a padded one.
Workflow-approval probe — verified end to end
- The call-site gate
prs[i].CIStatus == "pending" && prs[i].CIActivity != nil(client.go:2566) is safe in the exact case the feature targets (approval-gated runs create zero check runs):enrichPRCIassignspr.CIActivity = prCIActivity(...)atclient.go:2688whenever the listing succeeds, andprCIActivityreturns a non-nil struct even for an empty run list (pr_ci_activity.go:49-50). The only nil path is a failed check-run listing (client.go:2669-2673), where there is nothing to annotate anyway. - The field survives the evidence merge:
EnrichCIStatussetsWorkflowApprovalbeforerecordListed/merged(client.go:2567vs:2579-2580), andcloneCIActivitynow deep-copies it includingRunIDs(webhook_ci_evidence.go:376-380), so the overlay path atmerged()→cloneCIActivity(:286) cannot drop it. forgetWorkflowApprovalinapplyWebhookCIEvidence(:491) is placed after the head/repo are resolved and before the store write — anyworkflow_run/check_rundelivery for the head invalidates the 90 s cache, which is the right trigger for "someone clicked Approve".ListWorkflowRunsOptions.HeadSHAexists in go-github v72;splitRepo(client.go:1844) andWithRESTCallerare the same helpersenrichPRCIalready uses.- Eviction (
workflow_approval.go:51-66) is CAS-guarded and bounded to one sweep per 30 min; a type-assertion miss deletes the entry rather than leaking it. stage_tracker_activity.go:205-209: the blocker is only emitted undercase "missing"withwa.Pending > 0, so a head whose runs were approved and started falls back to the existingrunning/queuedcaptions untouched.
Ring glyph (tracker-row-strip.js:128-163): total, done, failed are clamped (:129-131), t === 0 short-circuits to a bare track (:145), t === 1 yields gap = 0 → the arc() helper emits a <circle> (:139), and the aria-label goes through esc() (:144). No division by zero or unescaped output path.
One advisory note (info, not a defect): workflowRunsAwaitingApproval returns nil without caching when the listing errors (workflow_approval.go:93-96). On a repo where Actions is disabled (404) or the token lacks actions:read, every pending PR pays one extra REST call per cycle indefinitely. The comment says this is deliberate ("absence of evidence is not evidence"); if that cost matters at scale, caching a nil result with a shorter TTL on error would bound it. Not blocking.
The conflicts-with-open-pr label is already on the PR, so I have not re-derived the overlap.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
The darker amber the operator saw was .ham-activity-track.active.ham-stalled (a 55 % amber mix with --text) — the stalled-blocker fill from #16600 on rows where nothing moved (CI "not reported" / "no verdict yet" at 050). An active, text-bearing track now has exactly the .ham-seg.active fill; stalled keeps only its stillness and person glyph. Go CI Active follows the state (running / queued) regardless of poll freshness; the observation age rides ObservedAt for the tooltip. Invariants: every text-bearing track is plainly active (prelude over all fixtures), and no CSS rule restyles the active track background. Refs #16643 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
… the CI verdict (#16644) * 🐛 fix(dashboard): PR in progress chevron defers to running tracks, speaks only lifecycle Activation resolves CI and Review first: if either runs on the head the stage chevron (PR in progress, Merge queue …) renders settled-current and icon only, its words in the tooltip, so CI + Review is the one pair that can be active together and every other row has exactly one active chevron. The unpicked-up and owner-wait captions drop the red word ("Unassigned · next: scanner", "Waiting for @author · fix owed"; the external-PR fixing word reads "Fix owed · …"); the CI / review verdict stays in the detail. Prelude invariant over every row fixture: active set ⊆ {CI, Review} or size 1, and no stage chevron names a track verdict. Canonical rules documented in the Activity Monitor section. Fixes #16643 Signed-off-by: Andrew Anderson <andy@clubanderson.com> * 🐛 fix(dashboard): one fill for an active CI/Review chevron The darker amber the operator saw was .ham-activity-track.active.ham-stalled (a 55 % amber mix with --text) — the stalled-blocker fill from #16600 on rows where nothing moved (CI "not reported" / "no verdict yet" at 050). An active, text-bearing track now has exactly the .ham-seg.active fill; stalled keeps only its stillness and person glyph. Go CI Active follows the state (running / queued) regardless of poll freshness; the observation age rides ObservedAt for the tooltip. Invariants: every text-bearing track is plainly active (prelude over all fixtures), and no CSS rule restyles the active track background. Refs #16643 Signed-off-by: Andrew Anderson <andy@clubanderson.com> * test: run row-stamp harness over stdin to dodge the -e arg limit Refs #16643 Signed-off-by: Andrew Anderson <andy@clubanderson.com> --------- Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Fixes #16599
Implements the operator's canonical chevron spec on the Activity Monitor:
queued, N ahead); a CI/Review track is also active only while genuinely running on the current head. If both tracks run, both are active and the stage chevron is settled-current (🐛 Activity Monitor: never more than two lit chevrons; unreported CI is pending, not amber #16545).stageTrackerRingSvg(done, total, failed, state, label)replaces the flask/eye for CI/Review:totalsegments (gaps ≤16, arcs beyond), filled clockwise pass-green / fail-red / muted track, newest step pulses while running; existing colour tokens; aria-label.CI 1/11 · waiting on workflow approvalfrom the newPRCIActivity.WorkflowApproval(pkg/github probesaction_requiredruns for pending heads, 90s per-head cache; blockerworkflow-approval-required:N).reviewing(Review N/5 · in progress, N = verdicts posted on this head, 0 by default) oradjudicating— neverunknown, never a default 5/5.Tests:
TestStageTrackerRingSvg,TestStageTrackerCIActivityWorkflowApproval,TestStageTrackerReviewPendingState, pkg/githubworkflow_approval_test.go, row fixtures (#16567 gated, #427 queued/in progress, #16456, #16268, both-running) asserting words only on active chevrons and 1 ≤ lit ≤ 2; node suitesstage_tracker_activity.test.js/stage_tracker_remediation_chevron.test.jsupdated to the spec.Auto-approving
action_requiredruns for trusted bots follows in a separate PR.