diff --git a/changelog.d/fixed-tracker-informational-sentinel.md b/changelog.d/fixed-tracker-informational-sentinel.md new file mode 100644 index 0000000000..0f29e7b429 --- /dev/null +++ b/changelog.d/fixed-tracker-informational-sentinel.md @@ -0,0 +1 @@ +- Keep informational trusted-author security notices separate from actual sentinel gates in Activity Monitor, quoting the real reviewer question without assigning exclusive decision authority to either the PR author or a person the reviewer mentions. diff --git a/src/docs/dashboard-sections/activity-monitor.md b/src/docs/dashboard-sections/activity-monitor.md index 7b750538ee..7b74011708 100644 --- a/src/docs/dashboard-sections/activity-monitor.md +++ b/src/docs/dashboard-sections/activity-monitor.md @@ -99,6 +99,8 @@ The header reports the filtered row count and how many need attention; paginatio ### How you'll know something is waiting on you +A verified trusted-author security notice without the live blocking sentinel label is informational, not the reason a human must act. Its tooltip says **Informational security notice (not a merge gate)**. An independent reviewer decision retains its quoted question with reviewer provenance. A login mentioned in that question is not an assignment or exclusive authority; neither that suggestion nor the PR author's identity supplies a decision owner. A real blocking sentinel label still names its security gate, even when a reviewer question also exists. + The hive often parks work on a person: a decision asked at **045** / **085**, a PR at **090** ready for a human merge, an approval the hive's GitHub App cannot give (`needs-human`, `unauthorized`), or a contributor who has gone offline past their grace so the operator is the fallback. Those waits used to look like any other row ("PR in progress"); nothing added them up and nothing said so. Three surfaces now read one server block, `/api/stage-tracker` → `waiting_on_human` (`count`, `items[{repo, number, type, kind, since, who}]`), so a human wait is never silent: - **Sidebar.** A second, orange badge on **Hive activity monitor** carries the waiting-on-you count (the grey badge stays the row count). Its tooltip lists the five longest waits with what each needs and how long it has waited. Hidden at zero. diff --git a/src/pkg/dashboard/stage_tracker.go b/src/pkg/dashboard/stage_tracker.go index acbd9d9239..e46dbc5e92 100644 --- a/src/pkg/dashboard/stage_tracker.go +++ b/src/pkg/dashboard/stage_tracker.go @@ -431,6 +431,9 @@ type StageTrackerItem struct { SentinelAlert bool `json:"sentinel_alert,omitempty"` SentinelFindings int `json:"sentinel_findings,omitempty"` SentinelReason string `json:"sentinel_reason,omitempty"` + // SentinelNotice marks verified informational findings without the live + // blocking label. The notice remains visible but is not a decision gate. + SentinelNotice bool `json:"sentinel_notice,omitempty"` // HumanApprover is the trusted merger whose GitHub Approve review on // the current head settled a requires_human verdict or a manual-merge // lane rule (the `:human-approved@login` suffix on the stage reason). @@ -695,6 +698,7 @@ type StageTrackerLinkedPR struct { // so a sub-row under an issue names the alert too. SentinelAlert bool `json:"sentinel_alert,omitempty"` SentinelReason string `json:"sentinel_reason,omitempty"` + SentinelNotice bool `json:"sentinel_notice,omitempty"` // HumanApprover / ManualMerge / HumanMergeReason(Text) mirror the // nested PR's 090 fields so a sub-row's gate cell says why a person // merges it, as the top-level row would (hivecommons/hive#14658). diff --git a/src/pkg/dashboard/stage_tracker_actor.go b/src/pkg/dashboard/stage_tracker_actor.go index 7b0c5fce72..70c021f41b 100644 --- a/src/pkg/dashboard/stage_tracker_actor.go +++ b/src/pkg/dashboard/stage_tracker_actor.go @@ -305,6 +305,11 @@ func stageTrackerClipReason(s string) string { // stageTrackerDecisionWhy: the clause after "a human decision is owed" — // the lane reason humanized ("workflow path"), else the asker's question. func stageTrackerDecisionWhy(it StageTrackerItem) string { + if it.SentinelNotice && it.DecisionNeeded != nil && it.DecisionNeeded.AskedBy == decisionAskedByReviewer { + if question := strings.TrimSpace(it.DecisionNeeded.Question); question != "" { + return "reviewer question: " + question + } + } if clause := humanizeStageReason(it.Reason); clause != "" { return clause } diff --git a/src/pkg/dashboard/stage_tracker_build.go b/src/pkg/dashboard/stage_tracker_build.go index 7ed9ee5dc6..7a5ec54109 100644 --- a/src/pkg/dashboard/stage_tracker_build.go +++ b/src/pkg/dashboard/stage_tracker_build.go @@ -403,6 +403,9 @@ func (s *Server) buildStageTracker(status *StatusPayload, store *stagelabels.Sto // is offline says what that means for it. it.Caption = stageTrackerOfflineAuthorCaption(it.Caption, it.Presence, it.Stage, adoptionClock, now) it.SentinelAlert, it.SentinelFindings, it.SentinelReason = s.stageTrackerSentinel(evidenceVerifier, repoName, pr.Number, pr.HeadSHA, pr.Labels) + it.SentinelNotice = it.SentinelAlert && !slices.ContainsFunc(pr.Labels, func(label string) bool { + return strings.EqualFold(strings.TrimSpace(label), sentinelLabel) + }) // The sentinel chip is a merge-gate pill too (the trusted-author // notice and the real alert alike): sentinel_alert stays truthful // for the gate word and the Decide… preface, but before the gate diff --git a/src/pkg/dashboard/stage_tracker_decision_pr.go b/src/pkg/dashboard/stage_tracker_decision_pr.go index 9e45b3eb9f..266c2c2fa0 100644 --- a/src/pkg/dashboard/stage_tracker_decision_pr.go +++ b/src/pkg/dashboard/stage_tracker_decision_pr.go @@ -29,7 +29,7 @@ func decisionForPR(it StageTrackerItem, verdict *review.Aggregate, sentinelLabel selfHold = it.Hold } - sentinel := it.SentinelAlert || lower == "sentinel" || lower == stageengineprstage.ContributorLaneReasonSentinelBlocked + sentinel := !it.SentinelNotice && (it.SentinelAlert || lower == "sentinel" || lower == stageengineprstage.ContributorLaneReasonSentinelBlocked) changes := decisionChangesRequested(base) laneRule := decisionLaneRule(base) adoptionLane, adoptionStalled := strings.CutPrefix(base, stagelabels.LaneReasonAdoptionStalledPrefix) diff --git a/src/pkg/dashboard/stage_tracker_links.go b/src/pkg/dashboard/stage_tracker_links.go index 312c9b573f..33f92c10fb 100644 --- a/src/pkg/dashboard/stage_tracker_links.go +++ b/src/pkg/dashboard/stage_tracker_links.go @@ -322,6 +322,7 @@ func stageTrackerResolveLinkedPRs(items []StageTrackerItem, open func(repo strin lp.Title, lp.Author, lp.AuthorKind, lp.Stage = pr.Title, pr.Author, pr.AuthorKind, pr.Stage lp.StageSince, lp.Caption = pr.StageSince, pr.Caption lp.SentinelAlert, lp.SentinelReason, lp.Head = pr.SentinelAlert, pr.SentinelReason, pr.Head + lp.SentinelNotice = pr.SentinelNotice lp.Claimant = pr.Claimant lp.Adoption = pr.Adoption lp.Presence = pr.Presence diff --git a/src/pkg/dashboard/stage_tracker_sentinel_lane_test.go b/src/pkg/dashboard/stage_tracker_sentinel_lane_test.go index 65ac4a34dd..015840c26c 100644 --- a/src/pkg/dashboard/stage_tracker_sentinel_lane_test.go +++ b/src/pkg/dashboard/stage_tracker_sentinel_lane_test.go @@ -115,6 +115,9 @@ func TestStageTrackerSentinelFlag(t *testing.T) { resp := s.buildStageTracker(s.status, store, now) labelled := trackerItem(t, resp, "pr", 109) + if labelled.SentinelNotice { + t.Fatal("a live blocking label must not become an informational notice") + } if !labelled.SentinelAlert || labelled.SentinelFindings != 0 || labelled.SentinelReason != "" { t.Fatalf("label-only PR 109 = alert %v findings %d reason %q", labelled.SentinelAlert, labelled.SentinelFindings, labelled.SentinelReason) } @@ -122,6 +125,9 @@ func TestStageTrackerSentinelFlag(t *testing.T) { t.Fatalf("PR 109 stage = %d, want 085", labelled.Stage) } evid := trackerItem(t, resp, "pr", 110) + if !evid.SentinelNotice { + t.Fatal("verified trusted-author findings without a blocking label must be informational") + } if !evid.SentinelAlert || evid.SentinelFindings != 2 || evid.SentinelReason != "touches OWNERS (+1 more)" || evid.Head != headEvidence { t.Fatalf("evidence PR 110 = alert %v findings %d reason %q head %q", evid.SentinelAlert, evid.SentinelFindings, evid.SentinelReason, evid.Head) } @@ -167,6 +173,9 @@ func TestStageTrackerSentinelFlag(t *testing.T) { if nested == nil || !nested.SentinelAlert || nested.Head != headClean { t.Fatalf("issue 13 linked_prs must mirror PR 112's alert: %+v", issue.LinkedPRs) } + if nested.SentinelNotice { + t.Fatal("the nested live label must retain its blocking meaning") + } // Webhook: the label comes off → flag drops; goes on → flag returns. // The head the re-read reports is kept so evidence follows the revision. @@ -286,7 +295,7 @@ func TestStageTrackerSentinelLaneWiring(t *testing.T) { `confirmLabel: 'Post /lgtm + /approve', danger: !!sentinel`, `label: preface + 'What should the hive change on '`, `if (item.sentinel_alert && deferred.indexOf(STAGE_TRACKER_SENTINEL_CHIP) < 0) lines.push(stageTrackerSentinelTip(item));`, - `sentinel_alert: !!lp.sentinel_alert, sentinel_reason: lp.sentinel_reason || '', head: lp.head || ''`, + `sentinel_alert: !!lp.sentinel_alert, sentinel_reason: lp.sentinel_reason || '', sentinel_notice: !!lp.sentinel_notice, head: lp.head || ''`, } { if !strings.Contains(html, want) { t.Errorf("index.html missing sentinel lane wiring %q", want) diff --git a/src/pkg/dashboard/stage_tracker_sentinel_notice_test.go b/src/pkg/dashboard/stage_tracker_sentinel_notice_test.go new file mode 100644 index 0000000000..91e7ee2aa7 --- /dev/null +++ b/src/pkg/dashboard/stage_tracker_sentinel_notice_test.go @@ -0,0 +1,74 @@ +package dashboard + +import ( + "encoding/json" + "strings" + "testing" + "time" + + "github.com/hivecommons/hive/pkg/review" + "github.com/hivecommons/hive/pkg/stageengine" + "github.com/hivecommons/hive/pkg/stagelabels" +) + +func TestStageTrackerSentinelNoticePreservesActualReviewerDecision(t *testing.T) { + const question = "@hanthor: may the protected build-and-test context become a three-lane aggregate gated by required-context-scope success?" + it := StageTrackerItem{ + Kind: "pr", Repo: "hivecommons/hive", Number: 16026, + Head: "32fe2056576fce6ddf93a51f1dd17431575679d7", + Stage: stagelabels.NeedsDecision.Number(), Reason: stageengine.StageReasonVerdictRequiresHuman, + Author: "clubanderson", AuthorKind: authorKindHuman, + SentinelAlert: true, SentinelNotice: true, SentinelReason: "workflow changes by a trusted author", + } + verdict := &review.Aggregate{HeadSHA: it.Head, DecisionQuestion: question} + d := stageTrackerDecisionNeeded(it, verdict, "sentinel-alert") + if d == nil || d.Question != question || d.AskedBy != decisionAskedByReviewer || + strings.Contains(d.Blocker, "security check") || strings.Contains(d.Blocker, "sentinel-alert") { + t.Fatalf("informational notice displaced the actual reviewer question: %+v", d) + } + it.DecisionNeeded = d + actor := stageTrackerStageActor(it, nil, time.Now()) + if actor.Kind != StageActorHuman || actor.Login != "" || !strings.Contains(actor.Why, "@hanthor") || + !strings.Contains(actor.Why, "reviewer question:") || strings.Contains(actor.Why, "clubanderson") || strings.Contains(actor.HumanReason, "sentinel") { + t.Fatalf("author or notice became the decision owner/reason: %+v", actor) + } + it.StageActor = actor + payload, err := json.Marshal(it) + if err != nil { + t.Fatal(err) + } + html := indexHTML(t) + runStageTrackerRowActionsScript(t, stageTrackerRowsPreludeJS(t, html)+stageTrackerRowsFixtureJS+ + jsFunc(t, html, "stageTrackerSentinelPreface")+ + "\nconst notice = "+string(payload)+";\n"+` +assert.strictEqual(stageTrackerSentinelInLane(notice), false); +assert.strictEqual(stageTrackerSentinelAsSuffix({...notice, stage:71}), false); +assert.ok(stageTrackerSentinelTip(notice).includes('Informational security notice (not a merge gate)')); +assert.ok(!stageTrackerSentinelTip({...notice, sentinel_reason:''}).includes('must review before merge')); +const own = stageTrackerRowHtml(notice, stages, ctx); +assert.ok(!text(own).includes('Sentinel alert'), text(own)); +assert.ok(!own.includes('aria-label="Sentinel alert'), own); +assert.ok(own.includes('ham-sentinel-notice'), own); +assert.strictEqual(stageTrackerSentinelPreface([notice]), '', 'informational notice is not an approval danger preface'); +assert.ok(!text(own).includes('Needs @clubanderson'), text(own)); +assert.ok(own.includes('@hanthor'), own); +const linked = stageTrackerLinkedPRItem({repo:notice.repo, number:500}, notice); +assert.strictEqual(linked.sentinel_notice, true, 'canonical linked adapter preserves notice semantics'); +const inline = stageTrackerRowHtml({repo:notice.repo, kind:'issue', number:500, stage:40, linked_prs:[notice]}, stages, ctx); +assert.ok(!text(inline).includes('Sentinel alert'), text(inline)); +assert.ok(!text(inline).includes('Needs @clubanderson'), text(inline)); +const nested = stageTrackerRowHtml({repo:notice.repo, kind:'issue', number:500, stage:40, + linked_prs:[notice, {...notice, number:16099, sentinel_alert:false, sentinel_notice:false, stage:50}]}, stages, ctx); +assert.ok(!text(nested).includes('Sentinel alert'), text(nested)); +assert.ok(!text(nested).includes('Needs @clubanderson'), text(nested)); +const blocking = {...notice, sentinel_notice:false}; +assert.strictEqual(stageTrackerSentinelInLane(blocking), true, 'actual blocking alert remains a sentinel gate'); +assert.strictEqual(stageTrackerSentinelAsSuffix({...blocking, stage:71}), true); +assert.ok(!stageTrackerSentinelTip(blocking).includes('Informational')); +`) + it.SentinelNotice = false + blocking := stageTrackerDecisionNeeded(it, verdict, "sentinel-alert") + if blocking == nil || !strings.Contains(blocking.Blocker, "sentinel-alert") || blocking.Question != question { + t.Fatalf("genuine alert or coexisting reviewer question was suppressed: %+v", blocking) + } +} diff --git a/src/pkg/dashboard/static-src/css/tracker.css b/src/pkg/dashboard/static-src/css/tracker.css index 4f0501cc1d..7feb1bab1e 100644 --- a/src/pkg/dashboard/static-src/css/tracker.css +++ b/src/pkg/dashboard/static-src/css/tracker.css @@ -280,6 +280,7 @@ reads "Sentinel alert · needs human". Danger-tinted from the status token the sentinel pill on the repo card already uses. */ .ham-badge-sentinel { color: var(--status-error); border-color: color-mix(in srgb, var(--status-error) 55%, transparent); font-weight: var(--fw-medium); } + .ham-badge-sentinel.ham-sentinel-notice { color: var(--status-info); border-color: color-mix(in srgb, var(--status-info) 55%, transparent); } .ham-seg.active.ham-sentinel { background: var(--status-error); color: var(--surface-0); } /* 072 adoption chip (maintainer-policy, hive PR 14524): "waiting on @author (maintainer, offline 26h) — adopt?" */ .ham-badge-adoption { color: var(--status-warn); border-color: color-mix(in srgb, var(--status-warn) 55%, transparent); font-weight: var(--fw-medium); } diff --git a/src/pkg/dashboard/static-src/js/tracker-actions.js b/src/pkg/dashboard/static-src/js/tracker-actions.js index 69789e5ce4..8bb58ca51e 100644 --- a/src/pkg/dashboard/static-src/js/tracker-actions.js +++ b/src/pkg/dashboard/static-src/js/tracker-actions.js @@ -1470,7 +1470,7 @@ // flagged PR, so the operator reads the security reason before // choosing Approve; '' when nothing in items is flagged. function stageTrackerSentinelPreface(items) { - return (items || []).filter(it => it && it.sentinel_alert).map(it => '⚠ ' + stageTrackerRefOf(it) + ' — ' + stageTrackerSentinelTip(it)).join('\n'); + return (items || []).filter(it => it && it.sentinel_alert && !it.sentinel_notice).map(it => '⚠ ' + stageTrackerRefOf(it) + ' — ' + stageTrackerSentinelTip(it)).join('\n'); } // Every confirm a row action raises can be opted out of per browser, // per action id (the dialog's "Don't ask again for this action" box; diff --git a/src/pkg/dashboard/static-src/js/tracker-row-layout.js b/src/pkg/dashboard/static-src/js/tracker-row-layout.js index 407dc25d82..0ac0208168 100644 --- a/src/pkg/dashboard/static-src/js/tracker-row-layout.js +++ b/src/pkg/dashboard/static-src/js/tracker-row-layout.js @@ -63,7 +63,7 @@ return { repo: canonical ? canonical[1] : (lp.repo || issue.repo), number: lp.number, kind: 'pr', title: lp.title || '', url: lp.url || '', author: lp.author || '', author_kind: lp.author_kind || '', state: lp.state || '', terminal_merge: !!lp.terminal_merge, merged_by: lp.merged_by || '', stage: lp.stage || 0, stage_since: lp.stage_since || '', stage_slug: lp.stage_slug || '', modifiers: lp.modifiers || [], deferred_modifiers: lp.deferred_modifiers || [], caption: lp.caption || '', reason: lp.reason || '', preparation: lp.preparation || null, human_attention: lp.human_attention || null, - human_approver: lp.human_approver || '', manual_merge: !!lp.manual_merge, human_merge_reason: lp.human_merge_reason || '', human_merge_reason_text: lp.human_merge_reason_text || '', sentinel_alert: !!lp.sentinel_alert, sentinel_reason: lp.sentinel_reason || '', head: lp.head || '', base_ref: lp.base_ref || '', decision_needed: lp.decision_needed || null, + human_approver: lp.human_approver || '', manual_merge: !!lp.manual_merge, human_merge_reason: lp.human_merge_reason || '', human_merge_reason_text: lp.human_merge_reason_text || '', sentinel_alert: !!lp.sentinel_alert, sentinel_reason: lp.sentinel_reason || '', sentinel_notice: !!lp.sentinel_notice, head: lp.head || '', base_ref: lp.base_ref || '', decision_needed: lp.decision_needed || null, adoption: lp.adoption || null, takeover: lp.takeover || null, superseded: !!lp.superseded, supersedes: lp.supersedes || null, parent: Number(issue.number) || 0, siblings: open.map(x => Number(x.number) || 0), last_operator_action: lp.last_operator_action || null, operator_action_count: lp.operator_action_count || 0, hold: lp.hold || null, stage_actor: lp.stage_actor || null, claimant: lp.claimant || null, presence: lp.presence || null, rework: lp.rework || null, push: lp.push || null, merge_gate: lp.merge_gate || null, merge_train: lp.merge_train || null, left_train: lp.left_train || null, overlap: lp.overlap || null, decided: lp.decided || null, adopted_by: Number(lp.adopted_by) || 0, adopted_by_state: lp.adopted_by_state || '', adopted_from: lp.adopted_from || null, lineage: lp.lineage || null, state: lp.state || '', superseded_by: Number(lp.superseded_by) || 0 }; @@ -490,7 +490,7 @@ prRefs = [STAGE_TRACKER_LINKED_GLYPH + stageTrackerPRPillsHtml(stageTrackerPRRef(lp.number, lp.url, lp.author_kind || '', lp.author, lp.title, (lp.title ? lp.title + '\n' : '') + 'Author: ' + who + ' · ' + stageTrackerLinkedTip(item, lp.number, ctx)), typeof stageTrackerLinkedChipsHtml === 'function' ? stageTrackerLinkedChipsHtml(lp, lineage) : (lineage || null), lp.base_ref)]; shown = Object.assign({}, item, { via_pr: true, stage: stageTrackerLeadStage(lp), stage_since: lp.stage_since || item.stage_since, modifiers: lp.modifiers || item.modifiers, deferred_modifiers: lp.deferred_modifiers || item.deferred_modifiers || [], caption: lp.caption || item.caption, reason: lp.reason || item.reason, preparation: lp.preparation || null, terminal_merge: !!lp.terminal_merge, merged_by: lp.merged_by || '', - human_approver: lp.human_approver || '', manual_merge: !!lp.manual_merge, human_merge_reason: lp.human_merge_reason || '', human_merge_reason_text: lp.human_merge_reason_text || '', sentinel_alert: !!lp.sentinel_alert, sentinel_reason: lp.sentinel_reason || '', head: lp.head || '', decision_needed: lp.decision_needed || null, hold: lp.hold || null, adoption: lp.adoption || null, stage_actor: lp.stage_actor || item.stage_actor || null, claimant: lp.claimant || null, presence: lp.presence || null, rework: lp.rework || null, push: lp.push || null, merge_gate: lp.merge_gate || null, merge_train: lp.merge_train || null, left_train: lp.left_train || null, overlap: lp.overlap || null, decided: lp.decided || item.decided || null }); + human_approver: lp.human_approver || '', manual_merge: !!lp.manual_merge, human_merge_reason: lp.human_merge_reason || '', human_merge_reason_text: lp.human_merge_reason_text || '', sentinel_alert: !!lp.sentinel_alert, sentinel_reason: lp.sentinel_reason || '', sentinel_notice: !!lp.sentinel_notice, head: lp.head || '', decision_needed: lp.decision_needed || null, hold: lp.hold || null, adoption: lp.adoption || null, stage_actor: lp.stage_actor || item.stage_actor || null, claimant: lp.claimant || null, presence: lp.presence || null, rework: lp.rework || null, push: lp.push || null, merge_gate: lp.merge_gate || null, merge_train: lp.merge_train || null, left_train: lp.left_train || null, overlap: lp.overlap || null, decided: lp.decided || item.decided || null }); } else if (linked.length) { // Several covering PRs: the issue strip ends at Claimed, all passed // and nothing lit; one sub-row per PR carries the live chevron. diff --git a/src/pkg/dashboard/static-src/js/tracker-row-strip.js b/src/pkg/dashboard/static-src/js/tracker-row-strip.js index e479b5f360..b7acdb3885 100644 --- a/src/pkg/dashboard/static-src/js/tracker-row-strip.js +++ b/src/pkg/dashboard/static-src/js/tracker-row-strip.js @@ -287,7 +287,8 @@ } function stageTrackerSentinelChipHtml(item) { if (!item || !item.sentinel_alert || stageTrackerSentinelInLane(item) || stageTrackerSentinelAsSuffix(item) || stageTrackerDeferredMods(item).indexOf(STAGE_TRACKER_SENTINEL_CHIP) >= 0) return ''; - return `${esc(STAGE_TRACKER_SENTINEL_CHIP)}`; + const label = item.sentinel_notice ? 'Informational security notice' : 'Sentinel alert'; + return `${esc(STAGE_TRACKER_SENTINEL_CHIP)}`; } // Pure: the hold pill text from the row's `hold` provenance ('' when the diff --git a/src/pkg/dashboard/static-src/js/tracker-words.js b/src/pkg/dashboard/static-src/js/tracker-words.js index 212ab25798..6de3010af7 100644 --- a/src/pkg/dashboard/static-src/js/tracker-words.js +++ b/src/pkg/dashboard/static-src/js/tracker-words.js @@ -446,12 +446,14 @@ if (!item || !item.sentinel_alert) return ''; const head = String(item.head || '').slice(0, STAGE_TRACKER_SHORT_SHA); const reason = String(item.sentinel_reason || '').trim(); - return STAGE_TRACKER_SENTINEL_TIP + (head ? ' at ' + head : '') + ': ' + (reason || STAGE_TRACKER_SENTINEL_TIP_FALLBACK); + const lead = item.sentinel_notice ? 'Informational security notice (not a merge gate)' : STAGE_TRACKER_SENTINEL_TIP; + const fallback = item.sentinel_notice ? 'informational findings; no blocking sentinel label' : STAGE_TRACKER_SENTINEL_TIP_FALLBACK; + return lead + (head ? ' at ' + head : '') + ': ' + (reason || fallback); } // Whether the item's lit chevron word carries the alert itself (a PR // parked at 085, or an issue riding one): the chip then adds nothing. function stageTrackerSentinelInLane(item) { - return !!(item && item.sentinel_alert) && (Number(item.stage) || 0) === STAGE_TRACKER_NEEDS_DECISION && (item.kind === 'pr' || !!item.via_pr); + return !!(item && item.sentinel_alert && !item.sentinel_notice) && (Number(item.stage) || 0) === STAGE_TRACKER_NEEDS_DECISION && (item.kind === 'pr' || !!item.via_pr); } // A returned PR (071/072) keeps its routing word — the human already // acted, nothing is owed by the maintainer — and carries the alert as @@ -459,7 +461,7 @@ // then adds nothing. function stageTrackerSentinelAsSuffix(item) { const st = Number(item && item.stage) || 0; - return !!(item && item.sentinel_alert) && (st === 71 || st === 72) && (item.kind === 'pr' || !!item.via_pr); + return !!(item && item.sentinel_alert && !item.sentinel_notice) && (st === 71 || st === 72) && (item.kind === 'pr' || !!item.via_pr); } // Pure: whose PR a 071/072 row waits on — the row's own author, or, for // an issue row drawn through its one covering PR (via_pr), that PR's diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html index dfb68a5099..ca5f959725 100644 --- a/src/pkg/dashboard/static/index.html +++ b/src/pkg/dashboard/static/index.html @@ -1617,6 +1617,7 @@ reads "Sentinel alert · needs human". Danger-tinted from the status token the sentinel pill on the repo card already uses. */ .ham-badge-sentinel { color: var(--status-error); border-color: color-mix(in srgb, var(--status-error) 55%, transparent); font-weight: var(--fw-medium); } + .ham-badge-sentinel.ham-sentinel-notice { color: var(--status-info); border-color: color-mix(in srgb, var(--status-info) 55%, transparent); } .ham-seg.active.ham-sentinel { background: var(--status-error); color: var(--surface-0); } /* 072 adoption chip (maintainer-policy, hive PR 14524): "waiting on @author (maintainer, offline 26h) — adopt?" */ .ham-badge-adoption { color: var(--status-warn); border-color: color-mix(in srgb, var(--status-warn) 55%, transparent); font-weight: var(--fw-medium); } @@ -16868,12 +16869,14 @@