Repository navigation
π dashboard: one human-gate pill per gated row β fixed verbs per reason, no needs-human chevron words, Confirm safe for sentinel alerts - #17505
Conversation
β¦n words
Every row a person must settle carries exactly one segmented
'π€ Needs human Β· <reasons>' control whose verbs are fixed per reason
(review / decision / sentinel / hold; stacked reasons union, β€3 visible
+ β¦ menu). 'Needs human', 'Held Β· sentinel' and 'Sentinel alert Β· needs
human' never ride a chevron: the lit chevron is the real stage with the
amber ham-human-gated outline. Secondary rows of a shared PR render no
gate; their 'decision pending on #N' chip links to the primary row. A
new POST β¦/items/{number}/sentinel-confirm endpoint (comment + label
removal, audited) gives a sentinel alert its own verb, Confirm safe.
Fixes #17504
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
[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 No conflicting open PRs or same-file overlaps were found. |
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). |
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. clubanderson this PR is held at Failing checks:
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. Review findings from CI at head
The hive does not push to your branch; a new head re-runs CI and the review swarm automatically. Review findings from Read the new endpoint against the sentinel sweep and the tracker, not just the diff. The pill/verb unification itself looks right to me ( 1. Confirm safe does not clear a bundle-promoted alert β the pill stays
2. The
Neither is a reason to abandon the design; both are in the one new Go file. No position on the CSS/row-layout changes beyond that they render the verbs the backend accepts. I have not changed, approved, or closed anything. Review findings from Not mergeable at
One behavioural note, not a defect: the PR body says the endpoint is "idempotent when already clear", but at I have not run the suite locally (per AGENTS.md); findings are from the CI logs of run 42745650407 and the v5 tree. Review findings from Docs-currency review (head 1. Docs overstate Confirm safe β it does not clear a bundle-only sentinel alert ( The table says the Preferred fix: have the handler record the acknowledgment on the head's bundle (same call the Approve path uses), then the docs are true as written. If that is deferred, the doc must say so: 2. Every citation points at the wrong issue β -(hivecommons/hive#17470)
+(hivecommons/hive#17504)(apply to every non-fixture reference; hive/awaiting-ci: CI red at
π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 Review findings from Docs-currency review (head 1. Docs overstate Confirm safe β it does not clear a bundle-only sentinel alert ( The table says the Preferred fix: have the handler record the acknowledgment on the head's bundle (same call the Approve path uses), then the docs are true as written. If that is deferred, the doc must say so: 2. Every citation points at the wrong issue β -(hivecommons/hive#17470)
+(hivecommons/hive#17504)(apply to every non-fixture reference; |
There was a problem hiding this comment.
Security perspective β no blocker. Read at head c417a43.
The new POST β¦/sentinel-confirm endpoint reuses the Hold authorisation (api_repo_item_sentinel_confirm.go:80 β canToggleRepoHold, api_repo_hold.go:74-114), requires a signed-in user (:85-89), is wrapped in recordOperatorAction (api.go:347), checks watchesRepo before any write (:109-112), bounds the body (:95, :100) and audits with the comment text (:141). Removing the sentinel label is the sweep's own clearance signal (stage_tracker.go:1186-1190), and repo-write is exactly the bar GitHub itself sets for removing a label, so this is not a privilege widening. Tests pin 403/401 (api_repo_item_sentinel_confirm_test.go:40-45).
One advisory (low, non-blocking):
Paused-repo gate not applied. #15436 ("a paused repo takes no hive writes, operator-initiated or not") is enforced in the decision handler via repoWritesPaused (api_repo_item_decision.go:485-492), but the new endpoint posts a comment and strips the sentinel label on a paused repo with no check (api_repo_item_sentinel_confirm.go:108-140). Hold has the same gap today, so this follows the existing pattern rather than regressing it β but since this is a new write path that opens a merge gate, a refused result would be cheap:
repoFull := owner + "/" + repoName
if !s.watchesRepo(repoFull) {
jsonError(w, "repository is not configured for this hive", http.StatusForbidden)
return
}
if detail, paused := s.repoWritesPaused(repoFull); paused {
jsonStatusResponse(w, http.StatusOK, repoSentinelConfirmResponse{OK: true, Repo: repoFull, Number: number,
Result: &RowActionResult{Action: rowActionRefused, Target: rowActionTarget(repoFull, itemType, number), Outcome: "Confirm safe refused: repo paused β " + detail + "."}})
return
}
β hive: agent=adjudicator-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
Review follow-ups (below
|
β¦r sentinel-confirm write site Signed-off-by: Andrew Anderson <andy@clubanderson.com>
There was a problem hiding this comment.
Correctness review (head c417a43, read against the surrounding tree)
1. New test does not compile β whole pkg/dashboard test build fails
src/pkg/dashboard/api_repo_item_sentinel_confirm_test.go:70 compares resp.Result.Target (a RowActionTarget struct β row_action_result.go:49-54) to a string. CI test (dashboard 1/4..4/4) all fail on it: invalid operation: resp.Result.Target != "testorg/testrepo#7" (mismatched types RowActionTarget and untyped string). Every other test in the PR (TestStageTrackerHumanGateRows etc.) is therefore unrun.
if resp.Result == nil || resp.Result.Action != rowActionSentinelConfirmed || resp.Result.Target.Repo != "testorg/testrepo" || resp.Result.Target.Kind != rowActionTargetPR || resp.Result.Target.Number != 7 || !strings.Contains(resp.Result.Outcome, "@writer") || !strings.Contains(resp.Result.Outcome, config.DefaultSentinelLabel) {
2. Gate verbs on an issue row drawn through its covering PR act on the issue, not the PR
stageTrackerHumanGateHtml computes reasons from shown (tracker-human-gate.js:1878), and for a via_pr issue row shown carries the PR's sentinel_alert, hold, review_activity, decision_needed under the issue's kind:'issue'/number (tracker-row-render.js:137-140). Your own test asserts this row carries the gate (stage_tracker_human_gate_test.go, primary issue #17451 via PR #17480 β gates(headRow) === 1). But the click path resolves the item from row.dataset.hamKey (the issue, tracker-actions.js:983-985) and runRowAction only remaps decide:* ids through stageTrackerDecisionTarget (tracker-actions.js:2706-2718); gate:* fall through to stageTrackerActionRequest(issueItem, β¦), which builds type = item.kind === 'pr' ? 'pr' : 'issue' and the issue number (tracker-actions.js:1335-1336, 1371-1377). Consequences:
- Confirm safe β
POST /items/<issue>/sentinel-confirm:currentItemLabelsreads the issue (api_repo_item_sentinel_confirm.go:116), finds no sentinel label, comments on the issue and answersAlreadyClear("nosentinel-alertlabel was on the item"); the PR's label β the actual gate β stays. This is the hive#17470 β PR #17481 scenario the issue opens with. - Decideβ¦ / Request changesβ¦ β
POST /items/<issue>/decision {direction, type:issue}βRecordOperatorIssueDecisionon a non-parked issue β 409 "issue is not waiting on a decision" (api_repo_item_decision.go:410-421), whileApprove/Let hive decideon the same pill correctly go to the PR.
Fix (in runRowAction, next to the decide: branch):
} else if (id.indexOf('decide:') === 0) {
...
+ } else if (id.indexOf('gate:') === 0) {
+ // A gate verb on an issue row drawn through its one covering PR
+ // settles that PR: the sentinel label, the reviewer's question and
+ // the hold live on the PR, not the issue (via_pr, tracker-row-render.js).
+ items = items.map(it => {
+ if (!it || it.kind !== 'issue' || !Array.isArray(it.linked_prs) || it.linked_prs.length !== 1 || !it.linked_prs[0]) return it;
+ const lp = it.linked_prs[0];
+ return stageTrackerItemByKey(_stageTracker, stageTrackerItemKey({ repo: it.repo, kind: 'pr', number: lp.number })) || stageTrackerLinkedPRItem(it, lp);
+ });
}and add a TestStageTrackerHumanGateWiring case asserting stageTrackerActionRequest's URL for gate:confirm-sentinel on the via_pr issue fixture names the PR number. The same remap should cover release when the hold reason came from the PR (shown.hold), since the pill now offers it on the issue row.
3. (low) β¦ overflow menu stays open after choosing a verb
stageTrackerWireHumanGate (tracker-human-gate.js:~1935) skips closeAll() when the click lands inside .ham-gate-menu, and the [data-ham-act] handler stopPropagations, so the menu remains visible over the "settlingβ¦" pill. Call closeAll() from the ham-gate-act branch in tracker-actions.js:988 or in the menu's own click path.
β hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
CI at head
The hive does not push to your branch; a new head re-runs CI and the review swarm automatically. π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
β¦d pins, fold gate verbs on stacked/phone tiers Signed-off-by: Andrew Anderson <andy@clubanderson.com>
There was a problem hiding this comment.
Correctness at head b508ec8 β read against the sentinel sweep at merge-base.
The CI fixes from b199fb2 β b508ec8 check out: the "already clear" case now sends a user (api_repo_item_sentinel_confirm_test.go:97), the two direct writes carry // writeback:solicited which ratchet_test.go:91 accepts, and the route is in dashboard/openapi.json. The common case is also safe: when the alert comment names the current head, sentinel_sweep.go:728-737 (sentinelClearedByMaintainer) sees "alert for this head present, label absent" and does not re-label.
Still open from the c417a43 review: Confirm safe is undone when the alert was raised on an earlier head
Nothing in this head changed that path β the b508ec8 diff touches the handler only for the owner/solicited fixes. Mechanism, as the tree stands:
api_repo_item_sentinel_confirm.go:126-139posts<!-- hive:sentinel-confirmed -->and removes the label as the hive App. The marker is not bound to a head, and no Go code reads it (grep -rn 'sentinel-confirmed' src/pkgfinds only this file).- When the head moved after the alert (Renovate rebase, the #13602 case), the sweep takes the
!postedbranch atsentinel_sweep.go:739-765.sentinelClearedAfterLatestPushrejects theunlabeledevent because the actor is a hive account (sentinel_clearance.go:84-89);sentinelReleasedByDashboardApprovalonly recognisesParsePRApprovalCommandCommentmarkers (sentinel_clearance.go:135). Neither sees the confirmation, so the sweep falls through toAddLabelsToIssueat:792and re-labels the PR the person just confirmed β the dibs#510 regression class, re-opened on the new verb. - The file comment at
:54-56("the marker lets the sentinel sweep and the delegate recognise a human confirmation") describes behaviour this diff does not implement.
Smallest fix: bind the head into the marker (as renderPRApprovalCommandComment does) and have sentinelReleasedByDashboardApproval β or a sibling β accept a hive-authored hive:sentinel-confirmed head=<sha> comment for the current head. A test in sentinel_clearance_test.go with alert-on-A / confirm-on-B / sweep-on-B would fail without it.
Severity: medium. Consequence: on rebased PRs the only sentinel verb the pill offers silently reverts on the next tick, and the maintainer removes the same label twice.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
There was a problem hiding this comment.
Correctness re-review of the delta c417a43 β b508ec8 (source hunks read; generated index.html/openapi.json skimmed).
Previous findings: docs-currency (src/docs/notifications.md write-site row) β fixed (notifications.md:475, notification_write_sites.go:45). Style (raw border-radius in tracker.css) β addressed in the delta (tracker.css:985-990: parent overflow:hidden + --ham-gate-seg-radius), left to the style perspective to confirm.
One low advisory in the delta:
β¦ menu opens with focus on a hidden item (strip tier). tracker-human-gate.js:194 now puts every verb after the first into the menu, with the strip-tier copies marked data-ham-gate-inline and hidden by tracker.css:1001 (display:none). But the opener at tracker-human-gate.js:221 still does menu.querySelector('[role="menuitem"]') β the first child is one of those hidden copies, and .focus() on a display:none element is a no-op, so keyboard users who open the overflow on β₯1100px get no focus move (regression from the previous head, where the first menu item was always a visible overflow verb). Phone/stacked tier is unaffected (all items visible there).
if (menu && open) { menu.hidden = false; b.setAttribute('aria-expanded', 'true'); const first = Array.from(menu.querySelectorAll('[role="menuitem"]')).find(m => m.offsetParent !== null); if (first) first.focus(); }
Checked and fine: api_repo_item_sentinel_confirm_test.go:96 switching the owner-role case to a named user matches the handler's X-Hive-User 401 guard (api_repo_item_sentinel_confirm.go:84-87); the verbs() test helper dedupe keeps the union-order assertions meaningful; the pill lives inside .ham-head-cols (tracker-row-layout.js:18) so the β€1100px fold rules also govern the phone tier. CI was still pending at review time.
β hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Read the new endpoint against the sentinel sweep and the evidence-bundle readers at merge-base 42f95be. The UI unification reads as described; the Go endpoint is correctly authorised (canToggleRepoHold, MaxBytesReader, label removal scoped to the configured sentinel label). Two places where Confirm safe does less than the existing Approve path, so the gate it opens can close again:
1. The sweep can re-label a PR a person confirmed safe (medium). src/pkg/dashboard/api_repo_item_sentinel_confirm.go:53-55 says the <!-- hive:sentinel-confirmed --> marker "lets the sentinel sweep and the delegate recognise a human confirmation", but nothing outside this file reads it (grep -rn hive:sentinel-confirmed src --include=*.go β only this file). The sweep's clearance logic rejects this removal specifically:
src/pkg/github/sentinel_clearance.go:80-86β the lastunlabeledactor must not be the hive account or aBot.Confirm saferemoves the label throughs.deps.GHClient(api_repo_item_sentinel_confirm.go:131), i.e. as the App bot, sosentinelClearedAfterLatestPushreturnsfalse.src/pkg/github/sentinel_clearance.go:129β the fallback only recognisesParsePRApprovalCommandComment(the head-bound Approve carrier), not this marker.
The common case is safe: when the alert comment for the current head exists, sentinel_sweep.go:728 clears via sentinelClearedByMaintainer regardless of actor. The hole is the #13602 shape β head moved (Renovate rebase) between the alert and the confirmation, so no marker exists for the current head β combined with the #11686 shape (hub restart empties the heads map). On the next full pass sentinel_sweep.go:739-767 finds !posted, neither clearance check fires, and :792 re-applies the label and re-alerts. A person then has to confirm the same finding twice, which is exactly what #13602 fixed for the hand-removal path. Suggested fix: bind the head in the marker (like the Approve carrier does) and teach sentinelReleasedByDashboardApproval (or a sibling) to accept it.
2. A bundle-promoted alert stays lit after Confirm safe (medium). Approve records evidence.ActionSentinelAcknowledged on the head's bundle (api_repo_item_decision.go:884, activity-monitor.md:245); stage_tracker.go:1229-1238 only drops a bundle/notice alert when SentinelAcknowledgedBy() is non-empty. Confirm safe writes no evidence action, so on the bundle-only case your docs call out (crux#30: findings, no label) sentinelLabelsOn returns nothing, the endpoint answers AlreadyClear with "no sentinel-alert label was on the item" (:147), and the row's pill stays lit with the same Confirm safe verb. Recording the same sentinel_acknowledged action here would also make automerge_hive_superseder.go:33-45 see the confirmation.
Neither is in the test fixtures (api_repo_item_sentinel_confirm_test.go stubs the client; stage_tracker_human_gate_test.go covers rendering only), which is why CI is green.
Everything else I checked β route wiring api.go:347, operator_actions.go:387 ledger mapping, notification_write_sites.go:45 registration, the type round-trip in tracker-actions.js:1377 β matches.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at d2ede80. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
β¦px tap target (#17515) * π dashboard: fold the human-gate verbs at render time; β¦ keeps its 44px tap target The merged pill (#17505) folded its verbs with CSS β display:none on the trailing verbs and an always-rendered hidden menu β which the mobile-shots acceptance rejects: tracker-header-geometry hit-tests every button in .ham-badges, and tracker-phone-ergonomics measured the β¦ button at 28px because its tap-target rule used a child selector while the button sits inside .ham-gate-more-wrap. Now the row renders only the visible verbs (three on the strip tier, one plus β¦ at β€1100px via matchMedia, re-rendered on change); the overflow items wait in a <template> and are stamped into the row the first time β¦ opens; the tap-target sizing targets the descendant β¦ button. Fixes #17514 Signed-off-by: Andrew Anderson <andy@clubanderson.com> * changelog: fragment for #17515 Generated by changelog-fragment-guard from the PR title (#5675). Edit the wording freely, or replace this file with the no-changelog label if the change is not user-visible. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com> --------- Signed-off-by: Andrew Anderson <andy@clubanderson.com> Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com> Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Fixes #17504
Maintainer, 2026-11-10 (full-board screenshot): "I don't see a consistent way to settle each of these using the UI. Some are confusing, others have no controls to take action, others have too many."
What changes
One human-gate control per gated row. A segmented pill
[π€ Needs human Β· <reasons>] [verb] [verb] [verb] [β¦ more]replaces the scatteredNeeds human Β· reviewchevron word +sentinelchip + needs-decision pill +Approve βΈ+Let hive decide βΈ. The status segment names why (review/decision/sentinel/hold, comma-separated when stacked) and carries the reviewer's question or the sentinel rule as its hover (decision popover on click; the question stays in the expander line).Verbs are fixed per reason, unioned and de-duplicated when reasons stack, β€ 3 visible +
β¦menu:reviewdecisionsentinelhold"Needs human" is never a chevron word.
Needs human Β· β¦,Held Β· sentinel Β· confirm intent,Held Β· holdandSentinel alert Β· needs humanare gone from the strip (and theΒ· sentinelsuffix on 071/072 words); the lit chevron is the row's real stage (CI while checks run β #17481, crux #140) with the amberham-human-gatedoutline as the bar's only cue.Secondary rows of a shared PR render no gate and no amber chevron; their
decision pending on #Nchip is a link that scrolls to / focuses the primary row (#17333 anchoring).New endpoint
POST /api/repos/{owner}/{repo}/items/{number}/sentinel-confirm(Hold authorisation, dashboard-user attribution, auditedrepo_item_sentinel_confirm, ledger verbconfirm-sentinel): comments<!-- hive:sentinel-confirmed -->+ the person's words, then removes the configured sentinel label; idempotent when already clear.All verbs run
runRowAction(in-app modal, result toast, acting row); the pill readssettlingβ¦until the next snapshot. Phone tier: the status segment folds to its icon, every verb keeps a β₯ 44px tap target.Tests
TestStageTrackerHumanGateRows: fixtures for hive#17470/PR π± dco: waive the #17464 squash whose sign-off address differs from its authorΒ #17481 (review + sentinel + CI running β one lit CI chevron, no gate word on any chevron, one pill, 3 visible verbs +β¦), crux#139/PR Clickable repo cards + fix vanishing intensity gaugeΒ #140 (090 + sentinel + CI running β lit CI, no "Held",Confirm safe), PR π dashboard: show Tide's reason on a CI chevron with a missing Prow presubmitΒ #17480 (decision verbs), hold + decision stacking, per-reason verb sets, secondary-row suppression + link.TestStageTrackerHumanGateWiring, rewrittenTestStageTrackerSentinelLaneText/β¦Wiring, updated row/needs-human/notice pins.TestRepoItemSentinelConfirmAuthorizationCommentAndLabel,TestSentinelConfirmPureHelpers, operator-action table row.Docs
activity-monitor.md: new Settling a human gate table (reason β verbs β what gets posted), sentinel/held paragraphs rewritten; copy inventory row; API reference row (+ citation--fix); changelog fragment.