Skip to content

✨ activity monitor: show sentinel and hold as pills on the PR's real stage instead of forcing needs-decision - #17334

Merged
hivecommons-hive[bot] merged 2 commits into
v5from
feat/sentinel-hold-pill-not-stage
Nov 9, 2026
Merged

hivecommons-hive[bot] merged 2 commits into
v5from
feat/sentinel-hold-pill-not-stage

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #17327

The rule (owner decision, clubanderson, 2026-11-08)

Sentinel alerts and hold-class labels are gates, not stages. A PR's column reflects its real progress — CI running/red → CI; reviewer question / changes requested → Review; checks green + verdict approve (or no verdict required) → 090-ready-for-human-merge (Merge queue). The sentinel/hold rides along as a pill: the Merge queue cell reads Held · sentinel · confirm intent / Held · hold (amber), never "Queued". The gate remains a hard merge stop: a parked PR never merges unattended.

Before, derive_pr.go treated Park.Holds / Park.Sentinel as an explicit park pinning the PR at 085-needs-decision, so a green, reviewed, sentinel-only PR sat in Review / "Needs human" beside real reviewer questions, hiding the cheapest decisions.

Changes

Stage engine

  • stagelabels/human.go: RouteHuman = routeProgress + withGates. New Route.Gates and GateReasons keep "a sentinel alert is open on this PR" / "held by label hold" on the route (so the decision popover still explains the stop) without steering the stage. ReadyComment for a held 090 adds "Held: …. The hive never merges this head while the gate stands." and asks to resolve the alert / lift the hold, then /lgtm /approve. HumanAuthorOwesAnswer no longer counts sentinel/hold as a reviewer ask.
  • stageengine/derive_pr_classify.go: held, label:hold, sentinel, contributor-lane:sentinel-blocked move out of stageNeedsHumanReasons into a stageHeldGateReasons branch that routes by evidence (needs-rebase/red → fixing; requires_human → 071/085 by author; else 090 Human). derive_pr.go: adoptedPRDecision only keeps the park for needs-human.
  • Hive-superseder hard stop (HiveSupersederHardStopSentinel/Hold → 085) and YieldsToAdoptionFor untouched on purpose: the superseder rule is an explicit owner stop, not a gate pill.
  • Goldens regenerated with -update (human-route, lane-reason-*, precedence) and spot-checked: green+approve+sentinel/hold → 090 with the gate reason; pending → 060; red → 071; requires_human on a human author → 071; verdict none → 085 "no reviewer configured" (pre-existing rule); precedence final stages unchanged (only the intermediate opinion 085→090).

Merge safety (checked the park facts, not the stage number)

  • Lanes already gate on labels: labelBlockReason (sentinel, label:hold, label:do-not-merge*), contributor lane contributor-lane:sentinel-blocked, trusted sweep sentinelLabelPresent. New TestPrefilterGatedPRAt090IsRefused pins a 090 PR with sentinel / hold / do-not-merge refused by the contributor, self-authored and trusted-author prefilters.
  • Dashboard: delegatedHumanMergeDecision / Outcome could previously approve/admit an owner-authored 090 PR wearing a hold label. New delegatedHumanMergeGated makes both step aside (policy's sentinel question / rail-hold answers as before). TestDelegatedHumanMergeGatedPRIsNotDecided proves 090 + SentinelAlert / hold / do-not-merge/* is refused.
  • Automerge entry comment: postHumanEntry re-explains on cause change for 090 too, so held → ready on the same head rewrites the comment (TestReadyEntryRewritesWhenGateLifts).

Dashboard

  • stage_tracker_decision.go: a 090 row with a live sentinel alert (not the trusted-author notice) gets the sentinel question (Approve / Let hive decide / direction / close) instead of "Ready to merge"; decisionForHumanMerge already handles hold.
  • JS: stageTrackerHeldWord / stageTrackerHeldTip (tracker-words.js), detour held flag (tracker-row.js), ham-held class + aria/title (tracker-row-strip.js), stageTrackerSentinelInLane covers a held 090 so no duplicate sentinel chip; CSS .ham-seg.active.ham-held { background: var(--amber) } with the ⏸ glyph. go generate regenerated static/index.html. Node tests extended in stage_tracker_sentinel_lane_test.go.

Docs: stage-labels.md (085/090 rows, lane-reason table, evidence routing table), activity-monitor.md, hive-merge.md, reference.md state the rule. Changelog fragment changed-sentinel-hold-pill-not-stage.md.

Screenshots (fixture: green, reviewed PR #17301 with a sentinel alert; #17302 with a hold label)

before after
1440 before-1440 after-1440
390 (phone) before-390 after-390

Judgement calls — please check

  • needs-human left at 085. The decision covers sentinel and hold; needs-human is an explicit human ask (someone deliberately labelled it), so I recommend it stays a stage. It would be a one-line move into stageHeldGateReasons if you want it to follow.
  • adoptedPRDecision (074 adoption) and HumanAuthorOwesAnswer now ignore holds/sentinel — a held human PR with CI green can be adopted; the lane still refuses to merge the copy while the gate stands.
  • I ran the pure unit packages locally (stagelabels, stageengine, automerge, targeted dashboard tests incl. the node harness) to avoid CI round-trips on goldens; they have no process management. CI is still the verdict.

…stage instead of forcing needs-decision

Sentinel alerts and hold-class labels are gates, not stages (owner decision
2026-11-08). The stage engine now routes a gated PR by its head's evidence
like any other human hand-off — CI / 070 while checks run or fail, 071 on a
reviewer question, 090-ready-for-human-merge when the head is otherwise
clean — and keeps the gate reason on the route so the entry comment reads
"Held: a sentinel alert is open on this PR. The hive never merges this head
while the gate stands." and the dashboard popover still explains the stop.

The gate remains a hard merge stop: the automerge lanes and the dashboard's
delegated human-merge shortcuts refuse on the label itself, never on the
stage number (tests pin a 090 PR with a sentinel alert or hold refused by
the contributor, self-authored and trusted-author prefilters and by the
dashboard's human-merge decision/outcome paths).

Dashboard: a held 090 row's Merge queue cell reads "Held · sentinel ·
confirm intent" / "Held · hold" (amber ham-held, tooltip with the gate's
reason, the route reason and the rule), never "Queued for merge"; the
sentinel question's Approve / Let hive decide / direction / close actions
stay available from that cell. needs-human keeps parking at 085.

Fixes #17327

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 9, 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 danathar 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 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
#17337 🐛 Activity Monitor: exactly one lit stage chevron per row same files src/docs/dashboard-sections/activity-monitor.md
src/docs/labels-and-control-signals/stage-labels.md
src/pkg/dashboard/static-src/css/tracker.css
src/pkg/dashboard/static-src/js/tracker-row-strip.js
src/pkg/dashboard/static/index.html
#17333 ✨ Activity Monitor: shared-PR issues group under their primary row same files src/docs/dashboard-sections/activity-monitor.md
src/pkg/dashboard/static-src/css/tracker.css
src/pkg/dashboard/static/index.html

@hivecommons-hive

hivecommons-hive Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

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

Failing checks:

  • Sign-off survives the squash

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.

Evidence bundle `#17334851f3a8` sha256:b6acf5f641186863e0819174977aaaa444bfcd28827813930ff3deb80f20e55a — download from the dashboard or `hivectl review evidence #17334`.

@Karibhou

Karibhou commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

This PR also covers #17336 (stage-engine slice 1 of #17327: sentinel/hold as gates, hard-stop tests, goldens, changelog). Its merge should close #17336 too, but only a maintainer editing this PR body to add Closes #17336 makes that happen automatically.

— hive: backend=omp model=anthropic/claude-opus-5-5


🐝 Hive Agent: contributor | SHA: 68f8dd297

@hivecommons-hive
hivecommons-hive Bot merged commit 79bbc6b into v5 Nov 9, 2026
83 of 84 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the feat/sentinel-hold-pill-not-stage branch November 9, 2026 02:22
@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 851f3a8.

@github-actions

github-actions Bot commented Nov 9, 2026

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sentinel alerts and hold labels should be pills on the PR's real stage, not a forced needs-decision stage

2 participants