Skip to content

🌱 dashboard: defer merge-gate pills until the PR reaches the gate - #14651

Merged
hivecommons-hive[bot] merged 3 commits into
v5from
fix/pills-until-gate
Oct 28, 2026
Merged

hivecommons-hive[bot] merged 3 commits into
v5from
fix/pills-until-gate

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #14650

Owner's rule (2026-10-27)

"Until the PR is in the merge gate, we should not see things like needs-human or unauthorized or sentinel, because there is nothing we can do about it while PRs are in motion."

What changes

Pills in the far-right column of the Hive activity monitor are now split into two classes, computed server-side in stageTrackerModifiers (each stageTrackerModifier carries an explicit ActionableNow). The payload carries drawn pills in modifiers and held-back ones in deferred_modifiers. A deferred pill is absent — no chip, no breathing chevron, no Needs attention count — until the PR's stage reaches the merge-gate band (stagelabels.AwaitingMergeAdmission, stage/080+, the same boundary adoption yields at); the row tooltip alone says "Pending at merge gate: …". The merge-gate cell text ("Sentinel alert · needs human", "Awaiting human: …") is unchanged. Issues on their own stages keep every pill; an issue riding its covering PR follows the PR. Labels are untouched.

pill class when shown
hold actionable now always
draft actionable now always
stalled actionable now always
regressed actionable now always (muted stage ↓ unless parked on a person, as today)
needs-rebase, blocked, triage needed, possible dupe actionable now always
unauthorized — approve-workflow-runs actionable now always — carve-out: held runs mean CI cannot start (rationguard#397 at 072)
unauthorized — merge / branch-update / unknown step merge gate PR at stage/080+
sentinel (notice and real sentinel-alert) merge gate PR at stage/080+; sentinel_alert stays truthful in the payload
needs human (needs-human label) merge gate PR at stage/080+; always on an issue at its own stage
needs human decision (needs-decision previews) merge gate PR at stage/080+; always on an issue at its own stage

Notes

  • Overview / bands.go counters read labels, not tracker modifiers, so they are untouched; the tracker's own Needs attention button follows the rule because it counts drawn modifiers only.
  • No · dot affordance added: no such single-glyph widget existed in the pill column, so per the brief none was invented; the tooltip line is the only hint.
  • Docs: Pills before the merge gate table in src/docs/dashboard-sections.md; changelog changelog.d/changed-pills-until-merge-gate.md.

Tests

stage_tracker_pills_gate_test.go: table-driven TestStageTrackerModifiers_DeferredUntilMergeGate (sentinel/needs-human/unauthorized across 050 / 072 / 080 / 085 for PRs, mirrored and own-stage issues), TestStageTrackerClassifyModifiers, TestStageTrackerDeferredPillsPayload (end-to-end payload), TestStageTrackerDeferredPillsJS (Node fixture assertions over stageTrackerChipsHtml, stageTrackerSentinelChipHtml, stageTrackerTooltip, stageTrackerNeedsAttention, stageTrackerMotion). No time.Sleep.

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 27, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kellyaa for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 27, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@clubanderson is auto-promoted for contributor-lane merging on this PR: the last 5 merged PRs by this author in this hive's repositories have no revert or sentinel-alert evidence. CI, reviewer verdict, diff fences, soak, holds and branch protection still apply.

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#14779 🐛 fix: show GitHub dependency blockers in stage tracker CONFLICT src/pkg/dashboard/stage_tracker.go
#14573 ✨ feat(dashboard): show a draft pill in the activity tracker same files src/docs/dashboard-sections.md
src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/static/index.html

@hivecommons-hive hivecommons-hive Bot added author/human A person pushed this PR themselves dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 27, 2026
@hivecommons-hive hivecommons-hive Bot added stage/071-needs-author Human-authored PR: CI red, changes requested or conflicting; diagnosis posted, the author must act and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 27, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Failing checks:

  • test (dashboard 2/4)
  • test (dashboard shuffle 2/3)

Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path.

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 27, 2026

@hivecommons-hive hivecommons-hive Bot 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.

Read the diff against v5 and the consumers it touches; ./pkg/dashboard builds at 22f09db. Looks correct to me.

What I verified:

  • Server split: stageTrackerPillsDeferred (stage_tracker.go:677-682) gates only PRs and mirrored issues on stage < AwaitingMergeAdmission; own-stage issues keep every pill, as the body says. it.Mirrored is computed on the line before it is passed in (:1247-1248), so the mirrored case reads the right flag.
  • The two post-hoc DeleteFunc strips for 045/085 and 015 (:1252-1260) still operate on Modifiers; at 085 nothing is deferred (≥080), so the needs-decision chip is removed by the chevron rule rather than deferral — no double handling.
  • UnauthorizedStep is still populated when the marker is deferred (:1265), so the tooltip's "Pending at merge gate" line and the gate cell text keep their reason.
  • The approve-workflow-runs carve-out (:690-694) matches prstage.StageReasonUnauthorizedPrefix + UnauthorizedStepApproveWorkflowRuns (reasons.go:52,55) after HumanApprovedReason strips the approver suffix.
  • Client: stageTrackerNeedsAttention (index.html:14974-14978) reads modifiers only, so deferred pills drop out of the count without a client change; sentinel chip and tooltip both consult deferred_modifiers (:14243, :14229-14231); nested linked_prs and the single-covering-PR projection carry deferred_modifiers through (:14324, :14503, :15754).
  • stageTrackerResolveLinkedPRs copies DeferredModifiers alongside Modifiers (:1778-1780).

No security, style or docs concerns; dashboard-sections.md and the changelog fragment are updated with the change.

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot 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.

Conclusion: the server-side split and the SPA wiring implement the owner's rule as the body states it, and I found no behavioural defect — but the PR's own diff breaks TestStageTrackerSentinelLaneWiring, which is what is turning test, test (dashboard 2/4), test (dashboard shuffle 2/3) and coverage red on this head (run 40556454861).

What I read at 22f09db: stage_tracker.go (stageTrackerClassifyModifiers / stageTrackerModifiers 700–778, stageTrackerPillsDeferred 678, sentinel deferral 1367–1372, stageTrackerResolveLinkedPRs 1778), static/index.html (stageTrackerNeedsAttention 14974, tooltip 14226–14231, stageTrackerSentinelChipHtml 14243, sub-row/via_pr 14321/14503, stageTrackerSentinelPreface 16237), stagelabels.go:275 (AwaitingMergeAdmission = 80), prstage/reasons.go:52. go build ./pkg/dashboard/ ./pkg/github/ passes locally.

Finding (high — CI red from this diff): src/pkg/dashboard/stage_tracker_sentinel_lane_test.go:267 still asserts index.html contains the literal

if (item.sentinel_alert) lines.push(stageTrackerSentinelTip(item));

but this PR rewrites that line at static/index.html:14231 to if (item.sentinel_alert && deferred.indexOf(STAGE_TRACKER_SENTINEL_CHIP) < 0) lines.push(...). CI log: stage_tracker_sentinel_lane_test.go:271: index.html missing sentinel lane wiring "if (item.sentinel_alert) lines.push(stageTrackerSentinelTip(item));" → --- FAIL: TestStageTrackerSentinelLaneWiring. Update the expected string in the wiring test to the new guard (the PR already touched this file, so it is a one-line follow-up). The coverage failure is downstream of the test failure.

Verified correct, for the record:

  • stageTrackerNeedsAttention (index.html:14974) reads item.modifiers only, so deferred merge-gate pills genuinely drop out of the "Needs attention" count and filter — matches the body.
  • The sentinel chip is suppressed only when deferred_modifiers carries sentinel (index.html:14243), while stageTrackerSentinelPreface (16237) still keys off sentinel_alert, so the Decide… dialog preface keeps the alert as the Go comment at stage_tracker.go:1367 intends.
  • stageTrackerUnauthorized is still computed when unauthorized sits in either list (stage_tracker.go:1265), so the tooltip's "Unauthorized: …" line survives deferral.
  • Mirrored issues (050+) follow the PR via stageTrackerPillsDeferred(kind, n, mirrored); issues on own stages (045 etc.) keep every pill — as the body's table says.

Not blocking: the other failures in the same job (api_repo_item_decision_test.go:106, health_disk_test.go:187) do not touch files in this diff; I did not trace them.

— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor

hive/ci-report @ 22f09db — test (dashboard 2/4) and test (dashboard shuffle 2/3) both fail on one assertion:

stage_tracker_sentinel_lane_test.go:271: index.html missing sentinel lane wiring
    "if (item.sentinel_alert) lines.push(stageTrackerSentinelTip(item));"
--- FAIL: TestStageTrackerSentinelLaneWiring

The PR rewrites that exact-string-guarded line in index.html to

if (item.sentinel_alert && deferred.indexOf(STAGE_TRACKER_SENTINEL_CHIP) < 0) lines.push(stageTrackerSentinelTip(item));

but the guard at src/pkg/dashboard/stage_tracker_sentinel_lane_test.go:271 still expects the old text. Updating that expected string to the new line (the deferred-mods gate is the intended behaviour here) should turn both shards green; coverage and test are only downstream of them.

The hive does not push to author branches, so this is a report only.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot removed the stage/071-needs-author Human-authored PR: CI red, changes requested or conflicting; diagnosis posted, the author must act label Oct 27, 2026
@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 27, 2026
@hivecommons-hive hivecommons-hive Bot added the stage/050-review-pending Review swarm requested; awaiting a verdict for the current head label Oct 27, 2026
@hivecommons-hive hivecommons-hive Bot added stage/071-needs-author Human-authored PR: CI red, changes requested or conflicting; diagnosis posted, the author must act and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 27, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Why:

  • the branch conflicts with the base and needs a rebase

Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path.

@hivecommons-hive hivecommons-hive Bot 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.

Read the Go diff against the v5 tree and the branch builds. The classification itself looks correct to me; the work here is the rebase.

Rebase facts (base ee64433, 30 behind): git merge-tree v5 fix/pills-until-gate now conflicts in three files — src/pkg/dashboard/stage_tracker.go, static/index.html and src/docs/dashboard-sections.md. The v5 commits that moved the same regions are #14689 (deee564ac, attention-first ordering), #14669 (cc4cc1680), #14699 (f6988e43c) and #14657 (27e655124).

Good news on #14689: its stageTrackerNeedsAttention / stageTrackerAttentionTier read it.Modifiers only and the comment already says "Only the shown Modifiers count, so a merge-gate pill …" — so once this PR's split lands, deferred pills drop out of the attention count and tier with no extra change. stageTrackerHumanMods there still lists modNeedsHuman/modNeedsDecision, which is right for issues on their own stages (never deferred, per stageTrackerPillsDeferred).

What I verified in the diff:

  • stageTrackerPillsDeferred keys off stagelabels.AwaitingMergeAdmission (number 80, stagelabels.go:275), so 080/085/090/095/100 show their gate pills and 085-parked PRs keep "needs-decision" visible.
  • it.Mirrored is assigned before the stageTrackerModifiers call in finish, so mirrored issues are classified with the right flag.
  • stageTrackerUnauthorized is still computed when unauthorized is deferred (slices.Contains(it.DeferredModifiers, …)), so the gate word / Decide… preface keep their text.
  • modSentinel is prepended only to DeferredModifiers, never Modifiers, matching the comment that the chip is drawn from SentinelAlert.

Also overlaps #14573 (same author): that PR adds a prowWIPLabel case and a hold exclusion inside the old stageTrackerModifiers; whichever lands second re-applies it inside stageTrackerClassifyModifiers.

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

Split tracker pills into actionable-now (hold, draft, stalled, regressed,
unauthorized on held workflow runs) and merge-gate (sentinel, needs-human,
needs-decision, merge-time unauthorized). Merge-gate pills are held back in
deferred_modifiers while the PR is before stage/080 and neither render nor
count under Needs attention; they render as before once the PR reaches the
gate. Labels are untouched.

Fixes #14650

Signed-off-by: Andy Anderson <andy@clubanderson.com>
…ooltip line

Signed-off-by: Andy Anderson <andy@clubanderson.com>
…S harness

Signed-off-by: Andy Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 28, 2026
@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 28, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Why:

  • the branch conflicts with the base and needs a rebase

Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path.

@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/071-needs-author Human-authored PR: CI red, changes requested or conflicting; diagnosis posted, the author must act labels Oct 28, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit f00355e into v5 Oct 28, 2026
79 of 83 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/pills-until-gate branch October 28, 2026 01:55
@hivecommons-hive

Copy link
Copy Markdown
Contributor
Evidence bundle `#146517b74e48` sha256:99b0ff8337e188c662a36379c29de478cfe96fe74e1ce93ed2db05e5cf2589c3 — download from the dashboard or `hivectl review evidence #14651`.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 7b74e48.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/human A person pushed this PR themselves conflicts-with-open-pr Open PR has a merge conflict with another open PR dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dashboard: merge-gate pills (sentinel, needs-human, unauthorized) show before the PR reaches the gate

1 participant