diff --git a/changelog.d/changed-queued-for-merge-wording.md b/changelog.d/changed-queued-for-merge-wording.md new file mode 100644 index 0000000000..fa263a49ef --- /dev/null +++ b/changelog.d/changed-queued-for-merge-wording.md @@ -0,0 +1 @@ +- Activity Monitor: every PR whose only remaining step is the merge itself now reads one chevron word, **Queued for merge**, with a short qualifier after the dot saying why it has not merged yet — *· next pass in 42s*, *· checking now*, *· soak 12m left*, *· 2nd of 3* (merge train), *· next pass* (Approve / Let hive decide), *· after CI* (Approve and let hive merge while checks run, or a merge call refused for unreported checks), *· needs rebase* (head moved under the merge call), *· branch protection pending*. Three adjacent approved rows on hive's own tracker read *Ready for auto merge …*, *Approved · hive will…* and *Approved · merge queu…*; the tooltip keeps the full explanation. *Soaking*, *Merging*, *Rebasing*, *Needs human decision* and a *Merge failed* a person must fix stay their own words (hivecommons/hive#16653). diff --git a/src/docs/api-reference/dashboard-misc.md b/src/docs/api-reference/dashboard-misc.md index 63173e935a..1eb2f14639 100644 --- a/src/docs/api-reference/dashboard-misc.md +++ b/src/docs/api-reference/dashboard-misc.md @@ -55,7 +55,7 @@ The monitor renders CI and Review concurrently on one shared PR row; see | `GET` | `/api/budget-ignore` | Dashboard auth/session | Budget Ignore Get | `pkg/dashboard/api.go:176` | | `POST` | `/api/budget-ignore` | Owner only | Budget Ignore Set | `pkg/dashboard/api.go:177` | | `GET` | `/api/summaries` | Dashboard auth/session | Summaries | `pkg/dashboard/api.go:189` | -| `GET` | `/api/stage-tracker` | Dashboard auth/session | Stage Tracker: every open issue and pull request of the watched repos for the Hive activity monitor — actionable, held, claimed, in-progress, covered-by-PR, filtered (`needs-*`), draft and exempt-labelled items alike, each with `stage`, `stage_since`, `labels`, `created_at`, `author_kind`, `modifiers`, `claimant: {kind: hive-agent|clanker|person, login, agent, hive, since, source: claim-ledger|claim-comment|assignee|kick-history|author}` naming who holds a claimed / in-progress issue or a PR under review or rework (absent when nobody is named; mirrored onto `linked_prs[]`), (PRs) `sentinel_alert` / `sentinel_findings` / `sentinel_reason` when the sentinel flagged the PR, `decision_needed` on a row parked on a person (085 / 045 / 015, the needs-human pill; mirrored onto the issue's `linked_prs[]` entry): `{question, asked_by, since, blocker, blocker_reason, options: [{action, label, enabled, reason_if_disabled}]}` — the reviewer's own decision question when the verdict record has one, the blocker in plain words, and the applicable actions under the row context menu's action ids (`decide:delegate` first), (PRs) `lineage` on the hive's copy of an adopted PR — `{kind: adopted|superseded|rebased-by-hive, from_number, from_url, from_author, from_author_kind, to_number, to_url, at, reason}`, derived from the stage store's adoption record or the `hive/adopt-` head branch, mirrored onto the issue's `linked_prs[]` entry; absent on every other row — and (issues) `linked_prs`; items with no stage yet report stage `0` "Open"; `needs_human_labels` is the "a person must act" label set behind the monitor's Needs human facet (the same list as `/api/status.labelPresets[needs-human]`); `recently_merged` lists the PRs (`repo`, `number`, `merged_at`) whose `pr_merged` audit entry is under 30 minutes old, so a client diffing two payloads can tell a merge from a close; a PR in a conflict-aware merge train carries `merge_train` `{id, state, front, position, size, attempt, max_attempts, overlap_files, ahead, length, head_number, head_state, head_reason, head_since, eta_s, eta_at, eta_basis, late, stalled, stalled_s}` — `head_state` one of `needs-human` / `ci` / `soaking` / `ready` / `merging` / `fixing` / `unknown` with `head_reason` in plain words; `eta_s` / `eta_at` the estimated wait for this member's own merge attempt (own remaining soak + each PR ahead's remaining soak or one sweep + the next sweep tick; absent while the head waits on a person or CI), `eta_at` anchored to the member's first estimate at its position so a countdown survives polls, `eta_basis` its short reading ("2 ahead · head soaking 12m · next sweep in 40s"), `late` once now has overrun the first estimate twice over, `stalled` / `stalled_s` once the head has sat longer than `governor.merge_train_stall_warn_s` ([#15395](https://github.com/hivecommons/hive/issues/15395)); a PR the queue holds because another open PR declares the same `Fixes #N` carries no `merge_train` and a `merge_gate` of `{state: "duplicate-of:", duplicate_of, duplicate_issue}` plus the `needs-decision` modifier (the queue keeps one PR per issue: green first, then the earlier-opened); a PR GitHub reports conflicting on its own, or one under repair (stage/070, 071, 072, 074, 085, or a red required check), carries no `merge_train` and is not counted in any member's `size` / `length` — a repaired member the view dropped carries `left_train: {why: fixing|needs-author|returned-to-contributor|adopted-by-hive|needs-decision|checks-failing, note}` instead (mirrored onto the issue's `linked_prs[]` entry), and a train left with one member reports no `merge_train` at all; a PR short of the merge queue (below stage/080) the planner ordered rides no train either — it carries `overlap: {behind, with, files, note}` ("overlaps #15637 (sidebar.html, index.html) — will queue behind it") and no `merge_train`, and counts in no member's `size` — the state slugs (`front`, `queued-behind`) are payload values only, the SPA renders ordinal places ("Merge queued · 1st of 2", with the train's tag when more than one train is on the page). Served from a server-side cache rebuilt at most every `dashboard.stage_tracker.cache_ttl_s` (default `governor.eval_interval_s`) from the spoke's existing snapshot — a request never calls GitHub. Carries `generated_at`, `source` (`cache` or `fresh`), `cache_ttl_s`, an `ETag` and `Cache-Control: private, max-age=`; `If-None-Match` yields 304. Each hit is recorded under REST caller `dashboard:stage-tracker` so `/api/gh-rate-limits` shows it charged nothing. | `pkg/dashboard/api.go:190` | +| `GET` | `/api/stage-tracker` | Dashboard auth/session | Stage Tracker: every open issue and pull request of the watched repos for the Hive activity monitor — actionable, held, claimed, in-progress, covered-by-PR, filtered (`needs-*`), draft and exempt-labelled items alike, each with `stage`, `stage_since`, `labels`, `created_at`, `author_kind`, `modifiers`, `claimant: {kind: hive-agent|clanker|person, login, agent, hive, since, source: claim-ledger|claim-comment|assignee|kick-history|author}` naming who holds a claimed / in-progress issue or a PR under review or rework (absent when nobody is named; mirrored onto `linked_prs[]`), (PRs) `sentinel_alert` / `sentinel_findings` / `sentinel_reason` when the sentinel flagged the PR, `decision_needed` on a row parked on a person (085 / 045 / 015, the needs-human pill; mirrored onto the issue's `linked_prs[]` entry): `{question, asked_by, since, blocker, blocker_reason, options: [{action, label, enabled, reason_if_disabled}]}` — the reviewer's own decision question when the verdict record has one, the blocker in plain words, and the applicable actions under the row context menu's action ids (`decide:delegate` first), (PRs) `lineage` on the hive's copy of an adopted PR — `{kind: adopted|superseded|rebased-by-hive, from_number, from_url, from_author, from_author_kind, to_number, to_url, at, reason}`, derived from the stage store's adoption record or the `hive/adopt-` head branch, mirrored onto the issue's `linked_prs[]` entry; absent on every other row — and (issues) `linked_prs`; items with no stage yet report stage `0` "Open"; `needs_human_labels` is the "a person must act" label set behind the monitor's Needs human facet (the same list as `/api/status.labelPresets[needs-human]`); `recently_merged` lists the PRs (`repo`, `number`, `merged_at`) whose `pr_merged` audit entry is under 30 minutes old, so a client diffing two payloads can tell a merge from a close; a PR in a conflict-aware merge train carries `merge_train` `{id, state, front, position, size, attempt, max_attempts, overlap_files, ahead, length, head_number, head_state, head_reason, head_since, eta_s, eta_at, eta_basis, late, stalled, stalled_s}` — `head_state` one of `needs-human` / `ci` / `soaking` / `ready` / `merging` / `fixing` / `unknown` with `head_reason` in plain words; `eta_s` / `eta_at` the estimated wait for this member's own merge attempt (own remaining soak + each PR ahead's remaining soak or one sweep + the next sweep tick; absent while the head waits on a person or CI), `eta_at` anchored to the member's first estimate at its position so a countdown survives polls, `eta_basis` its short reading ("2 ahead · head soaking 12m · next sweep in 40s"), `late` once now has overrun the first estimate twice over, `stalled` / `stalled_s` once the head has sat longer than `governor.merge_train_stall_warn_s` ([#15395](https://github.com/hivecommons/hive/issues/15395)); a PR the queue holds because another open PR declares the same `Fixes #N` carries no `merge_train` and a `merge_gate` of `{state: "duplicate-of:", duplicate_of, duplicate_issue}` plus the `needs-decision` modifier (the queue keeps one PR per issue: green first, then the earlier-opened); a PR GitHub reports conflicting on its own, or one under repair (stage/070, 071, 072, 074, 085, or a red required check), carries no `merge_train` and is not counted in any member's `size` / `length` — a repaired member the view dropped carries `left_train: {why: fixing|needs-author|returned-to-contributor|adopted-by-hive|needs-decision|checks-failing, note}` instead (mirrored onto the issue's `linked_prs[]` entry), and a train left with one member reports no `merge_train` at all; a PR short of the merge queue (below stage/080) the planner ordered rides no train either — it carries `overlap: {behind, with, files, note}` ("overlaps #15637 (sidebar.html, index.html) — will queue behind it") and no `merge_train`, and counts in no member's `size` — the state slugs (`front`, `queued-behind`) are payload values only, the SPA renders ordinal places ("Queued for merge · 1st of 2", with the train's tag when more than one train is on the page). Served from a server-side cache rebuilt at most every `dashboard.stage_tracker.cache_ttl_s` (default `governor.eval_interval_s`) from the spoke's existing snapshot — a request never calls GitHub. Carries `generated_at`, `source` (`cache` or `fresh`), `cache_ttl_s`, an `ETag` and `Cache-Control: private, max-age=`; `If-None-Match` yields 304. Each hit is recorded under REST caller `dashboard:stage-tracker` so `/api/gh-rate-limits` shows it charged nothing. | `pkg/dashboard/api.go:190` | | `GET` | `/api/matrix/lines` | Dashboard auth/session | Matrix Lines (deprecated name, see [Published-checkpoint regions](#published-checkpoint-regions)): serve bounded backlog of pushed lines behind dashboard.matrix with repo allowlist filtering. `max` counts only lines the repo allowlist admits, so a page is never emptied by filtered-out lines. A client paging with `max` should use the last returned line's `seq` as its next `since`, not the top-level `seq`, which is the source's latest sequence number and would skip lines still past the page. `more` is true only while another line the caller may see remains past the page; stop paging when it is false. | `pkg/dashboard/api.go:191` | | `POST` | `/api/prs/{owner}/{repo}/{number}/queue-automerge` | Merger/owner role | Queue PRAuto Merge | `pkg/dashboard/api.go:192` | | `GET` | `/api/inference/models/{backend}` | Dashboard auth/session | Inference Models | `pkg/dashboard/api.go:369` | diff --git a/src/docs/dashboard-copy-inventory.md b/src/docs/dashboard-copy-inventory.md index 66ad8b9ebd..b80df3e804 100644 --- a/src/docs/dashboard-copy-inventory.md +++ b/src/docs/dashboard-copy-inventory.md @@ -102,9 +102,9 @@ old name). | Builder | Reaches | Before | After | Held by | |---|---|---|---|---| -| `STAGE_TRACKER_TRAIN_STATE_WORD` (`tracker-words.js`) | chevron label, gate pill | `front` → *Next to merge*, `queued-behind` → *In merge queue* | both *Merge queued*; the place tells them apart | `TestStageTrackerMergeTrainStateSlugsNeverLeak` | -| `stageTrackerTrainWord` | chevron label | *In merge queue · 2 of 6* / *front* (leaked) | *Merge queued · 1st* / *· 2nd* / *· 3rd* … + *· ~4m* countdown | `TestStageTrackerMergeTrainOrdinalWords` | -| `stageTrackerTrainOrdinalOfN` + `stageTrackerTrainTagSuffix` / `stageTrackerTrainTagTip` | chevron label, gate pill, provisional suffix, chevron hover | *Merge queued · 1st* twice over on a page with two trains (owner: "how are there 2 'merge queued 1st'?") | *Merge queued · 1st of 2*; past one train on the page *· train main.go* (overlap basename, else the head `#N`) ends the word and the hover leads *Train of 2 PRs overlapping main.go; merges after #15567.*; one train → no tag | `TestStageTrackerTrainTagOnTwoTrains` | +| `STAGE_TRACKER_TRAIN_STATE_WORD` (`tracker-words.js`) | chevron label, gate pill | `front` → *Next to merge*, `queued-behind` → *In merge queue* | both *Queued for merge* (was *Merge queued*; one word with 080 and a recorded approval, #16653); the place tells them apart | `TestStageTrackerMergeTrainStateSlugsNeverLeak` | +| `stageTrackerTrainWord` | chevron label | *In merge queue · 2 of 6* / *front* (leaked) | *Queued for merge · 1st* / *· 2nd* / *· 3rd* … + *· ~4m* countdown | `TestStageTrackerMergeTrainOrdinalWords` | +| `stageTrackerTrainOrdinalOfN` + `stageTrackerTrainTagSuffix` / `stageTrackerTrainTagTip` | chevron label, gate pill, provisional suffix, chevron hover | *Merge queued · 1st* twice over on a page with two trains (owner: "how are there 2 'merge queued 1st'?") | *Queued for merge · 1st of 2*; past one train on the page *· train main.go* (overlap basename, else the head `#N`) ends the word and the hover leads *Train of 2 PRs overlapping main.go; merges after #15567.*; one train → no tag | `TestStageTrackerTrainTagOnTwoTrains` | | `stageTrackerUnderRepair` → `stageTrackerAnchor` (Go: `stageTrackerTrainUnderRepair` → `stageTrackerItemColumn`) | chevron column | *Fixing · @hivecommons-hive[bot]* lit in the **Merge queue** column over the caption *fell back to Fixing — … — conflicting* (hive's own #15574: the refused merge's `merge-failed` gate still promoted the column) | the column follows the current state: under repair → CI / Review, whatever the stale gate or planner train says; the caption keeps the history | `TestStageTrackerItemColumnRatchet`, `TestStageTrackerFixingAfterMergeFailedColumn`, `stage_tracker_fixing_column.test.js` | | `stageTrackerLeftTrainNote` + `STAGE_TRACKER_LEFT_TRAIN_NOTE` (Go: `stageTrackerLeftTrainNote`, `left_train`) | row hover | *merge train · 2 PRs · 1st: #15405* over a row whose chevron read *Fixing* (hive's own #15405, a maintainer requested changes) | the fixing row rides no train (no header, no ordinal, no rail); its hover ends *Merge train: left the merge train while being fixed; rejoins when green*; a train of one is no train | `TestStageTrackerTrainTagOnTwoTrains`, `TestStageTrackerMergeTrainUnderRepairLeaves` | | `stageTrackerOrdinal` | chevron, hover, popover | — | `1st 2nd 3rd 4th … 11th 12th 13th 21st 22nd 23rd` | same | diff --git a/src/docs/dashboard-sections/activity-monitor.md b/src/docs/dashboard-sections/activity-monitor.md index e183c196de..20eac1e16e 100644 --- a/src/docs/dashboard-sections/activity-monitor.md +++ b/src/docs/dashboard-sections/activity-monitor.md @@ -260,7 +260,7 @@ nested PR spacing. An unrelated row or child ends the rail rather than acquiring misleading membership. A missing, closed or stale front is never synthesized as a verified owner; recorded/unverified metadata remains explicit. -When several approved PRs to the same base touch the same files, the automerge lanes merge them one at a time ([#15117](https://github.com/hivecommons/hive/issues/15117)). The tracker renders every train contiguously, in merge order, with a thin left rail linking the rows and a header chip `🚆 merge train · 4 PRs · 1st: #15074` — the glyph is an inline-SVG railcar (14px, currentColor, hover *Merge queue*), the same icon the **Merge queue** column header and its chevrons wear; overlapping files are listed beside it. Pill wording per state is the PR's place in the queue (the owner's words — `front` and `queued-behind` appear nowhere a person reads): the head reads "Merge queued · 1st of 4 · ~13m" (its own soak left plus the next pass); the others "Merge queued · 2nd of 4 · ~4m", "Merge queued · 3rd of 4", … (`1st 2nd 3rd 4th … 11th 12th 13th 21st`, always with the queue length, countdown to its turn); when the page draws more than one train each queue word ends with its train's tag — "Merge queued · 1st of 2 · train main.go" (the first overlapping file's basename, else the head `#N`) — and the hover leads *Train of 2 PRs overlapping main.go; merges after #15567.*, so two "1st"s on one page tell apart (one train → no tag); the header and every member row of a train share one rail accent (`.ham-train-k0…k3`, cycling in page order); once the front merged and the hive is rebasing a conflicting sibling, "Rebasing · attempt 1/2"; when the loop guard (`auto_merge.merge_train.max_rebase_attempts`) is spent, "Needs human decision · rebase failed twice" at stage/085 with the decision option "Rebase, then merge as maintainer". +When several approved PRs to the same base touch the same files, the automerge lanes merge them one at a time ([#15117](https://github.com/hivecommons/hive/issues/15117)). The tracker renders every train contiguously, in merge order, with a thin left rail linking the rows and a header chip `🚆 merge train · 4 PRs · 1st: #15074` — the glyph is an inline-SVG railcar (14px, currentColor, hover *Merge queue*), the same icon the **Merge queue** column header and its chevrons wear; overlapping files are listed beside it. Pill wording per state is the PR's place in the queue (the owner's words — `front` and `queued-behind` appear nowhere a person reads): the head reads "Queued for merge · 1st of 4 · ~13m" (its own soak left plus the next pass); the others "Queued for merge · 2nd of 4 · ~4m", "Queued for merge · 3rd of 4", … (`1st 2nd 3rd 4th … 11th 12th 13th 21st`, always with the queue length, countdown to its turn); when the page draws more than one train each queue word ends with its train's tag — "Queued for merge · 1st of 2 · train main.go" (the first overlapping file's basename, else the head `#N`) — and the hover leads *Train of 2 PRs overlapping main.go; merges after #15567.*, so two "1st"s on one page tell apart (one train → no tag); the header and every member row of a train share one rail accent (`.ham-train-k0…k3`, cycling in page order); once the front merged and the hive is rebasing a conflicting sibling, "Rebasing · attempt 1/2"; when the loop guard (`auto_merge.merge_train.max_rebase_attempts`) is spent, "Needs human decision · rebase failed twice" at stage/085 with the decision option "Rebase, then merge as maintainer". The tooltip lists the PRs ahead and the overlapping files. Waiting siblings are never red, never `needs human`; a `needs-rebase` label on one is reported under `stale_labels`, the train repairs it. Each item carries `merge_gate.state` (`queued-behind` / `rebasing` / `rebase-exhausted` / `front`, with an honest `reason` such as `behind #15074 in merge train (3rd of 4, overlapping files: stage_tracker.go, index.html)`) and `merge_train{id, state, front, position, size, attempt, max_attempts, overlap_files, ahead, members}`; the id is `#` and `members` is the whole roster in merge order. @@ -272,7 +272,7 @@ The tooltip lists the PRs ahead and the overlapping files. Waiting siblings are **The train starts at 080.** The merge train is a merge-queue concept: only PRs at 080 and beyond — green, approved, soaking or merging — ride one, and the header counts only them. A PR the planner has ordered while it is still at CI / Review (050 / 060) rides no train (`stageTrackerBelowMergeQueue`): hive's own page once led `merge train · 2 PRs · 1st: #15637 — overlapping: sidebar.html, index.html` over #15637 and #15633 while both chevrons read *CI / Review*. Such a row carries `overlap: {behind, with, files, note}` instead of `merge_train` — no rail, no ordinal, no header — and shows one muted badge **overlaps #15637** whose hover is the note, *Not in the merge queue yet: overlaps #15637 (sidebar.html, index.html) — will queue behind it* (the planner's own front reads *overlaps #15633 (…) — merges ahead of it once both are ready*). The members that do ride close ranks around it, and a train left with one 080 member is no train. -**Queue position, countdown, stall** ([#15395](https://github.com/hivecommons/hive/issues/15395)). The queued chip is its place in the queue and nothing else — **Merge queued · 2nd of 6 · ~4m** — so it reads the same whether or not a merge sweep is evaluating it: the sweep is the spinning ⬡ glyph and a *Checking now…* line in the hover, never a change of words (one label per chevron), and no state slug (`queued-behind`, `front`) ever reaches the page. The hover is the place sentence — *2nd of 6 in the merge queue · behind #15253 (soaking, 12m left) · ETA ~25m (2 ahead · head soaking 12m · next pass in 40s). Hive merges one at a time, in order.*; the head's reads *1st of 6 in the merge queue · merges next · ETA ~13m.* — or, when the head is on a person or on CI, the blocker instead of a clock: *… behind #15253 (waiting for a maintainer (untrusted author)) · no estimate until #15253 moves.* Every train state — the 1st included — lights the **Merge queue** column, whatever numeric stage the lane holds the head at (the train's facts are mirrored onto a head still at 050/060; hive's own #15400 once lit CI / Review beside its 2nd-place sibling) — a head under repair is no member (below) and lights CI / Review. The server adds to each member's `merge_train`: `length`, `head_number`, `head_state` (`needs-human` / `ci` / `soaking` / `ready` / `merging` / `fixing` / `unknown`), `head_reason` (plain words), `head_since`, `eta_s`, `eta_at`, `eta_basis`, `late`, `stalled`, `stalled_s`. +**Queue position, countdown, stall** ([#15395](https://github.com/hivecommons/hive/issues/15395)). The queued chip is its place in the queue and nothing else — **Queued for merge · 2nd of 6 · ~4m** — so it reads the same whether or not a merge sweep is evaluating it: the sweep is the spinning ⬡ glyph and a *Checking now…* line in the hover, never a change of words (one label per chevron), and no state slug (`queued-behind`, `front`) ever reaches the page. The hover is the place sentence — *2nd of 6 in the merge queue · behind #15253 (soaking, 12m left) · ETA ~25m (2 ahead · head soaking 12m · next pass in 40s). Hive merges one at a time, in order.*; the head's reads *1st of 6 in the merge queue · merges next · ETA ~13m.* — or, when the head is on a person or on CI, the blocker instead of a clock: *… behind #15253 (waiting for a maintainer (untrusted author)) · no estimate until #15253 moves.* Every train state — the 1st included — lights the **Merge queue** column, whatever numeric stage the lane holds the head at (the train's facts are mirrored onto a head still at 050/060; hive's own #15400 once lit CI / Review beside its 2nd-place sibling) — a head under repair is no member (below) and lights CI / Review. The server adds to each member's `merge_train`: `length`, `head_number`, `head_state` (`needs-human` / `ci` / `soaking` / `ready` / `merging` / `fixing` / `unknown`), `head_reason` (plain words), `head_since`, `eta_s`, `eta_at`, `eta_basis`, `late`, `stalled`, `stalled_s`. **One PR per issue** ([#15395](https://github.com/hivecommons/hive/issues/15395)). Two open PRs declaring the same `Fixes #N` never both ride the queue (hive's own #15402 and #15407, both for #15396, once sat side by side as "waiting its turn"). Before the trains are grouped the sweep keeps one PR per closing issue — a green head (not conflicting, not blocked on a red required check) beats a red one; among equals the earlier-opened wins — and holds the other out of every train with the stage reason `merge-train:duplicate-of#:/0:0/0:`. The held row's gate reads `duplicate-of:` (`merge_gate.duplicate_of`, `merge_gate.duplicate_issue`), its chip **Duplicate of #15402 · needs a pick** with no clock, it carries no `merge_train`, and it wears `needs-decision` so both PRs sit under their issue with the hold visible. *Let hive decide* on either row takes the existing supersede path (rule `one-pr-per-issue`): on the held PR it closes it as superseded by the kept one with a credit comment, through the same write gate as every delegate close; on the kept PR it releases it and names the duplicate the queue holds (or, if the kept PR has since gone red, only recommends the fix — the queue re-picks on its next pass, so an earlier red PR yields to a later green one). @@ -329,7 +329,7 @@ An adopted pull request names the hive's superseding copy in its detour word (`a If two copies are closed within an hour the hive stops (`adopted_by_state: "closed-twice"`, park reason `adoption-child-closed-twice`): the row reads "Adopted → #N (closed twice) · needs a person" and the popover question asks you to reopen the last copy, give direction, or close the PR. With close-first supersession (the default, hivecommons/hive#15135) the original is closed in the adopting pass and has **no row** while its copy is open — the copy is the one active PR for the issue, and the original's record is superseded (no chevron, no *Needs human decision*). -A superseded original keeps a muted, chevron-less sub-row under the issue while its superseder is open and listed (hivecommons/hive#15511 showed hive's #15574 *Merge queued* and, beneath it, the still-open #15526 as a greyed line whose note "· Adopted → #15574 · superseded (hive re-authored with sign-off)" wrapped to two lines). The note now reads **"superseded · hive adopted → #M"**, or **"superseded · closed · hive adopted → #M"** once the original is closed, and never wraps — the PR title ellipsizes first; the hover carries the long form ("Hive re-authored this PR as #M with the same commits and sign-off. This PR closes as superseded when #M merges." / "…This PR is closed as superseded."). The tracker sets `superseded_by: M` on the original (omitted for an in-place adoption, cleared when the copy is closed / closed-twice / copy-failed so the original counts again) and `adopted_from.state` / `lineage.from_state` on the copy (`"open"` or `"closed"`). A closed original is listed in this muted form only while #M is open and listed; it leaves the tracker once #M merges or closes. Agent-authored originals close in the adopting pass by policy (`governor.labels.stage.adoption.close_superseded`, default `on_adopt`); a person's PR closes then only with the write-back opt-in label, else when the copy merges — see [hive-merge.md](../hive-merge.md). +A superseded original keeps a muted, chevron-less sub-row under the issue while its superseder is open and listed (hivecommons/hive#15511 showed hive's #15574 *Queued for merge* and, beneath it, the still-open #15526 as a greyed line whose note "· Adopted → #15574 · superseded (hive re-authored with sign-off)" wrapped to two lines). The note now reads **"superseded · hive adopted → #M"**, or **"superseded · closed · hive adopted → #M"** once the original is closed, and never wraps — the PR title ellipsizes first; the hover carries the long form ("Hive re-authored this PR as #M with the same commits and sign-off. This PR closes as superseded when #M merges." / "…This PR is closed as superseded."). The tracker sets `superseded_by: M` on the original (omitted for an in-place adoption, cleared when the copy is closed / closed-twice / copy-failed so the original counts again) and `adopted_from.state` / `lineage.from_state` on the copy (`"open"` or `"closed"`). A closed original is listed in this muted form only while #M is open and listed; it leaves the tracker once #M merges or closes. Agent-authored originals close in the adopting pass by policy (`governor.labels.stage.adoption.close_superseded`, default `on_adopt`); a person's PR closes then only with the write-back opt-in label, else when the copy merges — see [hive-merge.md](../hive-merge.md). A copy that then fails (closed unmerged, or red at two heads) reopens the original: `adopted_by_state: "copy-failed"` renders "Adopted → #N (copy failed) · reopened, needs a person" at 085 with the caption "The hive's copy #N failed; this PR was reopened and needs a person". @@ -568,18 +568,20 @@ Stages 080, 095 and 100 share the **Merge queue** column (the column was *Merge Every PR at the gate now carries `merge_gate: {state, reason, sweep_running, last_sweep_at, next_sweep_at, soak_until, soak_remaining_seconds}` in the payload (mirrored on the issue's nested `linked_prs`), and the lit chevron reads one word per state, in pipeline order, with the live detail after a `·`: +Every state whose only remaining step is the merge itself reads the one word **Queued for merge** ([#16653](https://github.com/hivecommons/hive/issues/16653): three adjacent approved rows read *Ready for auto merge …*, *Approved · hive will…* and *Approved · merge queu…*). What tells them apart is the short, actionable qualifier after the dot — *· next pass in 42s*, *· checking now*, *· soak 12m left*, *· 2nd of 6*, *· after CI*, *· needs rebase*, *· branch protection pending* — and nothing else comes before the dot. The tooltip keeps the full explanation: who approved, when, which mechanism merges it, the ETA when known. A recorded approval ([#15126](https://github.com/hivecommons/hive/issues/15126)) reads **Queued for merge · next pass** (Approve / Let hive decide) or **Queued for merge · after CI** (Approve and let hive merge while checks still run). *Soaking*, *Merging*, *Rebasing*, *Needs human decision* and a *Merge failed* a person must fix stay their own words — they are not "waiting for the merge". + | stage | pill word | detail after `·` | glyph before the word (tooltip + `aria-label`) | | --- | --- | --- | --- | | 060 reviewed — drawn in the **CI / Review** column, not the merge gate | **Review passed** | the lane's own recorded reason, in the operator's words — *CI in progress* (`N check(s) still running`, `check-pending`), *checks unreadable* (`checks could not be read`), *soak 30m remaining* (pre-admission soak); *waiting for merge admission* when the payload carries no reason | 🕓 clock — *Review passed, not yet admitted to auto merge — CI still running (build-and-test). hive re-checks the gate on its next pass in 3m. A GitHub event on the PR (check run, review, push) triggers a pass sooner. Last checked 2m ago.* | -| 080 awaiting merge admission | **Ready for auto merge** | *next pass in 42s* (counts down in place; *pass due now* once past) | 🕓 clock — *Approved and green; waiting for hive's next merge pass — next pass in 42s. …* | +| 080 awaiting merge admission | **Queued for merge** | *next pass in 42s* (counts down in place; *pass due now* once past) | 🕓 clock — *Approved and green; waiting for hive's next merge pass — next pass in 42s. …* | | 095 pre-merge soak | **Soaking** | *7m left* (counts down in place; *complete* once past — the row never says "0s left") | 🕓 clock — *Head abc1234 must sit 30 minutes without new commits before the hive merges it · 7m 10s left · soak ends 8:42 PM*; past the window *… soaked since 8:42 PM. Soak complete — merges on the next pass (next pass in 3m).* Caption *Admitted by the automerge lane; soaking — 7m left* / *… soak complete — merges on the next pass* ([#15575](https://github.com/hivecommons/hive/issues/15575)) | | 095 soaked and the lane's pass is on it | **Mergeable** | *merging now* | ⟳ spinning — *… Mergeable — merging now.* | | 060/080 while a pass is evaluating this PR | the stage's word | *checking now* | ⟳ (static) — *hive is checking this PR now.* Never the word *sweep* — the lane's internal name, not a state ([#15575](https://github.com/hivecommons/hive/issues/15575)) | -| 080 in a merge train (`merge_gate.state: queued-behind` / `front`) | **Merge queued · 2nd of 6 · ~4m** / **Merge queued · 1st of 6** (ordinal place of the queue length and countdown; **· train main.go** appended when more than one train is on the page; **Merge queue · stalled — waiting on #15253 (waiting for CI) · 3h** once stalled) | *~4m* (counts down to its estimated turn from `merge_train.eta_at`; *any moment now* once past; *running late* past twice the first estimate; nothing while the head is on a person or CI) — the words never change with the sweep | 🕓 clock, or ⟳ spinning while a sweep evaluates it — *Behind #15253 (soaking, 12m left) and 1 more. Hive merges one at a time, in order. Estimated turn: ~25m (2 ahead · head soaking 12m · next pass in 40s). Checking now… Last checked 12s ago.* | +| 080 in a merge train (`merge_gate.state: queued-behind` / `front`) | **Queued for merge · 2nd of 6 · ~4m** / **Queued for merge · 1st of 6** (ordinal place of the queue length and countdown; **· train main.go** appended when more than one train is on the page; **Merge queue · stalled — waiting on #15253 (waiting for CI) · 3h** once stalled) | *~4m* (counts down to its estimated turn from `merge_train.eta_at`; *any moment now* once past; *running late* past twice the first estimate; nothing while the head is on a person or CI) — the words never change with the sweep | 🕓 clock, or ⟳ spinning while a sweep evaluates it — *Behind #15253 (soaking, 12m left) and 1 more. Hive merges one at a time, in order. Estimated turn: ~25m (2 ahead · head soaking 12m · next pass in 40s). Checking now… Last checked 12s ago.* | | 100 merge queue | **Merging** | — | ⟳ (static) — *Admitted and soaked; hive is merging it now (GitHub merge queue / merge window).* | | any stage while hive's merge call is in flight (`merge_gate.merging_since`, `merge_path`) | **Merging** | *merge call in flight*, then *merge landed* while the SPA holds the row | ⟳ (static) — *hive is merging it now (automerge sweep) — the merge call has been in flight since 3s ago.* | -| any stage after GitHub refused hive's merge call (`merge_gate.state: merge-failed`, `merge_failed`, `merge_failed_kind`, `merge_failed_text`, `merge_failed_at`) | **Merge failed** | the refusal translated to a short phrase — *branch protection*, *needs rebase*, *not allowed*, *review required*, or *retrying* while the sweep is on it; never GitHub's raw text | 🕓 clock — *hive tried to merge this (maintainer merge from the dashboard) 9s ago and GitHub refused — branch protection blocks it. The lane re-evaluates it on its next pass. Details: 405 Pull Request is not mergeable* | -| a queue/gate stage after the merge call drew *N of M required status checks are expected* (`merge_failed_kind: checks-pending`, `merge_failed_checks`) | **Waiting for CI** | *4 checks* | ⟳ while the sweep is on it, else 🕓 — *hive tried to merge this (automerge sweep) 1m ago before its required checks had reported — 4 required checks haven't finished. It merges once they pass.* | +| any stage after GitHub refused hive's merge call (`merge_gate.state: merge-failed`, `merge_failed`, `merge_failed_kind`, `merge_failed_text`, `merge_failed_at`) | **Merge failed** — or **Queued for merge** when the lane clears it on its own next pass (*· needs rebase* after the head moved, *· branch protection pending*) | the refusal translated to a short phrase — *not allowed*, *review required*, *merge method off*, or *retrying* while the sweep is on it; never GitHub's raw text | 🕓 clock — *hive tried to merge this (maintainer merge from the dashboard) 9s ago and GitHub refused — branch protection blocks it. The lane re-evaluates it on its next pass. Details: 405 Pull Request is not mergeable* | +| a queue/gate stage after the merge call drew *N of M required status checks are expected* (`merge_failed_kind: checks-pending`, `merge_failed_checks`) | **Queued for merge** | *after CI* (the check count rides the hover) | ⟳ while the sweep is on it, else 🕓 — *hive tried to merge this (automerge sweep) 1m ago before its required checks had reported — 4 required checks haven't finished. It merges once they pass.* | A live merge call or actual queue-stage refusal lights the **Merge queue** column. A premature merge call refused for pending PR-head checks does **not** admit a PR still at 050/060: it remains **CI / Review**, and the earlier refusal is retained as history rather than current CI proof. A preparation ticket does not change that placement; forge-owned queue entries and synthetic candidate validation remain separate observations. The chevron column follows the **current** state, never the highest stage the row once reached: a PR at 070 fixing, 071 needs-author, 072 returned-to-contributor, 074 adopted-by-hive or with a red required check lights **CI / Review** even while a stale `merge_gate` (`merge-failed` from the attempt that found the conflict) or a planner-ordered `merge_train` still rides on the record (hive's own #15574 read *Fixing · conflicting* under Merge queue with the caption *fell back to Fixing — … — conflicting*; the maintainer: "why is this in merge queue if it is being fixed?"). The "fell back to …" caption keeps the history; the column follows the fallback. Go's `stageTrackerItemColumn` and the SPA's `stageTrackerAnchor` apply the same precedence; the 085 decision park is the exception that rides no train yet stays at the gate, where the person decides. @@ -627,7 +629,7 @@ These are different operations, not interchangeable approvals: | Action | Effect and result | | --- | --- | -| **Approve and let hive merge** (lead) | The default way a maintainer exercises their last word on an untrusted-author PR. Records your owner decision as an APPROVE review, admits the head (`admitted_by: operator-approval:`) and adds the automerge label; the hive's auto-merge sweep merges it through its own App on the next tick once CI is green — soak and the self-merge ban still apply, and the merge comment names you. Inline lead button: *Let hive merge*. Toast: *approved — hive will merge on the next tick once CI is green*; badge: `queue-merge`. | +| **Approve and let hive merge** (lead) | The default way a maintainer exercises their last word on an untrusted-author PR. Records your owner decision as an APPROVE review, admits the head (`admitted_by: operator-approval:`) and adds the automerge label; the hive's auto-merge sweep merges it through its own App on the next tick once CI is green — soak and the self-merge ban still apply, and the merge comment names you. Inline lead button: *Let hive merge*. Toast: *queued for merge — hive merges it on its next pass once CI is green*; badge: `queue-merge`. | | **Merge now as maintainer** (secondary) | Merges #N into its base now through Hive's identity, attributed to you in a PR comment. On a row that needs a rebase it reads *Rebase, then merge as maintainer*. Leads only when queueing is greyed (a breaking change hive never merges, or a head somebody already admitted). Audit: `repo_item_decision_merge`, `source: dashboard`. Toast: *merged*; badge: `merge-now`. | | **Let hive decide** | At 090, does **not** run the delegation policy. It returns a no-effect explanation, such as *I can't merge this: author @Karibhou is untrusted on hotshot — …*, with the two approval actions and the 👥 Contributors remedy. | | **Re-author as hive PR** | A separate, explicit choice when the commit check finds missing `Signed-off-by`: re-home commits on a signed-off Hive branch and open a superseding PR, not merge the original as-is. Disabled with a reason on a person's PR. | diff --git a/src/docs/dashboard.md b/src/docs/dashboard.md index 489912447c..184ac1ed28 100644 --- a/src/docs/dashboard.md +++ b/src/docs/dashboard.md @@ -598,7 +598,7 @@ The **Review** section opens with a separately collapsible **Pipeline** tile tha ## Hive activity monitor -The **Hive activity monitor** section (sidebar, Dashboard group; expanded by default) is the "where is my pizza" view of the hive: one entry per open issue and PR from `GET /api/stage-tracker`, each a title line over a thin tracker strip. Issues and PRs share one set of columns — `Open → Actionable → Claimed → PR in progress → CI / Review → Merge gate → ✓` — with the step names printed once in a column header. Covering PRs nest under their issue: an issue with no PR yet draws the whole strip like any other row (its lit step is Open/Actionable/Claimed with the steps ahead faint); once exactly one PR covers it the issue and PR collapse into a single entry: the issue's `#N title` on the left, `[author icon] #PR title` in the *PR in progress* column of the same title line, and one continuous strip beneath — Open/Actionable/Claimed passed, then the PR's stage drives the lit chevron through `CI / Review → Merge gate → ✓` (chips, tooltip and `since` come from the PR). With two or more covering PRs the issue's own strip stops at Claimed — all passed, nothing lit — and directly beneath, one indented sub-row per open covering PR (furthest along first) carries `[author icon] #N title` at the *PR in progress* column and that PR's own strip from there on with its own lit chevron, modifier chip, tooltip and `since`. A PR linked to an open issue in the list has no top-level row of its own (`nested_under`); PRs with no linked issue keep a full-width row. The *Pull requests* filter flattens the list (every PR a top-level row); *Issues* and *All* show the nested view. Only the current step is coloured (amber, named in words; the ✓ chevron turns green once merged). Whether it moves depends on its *motion bucket* (`stageTrackerMotion()` in `index.html`): **static** — a steady fill — for Open, Open · on hold (any hold label, whatever else is on the item), Actionable (010), Claimed (020), a PR in progress / Covered by PR (030/040) by a human author, Merged, and any stage the dashboard does not recognise; **active** — a gentle pulse — when the hive is acting (030/040 with a hive or clanker author, 050 review pending, 060 reviewed, 070 fixing, 074 adopted by hive, 080 merge gate, 095 pre-merge soak, 100 merge queue); **needs-human** — a slower amber→red breathe — when a person must move (015 triage needed, 045/085 needs decision, 071 needs author, 072 returned to contributor, 090 ready for a human merge, or any `stalled` / `blocked` / `needs-human` / `needs-decision` / `needs-triage` modifier). Under `prefers-reduced-motion` nothing animates and a needs-human step keeps a steady red tint instead; passed and upcoming steps are low-contrast shapes with a small grey glyph each. Side stages ride the step they branch from — 070/071/072/074 light *CI / Review* as "Fixing" / "Needs author" / "Returned to contributor" / "Adopted by hive", 085/090 light *Merge gate* as "Needs human decision" / "Ready for human merge". The lit chevron ends with a small icon of whose move it is, in the chevron's ink (person = human, robot = clanker, hexagon = hive): the claimant on *Claimed*, the PR author on *PR in progress* and *Returned to contributor*, hive on *CI / Review* / *Adopted by hive* / *Ready for auto merge*, a human on *Triage needed* / *Needs human decision* / *Ready for human merge*; *Open* and *Actionable* carry none; 015 (an actionable issue no maintainer has triaged yet) and 045 light *Actionable* as "Triage needed" / "Needs human decision"; 040 shares *PR in progress* with 030, 060/080/100 light *Merge gate* as "Ready for auto merge" (the chevron tooltip distinguishes "not yet admitted — reason" from "admitted, merging") (the chevron tooltip names the exact stage). Every PR stage has a word: 050/060 "CI / Review", 070 "Fixing" (the author's move — a `needs-rebase` chip beside it says *what* is being fixed; the stage labeller always puts a needs-rebase PR at 070/071/072, never 050/060), 071 "Needs author" (a human-authored PR the author must act on), 072 "Returned to contributor" (a clanker PR handed back to its hive), 074 "Adopted by hive", 080/100 "Ready for auto merge", 085 "Needs human decision", 090 "Ready for human merge". A PR with no linked issue is named exactly once: its title line reads `[kind icon] [author icon] #N title` on the left (no entry in the *PR in progress* column) over one continuous strip with Open/Actionable/Claimed passed and its own stage lit; the `[author icon] #N title` entry under the *PR in progress* header appears only for covering PRs (single-PR entries and nested sub-rows). The author icon is coloured by `author/*` kind (hive blue, clanker purple, human teal). A PR is never an issue in this list: when the same number arrives through both the issues feed and the pulls feed, the PR record wins and the issue-feed copy is dropped server-side (pairing is keyed by repo, kind and number, so a PR can never be its own parent), and the *Issues* filter never shows one. A `since` column on the title line gives time on the current step (red when stalled), with at most one muted health-modifier chip to its left; the reason sentence, actor, nudges, flags and the last stage hops live in the hover tooltip. Titles never wrap: an issue title is cut with an ellipsis before it would reach the *PR in progress* column (leaving a clear gap, so the PR entry always starts at the column's left edge) and a PR title before the chips and `since`; the full title is on the title element's own hover tooltip, separate from the strip's reason tooltip. Rows are sorted furthest-along first by default (a covered issue ranks by its furthest-along PR, not its own 040), then longest-waiting first; the *Sort* select also offers longest waiting, newest and number, with an arrow button that reverses the direction. The list is complete: every open issue and PR of the watched repos is an entry — including claimed, in-progress, needs-human / needs-decision / needs-triage-filtered and reporter-held issues, draft PRs and PRs carrying an exempt label — and an item with no stage yet sits at *Open*. The toolbar filters the cached payload in the browser: *All / Pull requests / Issues*, *Repo*, a search box (`#number`, number or title substring, also matching a covering PR), *Since* (any / over 1 hour / over 1 day / over 1 week on the current step, or *past the stage dwell* = stalled or longer than the step's configured dwell), *Author* (human / clanker / hive) and a *Needs attention* toggle; a row of label chips built from the labels present (`stage/*`, `needs-*`, `author/*`, `role/*`, then any other label shared by two or more items) narrows further — chips of one family OR together, families AND together. *Clear filters* appears whenever something is narrowed. Filter, sort and page size persist in the browser (`localStorage`); the page does not. Pages hold 25 / 50 / 100 rows (default 50) with Prev / Next above and below the list and a "showing X–Y of N (M filtered out)" line; the section header reads "N items (I issues / P PRs) · M need attention" for the whole list (N, I, P come from `open_issues` / `open_prs` in the payload — the same `openItems` set behind the Overview tile, so N equals the tile's total open issues + PRs — with "· X match filters" appended while a filter is on) while the sidebar badge shows the same N (total open items, same render pass — never a separately computed number) with the needs-attention count (modifiers present, or on 071/072/085/090, counted over every item) in its hover tooltip and as the warn-coloured header suffix. The meta line also says "updated Ns ago · cache|fresh": the payload is built server-side at most once per `dashboard.stage_tracker.cache_ttl_s` (default = `governor.eval_interval_s`) from the spoke's existing GitHub snapshot and served with an `ETag`, so the 30-second poll costs a 304 and never a GitHub call (it turns amber once the payload is older than two TTLs). A GitHub webhook naming a listed PR or issue re-reads just that item (one `GET`, debounced by `dashboard.stage_tracker.webhook_refresh_debounce_ms`, default `2000`; off with `dashboard.stage_tracker.webhook_refresh: false`) and patches its row within seconds, ahead of the next eval cycle; see [Webhook-driven PR cache invalidation](operator-reference.md#webhook-driven-pr-cache-invalidation) and, for how that patch relates to the cadence tick and the reconcile that overwrites it (and what `/api/status.webhooks.mode` means when it reads `polling`), [webhooks.md](webhooks.md). Section details: [dashboard-sections.md](dashboard-sections.md#hive-activity-monitor); stage semantics: [labels-and-control-signals.md](labels-and-control-signals/stage-labels.md#stage-labels-stagennn--the-pipeline-state-machine). +The **Hive activity monitor** section (sidebar, Dashboard group; expanded by default) is the "where is my pizza" view of the hive: one entry per open issue and PR from `GET /api/stage-tracker`, each a title line over a thin tracker strip. Issues and PRs share one set of columns — `Open → Actionable → Claimed → PR in progress → CI / Review → Merge gate → ✓` — with the step names printed once in a column header. Covering PRs nest under their issue: an issue with no PR yet draws the whole strip like any other row (its lit step is Open/Actionable/Claimed with the steps ahead faint); once exactly one PR covers it the issue and PR collapse into a single entry: the issue's `#N title` on the left, `[author icon] #PR title` in the *PR in progress* column of the same title line, and one continuous strip beneath — Open/Actionable/Claimed passed, then the PR's stage drives the lit chevron through `CI / Review → Merge gate → ✓` (chips, tooltip and `since` come from the PR). With two or more covering PRs the issue's own strip stops at Claimed — all passed, nothing lit — and directly beneath, one indented sub-row per open covering PR (furthest along first) carries `[author icon] #N title` at the *PR in progress* column and that PR's own strip from there on with its own lit chevron, modifier chip, tooltip and `since`. A PR linked to an open issue in the list has no top-level row of its own (`nested_under`); PRs with no linked issue keep a full-width row. The *Pull requests* filter flattens the list (every PR a top-level row); *Issues* and *All* show the nested view. Only the current step is coloured (amber, named in words; the ✓ chevron turns green once merged). Whether it moves depends on its *motion bucket* (`stageTrackerMotion()` in `index.html`): **static** — a steady fill — for Open, Open · on hold (any hold label, whatever else is on the item), Actionable (010), Claimed (020), a PR in progress / Covered by PR (030/040) by a human author, Merged, and any stage the dashboard does not recognise; **active** — a gentle pulse — when the hive is acting (030/040 with a hive or clanker author, 050 review pending, 060 reviewed, 070 fixing, 074 adopted by hive, 080 merge gate, 095 pre-merge soak, 100 merge queue); **needs-human** — a slower amber→red breathe — when a person must move (015 triage needed, 045/085 needs decision, 071 needs author, 072 returned to contributor, 090 ready for a human merge, or any `stalled` / `blocked` / `needs-human` / `needs-decision` / `needs-triage` modifier). Under `prefers-reduced-motion` nothing animates and a needs-human step keeps a steady red tint instead; passed and upcoming steps are low-contrast shapes with a small grey glyph each. Side stages ride the step they branch from — 070/071/072/074 light *CI / Review* as "Fixing" / "Needs author" / "Returned to contributor" / "Adopted by hive", 085/090 light *Merge gate* as "Needs human decision" / "Ready for human merge". The lit chevron ends with a small icon of whose move it is, in the chevron's ink (person = human, robot = clanker, hexagon = hive): the claimant on *Claimed*, the PR author on *PR in progress* and *Returned to contributor*, hive on *CI / Review* / *Adopted by hive* / *Queued for merge*, a human on *Triage needed* / *Needs human decision* / *Ready for human merge*; *Open* and *Actionable* carry none; 015 (an actionable issue no maintainer has triaged yet) and 045 light *Actionable* as "Triage needed" / "Needs human decision"; 040 shares *PR in progress* with 030, 060/080/100 light *Merge gate* as "Queued for merge" (the chevron tooltip distinguishes "not yet admitted — reason" from "admitted, merging") (the chevron tooltip names the exact stage). Every PR stage has a word: 050/060 "CI / Review", 070 "Fixing" (the author's move — a `needs-rebase` chip beside it says *what* is being fixed; the stage labeller always puts a needs-rebase PR at 070/071/072, never 050/060), 071 "Needs author" (a human-authored PR the author must act on), 072 "Returned to contributor" (a clanker PR handed back to its hive), 074 "Adopted by hive", 080/100 "Queued for merge", 085 "Needs human decision", 090 "Ready for human merge". A PR with no linked issue is named exactly once: its title line reads `[kind icon] [author icon] #N title` on the left (no entry in the *PR in progress* column) over one continuous strip with Open/Actionable/Claimed passed and its own stage lit; the `[author icon] #N title` entry under the *PR in progress* header appears only for covering PRs (single-PR entries and nested sub-rows). The author icon is coloured by `author/*` kind (hive blue, clanker purple, human teal). A PR is never an issue in this list: when the same number arrives through both the issues feed and the pulls feed, the PR record wins and the issue-feed copy is dropped server-side (pairing is keyed by repo, kind and number, so a PR can never be its own parent), and the *Issues* filter never shows one. A `since` column on the title line gives time on the current step (red when stalled), with at most one muted health-modifier chip to its left; the reason sentence, actor, nudges, flags and the last stage hops live in the hover tooltip. Titles never wrap: an issue title is cut with an ellipsis before it would reach the *PR in progress* column (leaving a clear gap, so the PR entry always starts at the column's left edge) and a PR title before the chips and `since`; the full title is on the title element's own hover tooltip, separate from the strip's reason tooltip. Rows are sorted furthest-along first by default (a covered issue ranks by its furthest-along PR, not its own 040), then longest-waiting first; the *Sort* select also offers longest waiting, newest and number, with an arrow button that reverses the direction. The list is complete: every open issue and PR of the watched repos is an entry — including claimed, in-progress, needs-human / needs-decision / needs-triage-filtered and reporter-held issues, draft PRs and PRs carrying an exempt label — and an item with no stage yet sits at *Open*. The toolbar filters the cached payload in the browser: *All / Pull requests / Issues*, *Repo*, a search box (`#number`, number or title substring, also matching a covering PR), *Since* (any / over 1 hour / over 1 day / over 1 week on the current step, or *past the stage dwell* = stalled or longer than the step's configured dwell), *Author* (human / clanker / hive) and a *Needs attention* toggle; a row of label chips built from the labels present (`stage/*`, `needs-*`, `author/*`, `role/*`, then any other label shared by two or more items) narrows further — chips of one family OR together, families AND together. *Clear filters* appears whenever something is narrowed. Filter, sort and page size persist in the browser (`localStorage`); the page does not. Pages hold 25 / 50 / 100 rows (default 50) with Prev / Next above and below the list and a "showing X–Y of N (M filtered out)" line; the section header reads "N items (I issues / P PRs) · M need attention" for the whole list (N, I, P come from `open_issues` / `open_prs` in the payload — the same `openItems` set behind the Overview tile, so N equals the tile's total open issues + PRs — with "· X match filters" appended while a filter is on) while the sidebar badge shows the same N (total open items, same render pass — never a separately computed number) with the needs-attention count (modifiers present, or on 071/072/085/090, counted over every item) in its hover tooltip and as the warn-coloured header suffix. The meta line also says "updated Ns ago · cache|fresh": the payload is built server-side at most once per `dashboard.stage_tracker.cache_ttl_s` (default = `governor.eval_interval_s`) from the spoke's existing GitHub snapshot and served with an `ETag`, so the 30-second poll costs a 304 and never a GitHub call (it turns amber once the payload is older than two TTLs). A GitHub webhook naming a listed PR or issue re-reads just that item (one `GET`, debounced by `dashboard.stage_tracker.webhook_refresh_debounce_ms`, default `2000`; off with `dashboard.stage_tracker.webhook_refresh: false`) and patches its row within seconds, ahead of the next eval cycle; see [Webhook-driven PR cache invalidation](operator-reference.md#webhook-driven-pr-cache-invalidation) and, for how that patch relates to the cadence tick and the reconcile that overwrites it (and what `/api/status.webhooks.mode` means when it reads `polling`), [webhooks.md](webhooks.md). Section details: [dashboard-sections.md](dashboard-sections.md#hive-activity-monitor); stage semantics: [labels-and-control-signals.md](labels-and-control-signals/stage-labels.md#stage-labels-stagennn--the-pipeline-state-machine). **Sounds (opt-in).** The speaker chip at the right end of the toolbar (🔇 off / 🔊 on; default off, remembered per browser under the `localStorage` key `hive.tracker.sound`) enables two short sounds, both synthesised in the browser with the Web Audio API (no audio file, no network request). The **merge zap** — just under half a second of bug-zapper arc: a ~4 ms high-voltage "snap", then a sputtering electric sizzle (bright noise and a 240 Hz square chopped by a 120 Hz mains pulse train, dropping out and re-striking at random) that holds ~80 ms and dies away, high-passed at 700 Hz — plays when a pull request the tab was already showing merges while the page is open. The trigger compares tracker payloads: a PR counts as merged when its stage reaches the ✓ cap or when its key appears in the payload's `recently_merged` list (the hive's `pr_merged` audit entries of the last 30 minutes — sweep, queue, relay and human merges the PR poller observed alike — which is how a PR that simply dropped out of the open list is told apart from one closed unmerged). Entries that name the repo by its configured short name are qualified to the `owner/name` the rows carry, and a PR that drops off the list a poll before its audit entry lands is still remembered as open until `recently_merged` settles it, so the two never have to arrive in the same payload. It never fires on the first load, for rows that were already merged, for issues, or for a PR it has already zapped; several merges in one refresh play at most two zaps. The **new-item buzz** — a quieter 0.18 s sawtooth near 120 Hz with a ~30 Hz tremolo through a lowpass — plays when an issue or pull request appears on the list that the previous payload did not have; it never fires on the first populated payload, buzzes once per item, and plays at most two buzzes per refresh. Nothing plays while the tab is hidden. Turning the chip on plays one zap then one buzz so you can hear both. The audio context is created on a user gesture and resumed if the browser suspended it; if the autoplay policy still holds it suspended when a sound is due, that sound is skipped and the next click or key press re-arms it. Detection runs over the union of every configured repo's rows, keyed `owner/name/kind#number`, so the sounds fire for each repo the hive governs. Either sound can be replaced from the card's ⚙ settings modal with a user-supplied file (WAV or anything `decodeAudioData` accepts, capped at 4 MB) stored in the browser's IndexedDB (`hive-tracker-sounds`); a stored file that fails to decode falls back to the built-in voice. The modal also carries the **Play sounds** master toggle and a 0–100 **Volume** slider (`localStorage` key `hive.tracker.sound.volume`) that scales the master gain of both built-in and uploaded sounds. Closed issues are not an event the tracker payload carries, so nothing plays for them. diff --git a/src/docs/labels-and-control-signals/glossary-and-operations.md b/src/docs/labels-and-control-signals/glossary-and-operations.md index 5c1f41a103..6273c4a31d 100644 --- a/src/docs/labels-and-control-signals/glossary-and-operations.md +++ b/src/docs/labels-and-control-signals/glossary-and-operations.md @@ -191,7 +191,7 @@ The Governor dialog's Features tab has a "Question Auto-Close" section: a switch ### Hive activity monitor -The dashboard renders every open issue and PR's stage as one unified tracker strip in the **Hive activity monitor** section (`GET /api/stage-tracker`): `Open → 010 → 020 → 030/040 (PR in progress) → 050/060 (CI / Review) → 080/100 (Merge gate) → merged`, with 060 lit as "Awaiting merge gate" (what holds it), 080 as "Ready for auto merge" (next sweep countdown), 095 as "Soaking" (time left) and 100 as "Merging" ([dashboard-sections.md](../dashboard-sections.md#hive-activity-monitor) has the legend), 070/072/074 as the lit *CI / Review* step named after the side stage, 085/090 as *Merge gate* lit "Needs human decision" / "Ready for human merge", and an issue parked at 045 lit at *Actionable* (the issue side) as "Needs human decision"; an issue wearing a hold-class label is "Open · on hold" whatever else it carries, `needs-human` included ([#13012](https://github.com/hivecommons/hive/issues/13012)). 070 "Fixing" is the author's move (a `needs-rebase` chip says what is being fixed — needs-rebase always lands at 070/072, never at 050/060). An issue with exactly one covering PR is a single entry whose strip is driven by the PR's stage from 030 on; with two or more covering PRs the issue's own strip stops at 020 Claimed and each PR nests beneath as an indented sub-row (`[author/*-coloured icon] #N title` plus its own strip from *PR in progress* on), and PRs linked to a listed issue have no top-level row (`nested_under`); a PR with no linked issue is one row named once on the left, and a PR is never listed as an issue (the PR record wins over any issues-feed copy of the same number). `stage/stalled` and the store's regressed marker (the retired `stage/regressed` label's successor) appear as chips and colour the `since` value; the stage store's per-item transition history (last eight hops) is in the row tooltip. See [dashboard.md](../dashboard.md#hive-activity-monitor). +The dashboard renders every open issue and PR's stage as one unified tracker strip in the **Hive activity monitor** section (`GET /api/stage-tracker`): `Open → 010 → 020 → 030/040 (PR in progress) → 050/060 (CI / Review) → 080/100 (Merge gate) → merged`, with 060 lit as "Awaiting merge gate" (what holds it), 080 as "Queued for merge" (next sweep countdown), 095 as "Soaking" (time left) and 100 as "Merging" ([dashboard-sections.md](../dashboard-sections.md#hive-activity-monitor) has the legend), 070/072/074 as the lit *CI / Review* step named after the side stage, 085/090 as *Merge gate* lit "Needs human decision" / "Ready for human merge", and an issue parked at 045 lit at *Actionable* (the issue side) as "Needs human decision"; an issue wearing a hold-class label is "Open · on hold" whatever else it carries, `needs-human` included ([#13012](https://github.com/hivecommons/hive/issues/13012)). 070 "Fixing" is the author's move (a `needs-rebase` chip says what is being fixed — needs-rebase always lands at 070/072, never at 050/060). An issue with exactly one covering PR is a single entry whose strip is driven by the PR's stage from 030 on; with two or more covering PRs the issue's own strip stops at 020 Claimed and each PR nests beneath as an indented sub-row (`[author/*-coloured icon] #N title` plus its own strip from *PR in progress* on), and PRs linked to a listed issue have no top-level row (`nested_under`); a PR with no linked issue is one row named once on the left, and a PR is never listed as an issue (the PR record wins over any issues-feed copy of the same number). `stage/stalled` and the store's regressed marker (the retired `stage/regressed` label's successor) appear as chips and colour the `since` value; the stage store's per-item transition history (last eight hops) is in the row tooltip. See [dashboard.md](../dashboard.md#hive-activity-monitor). ## Lifecycle examples diff --git a/src/pkg/dashboard/stage_tracker_decided.go b/src/pkg/dashboard/stage_tracker_decided.go index a4a56167ae..07e48e88ca 100644 --- a/src/pkg/dashboard/stage_tracker_decided.go +++ b/src/pkg/dashboard/stage_tracker_decided.go @@ -113,6 +113,13 @@ const ( decidedEffectNone = "none" ) +// stageTrackerQueuedForMergeWord is the one chevron word for every +// "nothing left but the merge itself" state (hivecommons/hive#16653): a +// recorded approval reads the same as 080 and a merge-train seat, with a +// short qualifier after the dot saying why it has not merged yet. The +// SPA's STAGE_TRACKER_QUEUED_FOR_MERGE_WORD mirrors it. +const stageTrackerQueuedForMergeWord = "Queued for merge" + // decidedVerb is the pill / caption vocabulary per verdict. type decidedVerb struct { Word string @@ -126,13 +133,13 @@ type decidedVerb struct { var decidedVerbs = map[string]decidedVerb{ string(delegatedecision.VerdictAdoptSupersede): {Word: "Adopted", Text: "Adopted · hive rebases & merges next pass", Acting: "Adopting · opening hive copy…", Plain: "adopted (supersede)", Stage: stagelabels.AwaitingMergeAdmission}, - string(delegatedecision.VerdictApprove): {Word: "Approved", Text: "Approved · merge queue takes it", Acting: "Approving…", Plain: "approved", Stage: stagelabels.AwaitingMergeAdmission}, + string(delegatedecision.VerdictApprove): {Word: stageTrackerQueuedForMergeWord, Text: stageTrackerQueuedForMergeWord + " · next pass", Acting: "Approving…", Plain: "approved", Stage: stagelabels.AwaitingMergeAdmission}, string(delegatedecision.VerdictDirection): {Word: "Sent back", Text: "Sent back · waiting for a new commit", Acting: "Sending back…", Plain: "direction given", Stage: stagelabels.None}, string(delegatedecision.VerdictCloseDuplicate): {Word: "Closing", Text: "Closing · duplicate, leaves the tracker next refresh", Acting: "Closing…", Plain: "closed as duplicate", Stage: stagelabels.None}, string(delegatedecision.VerdictCloseSuperseded): {Word: "Closing", Text: "Closing · superseded, leaves the tracker next refresh", Acting: "Closing…", Plain: "closed as superseded", Stage: stagelabels.None}, string(delegatedecision.VerdictNotNow): {Word: "Closing", Text: "Closing · declined for now, leaves the tracker next refresh", Acting: "Closing…", Plain: "declined for now", Stage: stagelabels.None}, string(delegatedecision.VerdictClose): {Word: "Closing", Text: "Closing · advisory resolved, leaves the tracker next refresh", Acting: "Closing…", Plain: "closed as completed", Stage: stagelabels.None}, - operatorActionQueueMerge: {Word: "Approved", Text: "Approved · hive will merge on the next tick once CI is green", Acting: "Recording approval…", Plain: "approved — hive will merge on the next tick once CI is green", Stage: stagelabels.AwaitingMergeAdmission}, + operatorActionQueueMerge: {Word: stageTrackerQueuedForMergeWord, Text: stageTrackerQueuedForMergeWord + " · after CI", Acting: "Recording approval…", Plain: "queued for merge — hive merges it on its next pass once CI is green", Stage: stagelabels.AwaitingMergeAdmission}, operatorActionMergeNow: {Word: "Merging", Text: "Merging · now as maintainer", Acting: "Merging…", Plain: "merged now as maintainer", Stage: stagelabels.MergeQueue}, } diff --git a/src/pkg/dashboard/stage_tracker_human_attention_test.go b/src/pkg/dashboard/stage_tracker_human_attention_test.go index 3eb6051ebd..0e8673ed55 100644 --- a/src/pkg/dashboard/stage_tracker_human_attention_test.go +++ b/src/pkg/dashboard/stage_tracker_human_attention_test.go @@ -68,7 +68,7 @@ func TestStageTrackerOperatorApprovalDoesNotHideCurrentReviewChanges(t *testing. if d == nil || d.Effect != decidedEffectNone || d.Stage != 0 || d.CurrentBlocker == "" || d.Head != it.Head { t.Fatalf("approval wrongly outranked current review: %+v", d) } - if strings.Contains(d.Text, "merge queue takes it") || !strings.Contains(d.Text, "waiting on @thatguywob") { + if strings.Contains(d.Text, "Queued for merge") || !strings.Contains(d.Text, "waiting on @thatguywob") { t.Fatalf("wrong precedence/explanation: %+v", d) } beforeStage, beforeReason := it.Stage, it.Reason diff --git a/src/pkg/dashboard/stage_tracker_merge_failed_column_test.go b/src/pkg/dashboard/stage_tracker_merge_failed_column_test.go index 54a28f6ae2..864ee28197 100644 --- a/src/pkg/dashboard/stage_tracker_merge_failed_column_test.go +++ b/src/pkg/dashboard/stage_tracker_merge_failed_column_test.go @@ -13,7 +13,7 @@ import ( // "PUT https://api.github.com/…" error spilling out of it. An actual queue // outcome lights the Merge gate; a premature call waiting for head checks // does not admit a 050/060 PR. The chip is a fixed short phrase -// (no URL, no verb, ≤ 5 words) with GitHub's words in the tooltip's +// (no URL, no verb, ≤ 6 words) with GitHub's words in the tooltip's // Details line; pending CI is "CI running", never "red"; and the cue // names the stage in plain words, not "stage/060-reviewed". func TestStageTrackerMergeFailedColumnNode(t *testing.T) { @@ -83,26 +83,27 @@ assert.strictEqual(stageTrackerAnchor(50, stages, 'pr', prepared), 50, 'preparat assert.strictEqual(stageTrackerAnchor(100, stages, 'pr', prepared), STAGE_TRACKER_MERGE_COLUMN, 'an actual queue-stage outcome stays at the gate'); // 2. The chip for this exact payload (Go translated the 405): the sweep -// called too early, so it is "Waiting for CI · 4 checks", not a failure. +// called too early, so it is "Queued for merge · after CI", not a failure. let info = stageTrackerMergeGateInfo(row(gate({ merge_failed_kind: 'checks-pending', merge_failed_text: "4 required checks haven't finished", merge_failed_checks: 4 })), now); -assert.strictEqual(info.word, 'Waiting for CI'); -assert.strictEqual(info.detail, '4 checks'); +assert.strictEqual(info.word, 'Queued for merge'); +assert.strictEqual(info.detail, 'after CI', 'the check count rides the hover, not the chip'); assert.strictEqual(info.cue, 'running', 'the sweep is on it'); assert.ok(info.tip.includes("before its required checks had reported — 4 required checks haven't finished"), info.tip); assert.ok(info.tip.includes('Details: ' + raw), 'raw error only after Details: ' + info.tip); assert.ok(!info.tip.startsWith('stage/'), info.tip); // Older payload without the translated fields: the SPA classifies the raw text itself. info = stageTrackerMergeGateInfo(row(gate()), now); -assert.strictEqual(info.word + ' · ' + info.detail, 'Waiting for CI · 4 checks', 'raw-only payload'); +assert.strictEqual(info.word + ' · ' + info.detail, 'Queued for merge · after CI', 'raw-only payload'); assert.ok(info.tip.includes("4 required checks haven't finished"), info.tip); -// 3. Every merge-failed chip is a fixed short phrase: no URL, no verb, ≤ 5 words. +// 3. Every merge-failed chip is a fixed short phrase: no URL, no verb, ≤ 6 words +// (the three-word queue word plus a qualifier of at most three, #16653). const cases = [ - [gate(), 'Waiting for CI · 4 checks'], - [gate({ sweep_running: false }), 'Waiting for CI · 4 checks'], + [gate(), 'Queued for merge · after CI'], + [gate({ sweep_running: false }), 'Queued for merge · after CI'], [gate({ merge_failed: '405 Pull Request is not mergeable' }), 'Merge failed · retrying'], - [gate({ merge_failed: '405 Pull Request is not mergeable', sweep_running: false }), 'Merge failed · branch protection'], - [gate({ merge_failed: '409 Head branch was modified. Review and try the merge again.', sweep_running: false }), 'Merge failed · needs rebase'], + [gate({ merge_failed: '405 Pull Request is not mergeable', sweep_running: false }), 'Queued for merge · branch protection pending'], + [gate({ merge_failed: '409 Head branch was modified. Review and try the merge again.', sweep_running: false }), 'Queued for merge · needs rebase'], [gate({ merge_failed: '403 Resource not accessible by integration', sweep_running: false }), 'Merge failed · not allowed'], [gate({ merge_failed: 'context deadline exceeded', sweep_running: false }), 'Merge failed · GitHub refused'], [gate({ merge_failed: 'context deadline exceeded', merge_failed_kind: 'refused', merge_failed_text: 'GitHub refused the merge', sweep_running: false }), 'Merge failed · GitHub refused'], @@ -114,7 +115,7 @@ for (const [mg, want] of cases) { const label = i.word + (i.detail ? ' · ' + i.detail : ''); assert.strictEqual(label, want); assert.ok(plain(label), 'no raw error in the chip: ' + label); - assert.ok(words(label).length <= 5, 'chip ≤ 5 words: ' + label); + assert.ok(words(label).length <= 6, 'chip ≤ 6 words: ' + label); const html = stageTrackerMergeGateWordHtml(row(mg), now); assert.ok(html.includes('') && plain(html), html); if (mg.merge_failed) assert.ok(i.tip.includes('Details: ' + mg.merge_failed), 'raw text rides the tooltip: ' + i.tip); diff --git a/src/pkg/dashboard/stage_tracker_merge_failed_stale_test.go b/src/pkg/dashboard/stage_tracker_merge_failed_stale_test.go index fdfe9fc14c..bfa66fe76b 100644 --- a/src/pkg/dashboard/stage_tracker_merge_failed_stale_test.go +++ b/src/pkg/dashboard/stage_tracker_merge_failed_stale_test.go @@ -130,6 +130,6 @@ assert.strictEqual(stageTrackerPriorHeadMergeFailedNote({}), ''); // A live refusal on the current head still reads "Merge failed". const liveInfo = stageTrackerMergeGateInfo(row({ state: 'merge-failed', merge_failed: raw, merge_failed_kind: 'protection', merge_failed_text: 'branch protection blocks it', merge_failed_at: new Date(now - 9000).toISOString(), sweep_running: false }), now); -assert.strictEqual(liveInfo.word + ' · ' + liveInfo.detail, 'Merge failed · branch protection'); +assert.strictEqual(liveInfo.word + ' · ' + liveInfo.detail, 'Queued for merge · branch protection pending'); `) } diff --git a/src/pkg/dashboard/stage_tracker_merge_gate_test.go b/src/pkg/dashboard/stage_tracker_merge_gate_test.go index 6f84e6be6f..34ffd69bf8 100644 --- a/src/pkg/dashboard/stage_tracker_merge_gate_test.go +++ b/src/pkg/dashboard/stage_tracker_merge_gate_test.go @@ -145,8 +145,8 @@ func TestStageTrackerMergeGateInPayload(t *testing.T) { func TestStageTrackerMergeGateNode(t *testing.T) { html := indexHTML(t) for _, want := range []string{ - `const STAGE_TRACKER_MERGE_GATE_WORD = { 'gate-pending': 'Review passed', ready: 'Ready for auto merge', soaking: 'Soaking', merging: 'Merging', merged: 'Merged', 'merge-failed': 'Merge failed' };`, - `60: 'Review passed', 80: 'Ready for auto merge', 95: 'Soaking', 100: 'Merging'`, + `const STAGE_TRACKER_MERGE_GATE_WORD = { 'gate-pending': 'Review passed', ready: 'Queued for merge', soaking: 'Soaking', merging: 'Merging', merged: 'Merged', 'merge-failed': 'Merge failed' };`, + `60: 'Review passed', 80: 'Queued for merge', 95: 'Soaking', 100: 'Merging'`, `const gateCue = gateWord && typeof stageTrackerGateCueHtml === 'function' ? stageTrackerGateCueHtml(item, nowMs, trains) : '';`, `const caption = gateWord || word;`, `const text = decision ? stageTrackerDecisionTriggerHtml(decision, caption, fullTip) : caption;`, @@ -164,7 +164,7 @@ func TestStageTrackerMergeGateNode(t *testing.T) { if err != nil { t.Fatal(err) } - for _, want := range []string{"**Merge queue pills — legend**", "Awaiting merge gate", "Ready for auto merge", "**Soaking**", "**Merging**", "next pass in"} { + for _, want := range []string{"**Merge queue pills — legend**", "Awaiting merge gate", "Queued for merge", "**Soaking**", "**Merging**", "next pass in"} { if !strings.Contains(string(docs), want) { t.Errorf("docs/dashboard-sections/activity-monitor.md missing merge-gate legend %q", want) } @@ -205,7 +205,7 @@ const pr15044 = { repo: 'hivecommons/hive', number: 15044, kind: 'pr', base_ref: const ready = { repo: 'hivecommons/hive', number: 15060, kind: 'pr', stage: 80, merge_gate: { state: 'ready', last_sweep_at: iso(now - 10000), next_sweep_at: iso(now + 42000) } }; const merging = { repo: 'hivecommons/hive', number: 15061, kind: 'pr', stage: 100, merge_gate: { state: 'merging', last_sweep_at: iso(now - 1000) } }; -// Both 060 rows read the same word — neither is "Ready for auto merge" with CI pending. +// Both 060 rows read the same word — neither is "Queued for merge" with CI pending. let a = stageTrackerMergeGateInfo(pr15042, now), b = stageTrackerMergeGateInfo(pr15054, now); assert.strictEqual(a.word, 'Review passed'); assert.strictEqual(b.word, 'Review passed'); assert.strictEqual(a.cue, 'running'); assert.strictEqual(a.detail, 'CI in progress'); @@ -226,7 +226,7 @@ assert.strictEqual(stageTrackerGateCueHtml({ repo: 'r', number: 1, kind: 'pr', s assert.strictEqual(stageTrackerGateCueHtml({ repo: 'r', number: 1, kind: 'pr', stage: STAGE_TRACKER_TERMINAL }, now), '', 'merged: no glyph'); // The pill word with the live detail; the waiting row says what it waits for. -assert.strictEqual(stageTrackerMergeGateWordHtml(ready, now), 'Ready for auto merge · next pass in 42s'); +assert.strictEqual(stageTrackerMergeGateWordHtml(ready, now), 'Queued for merge · next pass in 42s'); // The soak detail carries its clock (data-ham-soak…) so the tick redoes the words and the hover. const soakHtml = stageTrackerMergeGateWordHtml(pr15044, now); assert.ok(soakHtml.startsWith('Soaking /^Merge queue/.test(String(s || '')) ? 'queue' : 'stage'; +const classOf = s => /^(Queued for merge|Merge queue)/.test(String(s || '')) ? 'queue' : 'stage'; for (const stage of stages) for (const state of ['front', 'queued-behind']) for (const flag of [true, false, undefined]) { const pos = state === 'front' ? 1 : 2; const mt = { id: 'v5#15577', state, front: 15577, head_number: 15577, position: pos, size: 2, length: 2, head_state: stage < 80 ? 'ci' : 'ready', head_reason: stage < 80 ? 'waiting for CI' : '' }; @@ -61,7 +61,7 @@ for (const stage of stages) for (const state of ['front', 'queued-behind']) for assert.ok(!/merges next/.test(info.tip), label + ' hover promises merges next: ' + info.tip); assert.ok(info.until === 0, label + ' no ETA countdown ahead of readiness'); } else { - assert.ok(/^Merge queued · (1st|2nd)( of \d+)?$/.test(word), label + ' place word: ' + JSON.stringify(word)); + assert.ok(/^Queued for merge · (1st|2nd)( of \d+)?$/.test(word), label + ' place word: ' + JSON.stringify(word)); } } // hive's own #15577 exactly: 050, front, CI running — the chevron leads with CI / Review. diff --git a/src/pkg/dashboard/stage_tracker_merge_train_queue_test.go b/src/pkg/dashboard/stage_tracker_merge_train_queue_test.go index 4fe7c2297e..479d4eae8b 100644 --- a/src/pkg/dashboard/stage_tracker_merge_train_queue_test.go +++ b/src/pkg/dashboard/stage_tracker_merge_train_queue_test.go @@ -280,7 +280,7 @@ const quiet = mk(15319, 'fleetreport: slog feed', Object.assign({ state: 'queued const busy = mk(15319, 'fleetreport: slog feed', Object.assign({ state: 'queued-behind', position: 2, ahead: [15315] }, headFacts), { sweep_running: true }); const a = stageTrackerMergeGateInfo(quiet, now), b = stageTrackerMergeGateInfo(busy, now); // Stability: the sweep flag changes neither the word nor the detail. -assert.strictEqual(a.word, 'Merge queued · 2nd of 3'); +assert.strictEqual(a.word, 'Queued for merge · 2nd of 3'); assert.strictEqual(b.word, a.word, 'sweep_running must not change the chip label'); assert.strictEqual(a.detail, ''); assert.strictEqual(b.detail, ''); assert.strictEqual(stageTrackerMergeGateWordHtml(quiet, now), stageTrackerMergeGateWordHtml(busy, now), 'identical chip markup'); @@ -294,7 +294,7 @@ assert.ok(stageTrackerGateCueHtml(busy, now).includes('cue-spin') && !stageTrack // A soaking head: the estimate is the head's soak plus one slot per PR ahead. const soakHead = mk(15374, 'tracker: queue', { state: 'queued-behind', position: 3, ahead: [15315, 15319], head_state: 'soaking', head_reason: 'soaking, 12m left', eta_s: 25 * 60 }, { sweep_running: true }); const s = stageTrackerMergeGateInfo(soakHead, now); -assert.strictEqual(s.word, 'Merge queued · 3rd of 3'); +assert.strictEqual(s.word, 'Queued for merge · 3rd of 3'); assert.ok(s.tip.startsWith('3rd of 3 in the merge queue · behind #15315 (soaking, 12m left) · ETA ~25m. Hive merges one at a time, in order. Checking now…'), s.tip); // Stalled: the chip says so, names the head and how long; the markup wears the stalled class. const stalled = mk(15374, 'tracker: queue', Object.assign({ state: 'queued-behind', position: 3, ahead: [15315, 15319], stalled: true, stalled_s: 3 * 3600 }, headFacts), { sweep_running: true }); @@ -304,7 +304,7 @@ assert.ok(stageTrackerMergeGateWordHtml(stalled, now).includes('class="ham-seg-t assert.strictEqual(stageTrackerMergeGateInfo(mk(15374, 't', Object.assign({ state: 'queued-behind', position: 3, stalled: true, stalled_s: 3 * 3600 }, headFacts), { sweep_running: false }), now).word, st.word, 'stalled label is sweep-stable too'); // The front row reads its place too. const head = mk(15315, 'fleetreport: head', Object.assign({ state: 'front', position: 1, ahead: [] }, headFacts)); -assert.strictEqual(stageTrackerMergeGateInfo(head, now).word, 'Merge queued · 1st of 3'); +assert.strictEqual(stageTrackerMergeGateInfo(head, now).word, 'Queued for merge · 1st of 3'); assert.ok(stageTrackerMergeGateInfo(head, now).tip.startsWith('1st of 3 in the merge queue · merges next (waiting for a maintainer (untrusted author)). Hive merges one at a time, in order.'), stageTrackerMergeGateInfo(head, now).tip); // hive's own #15406 read the bare slug "front" while the front sat in its // soak (the mirrored soak clock returned the raw state). A front in soak @@ -312,20 +312,20 @@ assert.ok(stageTrackerMergeGateInfo(head, now).tip.startsWith('1st of 3 in the m const frontSoak = mk(15406, 'in soak at the front', { state: 'front', position: 1, size: 4, length: 4, head_number: 15406, front: 15406, ahead: [], head_state: 'soaking', head_reason: 'soaking, 12m left', eta_s: 760, eta_at: new Date(now + 760 * 1000).toISOString(), eta_basis: 'own soak 12m · next pass in 40s' }, { state: 'front', soak_until: new Date(now + 12 * 60 * 1000).toISOString(), soak_started_at: new Date(now - 18 * 60 * 1000).toISOString(), sweep_running: true }); const fs = stageTrackerMergeGateInfo(frontSoak, now); -assert.strictEqual(fs.word, 'Merge queued · 1st of 4', fs.word); assert.strictEqual(fs.detail, '~13m'); +assert.strictEqual(fs.word, 'Queued for merge · 1st of 4', fs.word); assert.strictEqual(fs.detail, '~13m'); assert.strictEqual(stageTrackerMergeGateInfo(Object.assign({}, frontSoak, { merge_gate: Object.assign({}, frontSoak.merge_gate, { sweep_running: false }) }), now).word, fs.word); -assert.strictEqual(stageTrackerMergeGateWordHtml(frontSoak, now).replace(/<[^>]+>/g, ''), 'Merge queued · 1st of 4 · ~13m'); +assert.strictEqual(stageTrackerMergeGateWordHtml(frontSoak, now).replace(/<[^>]+>/g, ''), 'Queued for merge · 1st of 4 · ~13m'); // Countdown to auto-merge: eta_at drives "· ~4m" on the chip; the detail carries // the clock so the shared tick keeps counting and a re-render lands on the same // instant (no reset on poll). const etaAt = new Date(now + 4 * 60 * 1000).toISOString(); const timed = mk(15319, 'fleetreport: slog feed', { state: 'queued-behind', position: 2, ahead: [15315], head_state: 'soaking', head_reason: 'soaking, 3m left', eta_s: 240, eta_at: etaAt, eta_basis: '1 ahead · head soaking 3m · next pass in 40s' }, { sweep_running: false }); const ti = stageTrackerMergeGateInfo(timed, now); -assert.strictEqual(ti.word, 'Merge queued · 2nd of 3'); assert.strictEqual(ti.detail, '~4m'); assert.strictEqual(ti.until, now + 4 * 60 * 1000); +assert.strictEqual(ti.word, 'Queued for merge · 2nd of 3'); assert.strictEqual(ti.detail, '~4m'); assert.strictEqual(ti.until, now + 4 * 60 * 1000); assert.ok(ti.tip.includes('· ETA ~4m (1 ahead · head soaking 3m · next pass in 40s).'), ti.tip); const chipHtml = stageTrackerMergeGateWordHtml(timed, now); -assert.ok(chipHtml.includes('>Merge queued · 2nd of 3 · ~4m'), chipHtml); -assert.strictEqual(chipHtml.replace(/<[^>]+>/g, ''), 'Merge queued · 2nd of 3 · ~4m'); +assert.ok(chipHtml.includes('>Queued for merge · 2nd of 3 · ~4m'), chipHtml); +assert.strictEqual(chipHtml.replace(/<[^>]+>/g, ''), 'Queued for merge · 2nd of 3 · ~4m'); // The same payload 90s later (a poll re-render) reads 2m30s, not 4m again. assert.strictEqual(stageTrackerMergeGateInfo(timed, now + 90 * 1000).detail, '~3m'); assert.strictEqual(stageTrackerMergeGateInfo(timed, now + 150 * 1000).detail, '~2m'); @@ -520,7 +520,7 @@ assert.strictEqual(stageTrackerTrainWord(headRow), 'Merge queue · stalled — n assert.strictEqual(stageTrackerTrainStallWhy({ head_state: 'needs-human', head_reason: 'waiting for a human decision' }), 'needs a human decision'); // An unmapped head_state falls back to the head's plain-word reason. assert.strictEqual(stageTrackerTrainStallWhy({ head_state: 'something-new', head_reason: 'doing a thing; details' }), 'doing a thing'); -assert.strictEqual(stageTrackerMergeGateStateWord('front'), 'Merge queued'); +assert.strictEqual(stageTrackerMergeGateStateWord('front'), 'Queued for merge'); assert.strictEqual(stageTrackerMergeGateStateWord('duplicate-of:15402'), 'Duplicate of #15402'); // The held duplicate's chip: "Duplicate of #15402 · needs a pick", the hover names the issue and the pick rule. const heldDup = { repo: 'hivecommons/hive', number: 15407, kind: 'pr', title: 't', stage: 80, modifiers: ['needs-decision'], merge_gate: { state: 'duplicate-of:15402', duplicate_of: 15402, duplicate_issue: 15396, sweep_running: true } }; diff --git a/src/pkg/dashboard/stage_tracker_merge_train_tag_test.go b/src/pkg/dashboard/stage_tracker_merge_train_tag_test.go index d92ab88431..e1eddd06ba 100644 --- a/src/pkg/dashboard/stage_tracker_merge_train_tag_test.go +++ b/src/pkg/dashboard/stage_tracker_merge_train_tag_test.go @@ -56,30 +56,30 @@ assert.strictEqual(stageTrackerTrainIndex([]).count, 0); assert.strictEqual(stageTrackerTrainIndex([{ group: { key: 'g' } }, { group: { key: 'g' }, item: a1 }, { item: b2 }]).count, 2); // "1st of 2" always; the tag only past one train. -assert.strictEqual(stageTrackerTrainWord(a1), 'Merge queued · 1st of 2'); -assert.strictEqual(stageTrackerTrainWord(a1, 1), 'Merge queued · 1st of 2'); -assert.strictEqual(stageTrackerTrainWord(a1, 2), 'Merge queued · 1st of 2 · train main.go'); -assert.strictEqual(stageTrackerTrainWord(a2, 2), 'Merge queued · 2nd of 2 · train main.go'); -assert.strictEqual(stageTrackerTrainWord(b1, 2), 'Merge queued · 1st of 2 · train stage_tracker.go'); -assert.strictEqual(stageTrackerTrainWord(b2, 2), 'Merge queued · 2nd of 2 · train stage_tracker.go'); +assert.strictEqual(stageTrackerTrainWord(a1), 'Queued for merge · 1st of 2'); +assert.strictEqual(stageTrackerTrainWord(a1, 1), 'Queued for merge · 1st of 2'); +assert.strictEqual(stageTrackerTrainWord(a1, 2), 'Queued for merge · 1st of 2 · train main.go'); +assert.strictEqual(stageTrackerTrainWord(a2, 2), 'Queued for merge · 2nd of 2 · train main.go'); +assert.strictEqual(stageTrackerTrainWord(b1, 2), 'Queued for merge · 1st of 2 · train stage_tracker.go'); +assert.strictEqual(stageTrackerTrainWord(b2, 2), 'Queued for merge · 2nd of 2 · train stage_tracker.go'); // Two trains never yield the same chevron word for the same place. assert.notStrictEqual(stageTrackerTrainWord(a1, two.count), stageTrackerTrainWord(b1, two.count)); assert.notStrictEqual(stageTrackerTrainWord(a2, two.count), stageTrackerTrainWord(b2, two.count)); // No overlap list: the head names the train. const bare = mk(15600, 'v5#15600', 1, 3, [], 15600); assert.strictEqual(stageTrackerTrainTag(bare.merge_train), '#15600'); -assert.strictEqual(stageTrackerTrainWord(bare, 2), 'Merge queued · 1st of 3 · train #15600'); +assert.strictEqual(stageTrackerTrainWord(bare, 2), 'Queued for merge · 1st of 3 · train #15600'); assert.strictEqual(stageTrackerTrainTag({}), ''); // The gate chip reads the same word, and its hover names the train. const chipA2 = stageTrackerMergeGateInfo(a2, now, 2); -assert.strictEqual(chipA2.word, 'Merge queued · 2nd of 2 · train main.go'); +assert.strictEqual(chipA2.word, 'Queued for merge · 2nd of 2 · train main.go'); assert.ok(chipA2.tip.startsWith('Train of 2 PRs overlapping main.go; merges after #15567. 2nd of 2 in the merge queue · behind #15567'), chipA2.tip); const chipB1 = stageTrackerMergeGateInfo(b1, now, 2); -assert.strictEqual(chipB1.word, 'Merge queued · 1st of 2 · train stage_tracker.go'); +assert.strictEqual(chipB1.word, 'Queued for merge · 1st of 2 · train stage_tracker.go'); assert.ok(chipB1.tip.startsWith('Train of 2 PRs overlapping stage_tracker.go; merges first. 1st of 2 in the merge queue · merges next'), chipB1.tip); assert.ok(!stageTrackerMergeGateInfo(a2, now, 1).tip.includes('Train of'), 'one train: no train sentence'); assert.ok(!stageTrackerMergeGateInfo(a2, now).tip.includes('Train of'), 'no count: no train sentence'); -assert.strictEqual(stageTrackerMergeGateWordHtml(a2, now, 2).replace(/<[^>]+>/g, ''), 'Merge queued · 2nd of 2 · train main.go'); +assert.strictEqual(stageTrackerMergeGateWordHtml(a2, now, 2).replace(/<[^>]+>/g, ''), 'Queued for merge · 2nd of 2 · train main.go'); assert.ok(stageTrackerGateCueHtml(a2, now, 2).includes('Train of 2 PRs overlapping main.go'), stageTrackerGateCueHtml(a2, now, 2)); // A provisional slot (#15581) keeps blocker-first and still names its train. const p1 = mk(15577, 'v5#15577', 1, 2, ['tracker-words.js'], 15577, 50); diff --git a/src/pkg/dashboard/stage_tracker_merge_train_test.go b/src/pkg/dashboard/stage_tracker_merge_train_test.go index 1c6b554697..99e7584e3c 100644 --- a/src/pkg/dashboard/stage_tracker_merge_train_test.go +++ b/src/pkg/dashboard/stage_tracker_merge_train_test.go @@ -302,19 +302,19 @@ const other = { repo: 'hivecommons/hive', number: 15100, kind: 'pr', title: 'Doc // Pill wording per state: the place in the owner's words (#15395 — // "'front' should be 'merge queued - 1st' and so on"). -assert.strictEqual(stageTrackerTrainWord(front), 'Merge queued · 1st of 4'); -assert.strictEqual(stageTrackerTrainWord(second), 'Merge queued · 2nd of 4'); +assert.strictEqual(stageTrackerTrainWord(front), 'Queued for merge · 1st of 4'); +assert.strictEqual(stageTrackerTrainWord(second), 'Queued for merge · 2nd of 4'); assert.strictEqual(stageTrackerTrainWord(third), 'Rebasing · attempt 1/2'); assert.strictEqual(stageTrackerTrainWord(fourth), 'Needs human decision · rebase failed twice'); assert.strictEqual(stageTrackerTrainWord(other), ''); for (const [n, w] of [[1, '1st'], [2, '2nd'], [3, '3rd'], [4, '4th'], [11, '11th'], [12, '12th'], [13, '13th'], [21, '21st'], [22, '22nd'], [111, '111th']]) assert.strictEqual(stageTrackerOrdinal(n), w, 'ordinal ' + n); // The lit chevron carries the word: 080 for the members, the 085 detour for the exhausted one. const lit = it => stageTrackerSegments(it, stages, now).find(s => s.state === 'active'); -assert.strictEqual(lit(front).short, 'Merge queued · 1st of 4'); -assert.strictEqual(lit(second).short, 'Merge queued · 2nd of 4'); +assert.strictEqual(lit(front).short, 'Queued for merge · 1st of 4'); +assert.strictEqual(lit(second).short, 'Queued for merge · 2nd of 4'); assert.strictEqual(lit(third).short, 'Rebasing · attempt 1/2'); assert.strictEqual(lit(fourth).detour.text, 'Needs human decision · rebase failed twice'); -assert.strictEqual(lit(other).short, 'Ready for auto merge'); +assert.strictEqual(lit(other).short, 'Queued for merge'); // Tooltip: the queue ahead and the overlapping files. const tip = stageTrackerTooltip(third, now); @@ -334,12 +334,12 @@ const sorted = [fourth, other, third, { repo: 'x/y', number: 1, kind: 'issue', s // Queue facts (#15395): the chip is the position, never the slug; the // hover sentence names the head, what it waits on and the estimate. const queued = mk(15319, 80, { state: 'queued-behind', position: 2, ahead: [15315], length: 3, head_number: 15315, head_state: 'soaking', head_reason: 'soaking, 12m left', eta_s: 1500 }); -assert.strictEqual(stageTrackerTrainWord(queued), 'Merge queued · 2nd of 3'); +assert.strictEqual(stageTrackerTrainWord(queued), 'Queued for merge · 2nd of 3'); assert.strictEqual(stageTrackerTrainQueueTip(queued.merge_train), '2nd of 3 in the merge queue · behind #15315 (soaking, 12m left) · ETA ~25m. Hive merges one at a time, in order.'); const firstQ = mk(15315, 80, { state: 'front', position: 1, length: 3, head_number: 15315, head_state: 'soaking', head_reason: 'soaking, 12m left', eta_s: 780 }); assert.strictEqual(stageTrackerTrainQueueTip(firstQ.merge_train), '1st of 3 in the merge queue · merges next (soaking, 12m left) · ETA ~13m. Hive merges one at a time, in order.'); const thirdQ = mk(15374, 80, { state: 'queued-behind', position: 3, ahead: [15315, 15319], length: 3, head_number: 15315, head_state: 'needs-human', head_reason: 'waiting for a maintainer (untrusted author)', eta_s: 0 }); -assert.strictEqual(stageTrackerTrainWord(thirdQ), 'Merge queued · 3rd of 3'); +assert.strictEqual(stageTrackerTrainWord(thirdQ), 'Queued for merge · 3rd of 3'); assert.strictEqual(stageTrackerTrainQueueTip(thirdQ.merge_train), '3rd of 3 in the merge queue · behind #15315 (waiting for a maintainer (untrusted author)) · no estimate until #15315 moves. Hive merges one at a time, in order.'); const stalledQ = mk(15374, 80, { state: 'queued-behind', position: 3, ahead: [15315, 15319], length: 3, head_number: 15315, head_state: 'ci', head_reason: 'waiting for CI', stalled: true, stalled_s: 3 * 3600 }); assert.strictEqual(stageTrackerTrainWord(stalledQ), 'Merge queue · stalled — waiting on #15315 (waiting for CI) · 3h'); @@ -352,14 +352,14 @@ for (const it of [queued, firstQ, thirdQ, stalledQ, front, second, third, fourth assert.ok(!/front|queued-behind|rebase-exhausted/i.test(seen), 'no slug or "front" for #' + it.number + ': ' + seen); } // Ordinal places beyond the first few. -for (const [pos, w] of [[11, '11th'], [12, '12th'], [13, '13th'], [21, '21st'], [22, '22nd'], [23, '23rd']]) assert.strictEqual(stageTrackerTrainWord(mk(1, 80, { state: 'queued-behind', position: pos, length: 30 })), 'Merge queued · ' + w + ' of 30'); +for (const [pos, w] of [[11, '11th'], [12, '12th'], [13, '13th'], [21, '21st'], [22, '22nd'], [23, '23rd']]) assert.strictEqual(stageTrackerTrainWord(mk(1, 80, { state: 'queued-behind', position: pos, length: 30 })), 'Queued for merge · ' + w + ' of 30'); // Every train state — the 1st included — lights the Merge queue column, // whatever stage the lane holds the head at (hive #15400 at 050 lit CI / Review). for (const st of ['front', 'queued-behind', 'rebasing', 'rebase-exhausted']) for (const stage of [50, 60, 70, 74, 80, 95]) assert.strictEqual(stageTrackerAnchor(stage, stages, 'pr', mk(2, stage, { state: st, position: 1 })), 80, st + ' at ' + stage); assert.strictEqual(stageTrackerAnchor(50, stages, 'pr', other), 50, 'no train: stage rules as before'); // The 1st-in-train head at 050 lights the Merge queue column, but its // word leads with the stage's blocker — the slot is provisional until -// CI and the verdict are in (hive #15577 read "Merge queued · 1st" over +// CI and the verdict are in (hive #15577 read "Queued for merge · 1st" over // a caption saying build-and-test was still running). const headAt50 = mk(15400, 50, { state: 'front', position: 1 }); assert.strictEqual(lit(headAt50).number, 80); diff --git a/src/pkg/dashboard/stage_tracker_merging_hold_test.go b/src/pkg/dashboard/stage_tracker_merging_hold_test.go index 24929f956e..382c00f5a7 100644 --- a/src/pkg/dashboard/stage_tracker_merging_hold_test.go +++ b/src/pkg/dashboard/stage_tracker_merging_hold_test.go @@ -370,8 +370,8 @@ info = stageTrackerMergeGateInfoFor(item({ state: 'merging' }), null, now); assert.strictEqual(info.detail, '', 'legacy 100 record: word alone'); info = stageTrackerMergeGateInfoFor(Object.assign(item({ state: 'merge-failed', merge_failed: 'merging PR o/r#1 (abc): 405 Pull Request is not mergeable\nmore', merge_failed_at: new Date(now - 9000).toISOString(), merge_path: 'relay' }), { stage: 90 }), null, now); assert.strictEqual(info.state, 'merge-failed'); -assert.strictEqual(info.word, 'Merge failed'); -assert.strictEqual(info.detail, 'branch protection', 'kind words, never the raw error'); +assert.strictEqual(info.word, 'Queued for merge', 'a refusal the lane retries keeps the queue word (#16653)'); +assert.strictEqual(info.detail, 'branch protection pending', 'kind words, never the raw error'); assert.strictEqual(info.cue, 'waiting'); assert.ok(info.tip.includes('hive-merge relay') && info.tip.includes('GitHub refused — branch protection blocks it') && info.tip.includes('Details: merging PR o/r#1 (abc): 405 Pull Request is not mergeable'), info.tip); assert.strictEqual(stageTrackerMergeFailedShort(''), 'GitHub refused the merge'); diff --git a/src/pkg/dashboard/stage_tracker_row_actions_test.go b/src/pkg/dashboard/stage_tracker_row_actions_test.go index 19ec78f7e4..2ad454b870 100644 --- a/src/pkg/dashboard/stage_tracker_row_actions_test.go +++ b/src/pkg/dashboard/stage_tracker_row_actions_test.go @@ -1391,7 +1391,7 @@ assert.deepStrictEqual(req.body, { decision: 'merge-now', comment: '', type: 'pr assert.deepStrictEqual(stageTrackerActionRequest(pr317, 'decide:queue-merge', {}).body, { decision: 'queue-merge', comment: '', type: 'pr' }); assert.strictEqual(STAGE_TRACKER_ACTING_CAPTIONS['decide:merge-now'], 'Merging…'); assert.strictEqual(STAGE_TRACKER_ACTION_WORDS.merged, 'merged'); -assert.strictEqual(STAGE_TRACKER_ACTION_WORDS['queued-for-merge'], 'approved — hive will merge on the next tick once CI is green'); +assert.strictEqual(STAGE_TRACKER_ACTION_WORDS['queued-for-merge'], 'queued for merge — hive merges it on its next pass once CI is green'); assert.strictEqual(STAGE_TRACKER_ACTING_CAPTIONS['decide:queue-merge'], 'Recording approval…'); assert.strictEqual(STAGE_TRACKER_ACTION_LABELS['decide:queue-merge'], 'Approve and let hive merge'); assert.strictEqual(STAGE_TRACKER_ACTION_LABELS['decide:merge-now'], 'Merge now as maintainer'); diff --git a/src/pkg/dashboard/stage_tracker_superseded_row_test.go b/src/pkg/dashboard/stage_tracker_superseded_row_test.go index ea4f3e6960..4ef9827c5f 100644 --- a/src/pkg/dashboard/stage_tracker_superseded_row_test.go +++ b/src/pkg/dashboard/stage_tracker_superseded_row_test.go @@ -192,7 +192,7 @@ func TestStageTrackerSupersededRowRatchetJS(t *testing.T) { const since = new Date(now - 3600000).toISOString(); const pr = (n, extra) => Object.assign({ repo: 'hivecommons/hive', number: n, kind: 'pr', title: 'dashboard: split stage_tracker.go into 4 files, a very long title that must ellipsize before the note does', url: 'https://x/' + n, stage: 74, stage_since: since, caption: 'Adopted', author: 'odttlnt', author_kind: 'clanker', modifiers: [] }, extra || {}); const issue = (n, prs, extra) => Object.assign({ repo: 'hivecommons/hive', number: n, kind: 'issue', title: 'Issue ' + n, url: 'https://x/i' + n, stage: 40, stage_since: since, linked_prs: prs }, extra || {}); -const copy = (n, from, extra) => pr(n, Object.assign({ author: 'hivecommons-hive[bot]', author_kind: 'hive', stage: 80, caption: 'Merge queued', adopted_from: { number: from, url: 'https://x/' + from, author: 'odttlnt', state: 'open', text: '↳ adopted from #' + from } }, extra || {})); +const copy = (n, from, extra) => pr(n, Object.assign({ author: 'hivecommons-hive[bot]', author_kind: 'hive', stage: 80, caption: 'Queued for merge', adopted_from: { number: from, url: 'https://x/' + from, author: 'odttlnt', state: 'open', text: '↳ adopted from #' + from } }, extra || {})); const noteOf = (sub) => (/]*>([^<]*)<\/span>/.exec(sub) || [])[1] || ''; const subsOf = (row) => row.split('
Ready for auto merge') && strip(row).includes('title="Awaiting merge admission — not yet admitted — soak 20m left · Next move: hive"'), 'chevron tooltip carries 080: ' + row); +assert.ok(row.includes('Queued for merge') && strip(row).includes('title="Awaiting merge admission — not yet admitted — soak 20m left · Next move: hive"'), 'chevron tooltip carries 080: ' + row); // PR regressed from the queue back to review-pending: Review lit, "Sent back" in the tooltip. row = stageTrackerRowHtml({ repo: 'acme/console', number: 103, kind: 'pr', stage: 70, modifiers: ['regressed', 'needs-rebase'], history: [{number:80,slug:'awaiting-merge-admission'},{number:100,slug:'merge-queue'},{number:70,slug:'fixing',from:100,regressed:true}] }, stages, ctx); @@ -559,7 +559,7 @@ assert.deepStrictEqual(segStates(row), ['active', T, T, T, T, T, 'todo cap']); // is what the chevron says, the actor is whose move it is. The active // chevron now leads with its stage icon, so the regex skips that svg. const prWords = {}; -for (const [st, word, actor] of [[50, 'CI / Review', 'hive'], [60, 'Review passed', 'hive'], [70, 'Fixing', 'author'], [71, 'Needs author', 'author'], [72, 'Returned to contributor', 'author'], [74, 'Adopted by hive', 'hive'], [80, 'Ready for auto merge', 'hive'], [85, 'Needs human decision', 'human'], [90, 'Ready for human merge', 'human'], [100, 'Merging', 'hive']]) { +for (const [st, word, actor] of [[50, 'CI / Review', 'hive'], [60, 'Review passed', 'hive'], [70, 'Fixing', 'author'], [71, 'Needs author', 'author'], [72, 'Returned to contributor', 'author'], [74, 'Adopted by hive', 'hive'], [80, 'Queued for merge', 'hive'], [85, 'Needs human decision', 'human'], [90, 'Ready for human merge', 'human'], [100, 'Merging', 'hive']]) { const r = stageTrackerRowHtml({ repo: 'acme/console', number: 500 + st, kind: 'pr', stage: st, author_kind: 'clanker' }, stages, ctx); if ([50, 60, 70, 71, 72, 74].includes(st)) { assert.ok(r.includes('data-track="ci"') && r.includes('data-track="review"'), 'pre-gate tracks remain separate at ' + st); diff --git a/src/pkg/dashboard/static-src/js/tracker-actions.js b/src/pkg/dashboard/static-src/js/tracker-actions.js index 7752bc80bb..9dcb6f83e6 100644 --- a/src/pkg/dashboard/static-src/js/tracker-actions.js +++ b/src/pkg/dashboard/static-src/js/tracker-actions.js @@ -2105,7 +2105,7 @@ }; const STAGE_TRACKER_ACTION_WORDS = { adopted: 'adopted', approved: 'approved', recommended: 'recommendation only', closed: 'closed', directed: 'direction recorded', refused: 'refused', 'decided-each': 'decided per PR', - merged: 'merged', 'queued-for-merge': 'approved — hive will merge on the next tick once CI is green', [STAGE_TRACKER_ACTION_REBASE_QUEUED]: 'rebase queued, merge to follow', + merged: 'merged', 'queued-for-merge': 'queued for merge — hive merges it on its next pass once CI is green', [STAGE_TRACKER_ACTION_REBASE_QUEUED]: 'rebase queued, merge to follow', held: 'held', released: 'hold released', rescanned: 'rescanned', 'triage-accepted': 'triage accepted', 'needs-human': 'marked needs-human', rerouted: 'rerouted', [STAGE_TRACKER_ACTION_NOOP]: 'no change', [STAGE_TRACKER_ACTION_NO_EFFECT]: 'no effect yet', }; diff --git a/src/pkg/dashboard/static-src/js/tracker-row-acted.js b/src/pkg/dashboard/static-src/js/tracker-row-acted.js index fe51617565..a9fdf2c3c9 100644 --- a/src/pkg/dashboard/static-src/js/tracker-row-acted.js +++ b/src/pkg/dashboard/static-src/js/tracker-row-acted.js @@ -49,7 +49,7 @@ case 'applied': return 'done' + (action.detail ? ' — ' + stageTrackerActedPlain(action.detail) : ''); case 'no-op': return 'nothing changed' + (action.detail ? ': ' + stageTrackerActedPlain(action.detail) : ''); case 'failed': return 'failed' + (action.detail ? ' — ' + stageTrackerActedPlain(action.detail) : ''); - case 'pending': return action.action === 'merge-now' ? 'rebasing, then merging…' : (action.action === 'queue-merge' ? 'approved — hive will merge on the next tick once CI is green' : 'the hive is deciding…'); + case 'pending': return action.action === 'merge-now' ? 'rebasing, then merging…' : (action.action === 'queue-merge' ? 'queued for merge — hive merges it on its next pass once CI is green' : 'the hive is deciding…'); case 'executing': return (action.detail ? stageTrackerActedPlain(action.detail) : 'decided — the hive is carrying it out…'); case 'no-effect': return "hasn't taken effect" + (action.detail ? ' — ' + stageTrackerActedPlain(action.detail) : ''); case 'blocked': return 'blocked' + (action.detail ? ' — ' + stageTrackerActedPlain(action.detail) : ''); diff --git a/src/pkg/dashboard/static-src/js/tracker-words-core.js b/src/pkg/dashboard/static-src/js/tracker-words-core.js index fa4bd49384..3034ed248f 100644 --- a/src/pkg/dashboard/static-src/js/tracker-words-core.js +++ b/src/pkg/dashboard/static-src/js/tracker-words-core.js @@ -165,7 +165,7 @@ // progress", "checks unreadable", "soak 30m // remaining"); drawn in CI / Review, since it // can still regress to 070 - // 080 Ready for auto merge — green and approved; waiting for hive's + // 080 Queued for merge — green and approved; waiting for hive's // merge pass: "next pass in 42s" // 095 Soaking — admitted; the soak window runs: "7m left" // 100 Merging — admitted and soaked; the merge is being @@ -175,14 +175,20 @@ // (stageTrackerGateCueHtml) says the same in a tooltip + aria-label. // STAGE_TRACKER_ACTIVE_WORD repeats the words literally (fixtures lift // it alone); stage_tracker_merge_gate_test.go pins the two equal. - const STAGE_TRACKER_MERGE_GATE_WORD = { 'gate-pending': 'Review passed', ready: 'Ready for auto merge', soaking: 'Soaking', merging: 'Merging', merged: 'Merged', 'merge-failed': 'Merge failed' }; + // One word for every "nothing left but the merge itself" state + // (hivecommons/hive#16653): 080, a merge-train seat, a recorded + // approval and a retryable refusal all read "Queued for merge · " so three adjacent approved rows do not read three ways. + // Spelled out in each table (tests lift the lines one at a time); + // Go's stageTrackerQueuedForMergeWord is the same string. + const STAGE_TRACKER_MERGE_GATE_WORD = { 'gate-pending': 'Review passed', ready: 'Queued for merge', soaking: 'Soaking', merging: 'Merging', merged: 'Merged', 'merge-failed': 'Merge failed' }; // merge_gate.merge_path (the merge call's issuer) in words (#15245). // A merge call (or a sweep's pass on a soaked PR) older than this says // "waiting for GitHub…" rather than spinning without a reason (#15808). const STAGE_TRACKER_MERGING_SLOW_MS = 60000; const STAGE_TRACKER_MERGE_PATH_WORDS = { sweep: 'automerge sweep', dashboard: 'maintainer merge from the dashboard', relay: 'hive-merge relay', forge: 'forge adapter', queue: 'merge queue' }; const STAGE_TRACKER_MERGE_FAILED_SHORT_MAX = 60; - const STAGE_TRACKER_ACTIVE_WORD = { 15: 'Triage needed', 17: 'Possibly exists', 60: 'Review passed', 80: 'Ready for auto merge', 95: 'Soaking', 100: 'Merging', 45: 'Needs human decision', 85: 'Needs human decision' }; + const STAGE_TRACKER_ACTIVE_WORD = { 15: 'Triage needed', 17: 'Possibly exists', 60: 'Review passed', 80: 'Queued for merge', 95: 'Soaking', 100: 'Merging', 45: 'Needs human decision', 85: 'Needs human decision' }; // Whose move it is on each lit chevron: 'author' = the PR's author kind, // 'claimant' = the live claim holder's kind; Open and Actionable carry none. const STAGE_TRACKER_ACTOR = { 15: 'human', 17: 'human', 20: 'claimant', 30: 'author', 40: 'author', 45: 'human', 50: 'hive', 60: 'hive', 70: 'author', 71: 'author', 72: 'author', 74: 'hive', 80: 'hive', 85: 'human', 90: 'human', 95: 'hive', 100: 'hive' }; @@ -240,13 +246,15 @@ return `${esc(label)}${STAGE_TRACKER_TRAIN_ICON_PATH}`; } // Pure: ordinal place words — "1st", "2nd", "3rd", "4th", "11th", - // "21st" (the owner's wording for the queue: "Merge queued · 1st"). + // "21st" (the queue word: "Queued for merge · 1st of 3"). // Every merge_train / merge_gate train state in words. A slug reaches a // chip only through this table (or stageTrackerTrainWord), never raw: // hive's own #15406 once read "front" (hivecommons/hive#15395). - // Both queue states read "Merge queued"; the place ("· 1st", "· 2nd") - // is what tells them apart — the owner could not parse "queued-behind". - const STAGE_TRACKER_TRAIN_STATE_WORD = { front: 'Merge queued', 'queued-behind': 'Merge queued', rebasing: 'Rebasing', 'rebase-exhausted': 'Needs human decision', 'duplicate-of': 'Duplicate of' }; + // Both queue states read "Queued for merge" — the same word as a + // queued PR off a train (hivecommons/hive#16653); the place ("· 1st of + // 3", "· 2nd of 3") is what tells them apart — the owner could not + // parse "queued-behind". + const STAGE_TRACKER_TRAIN_STATE_WORD = { front: 'Queued for merge', 'queued-behind': 'Queued for merge', rebasing: 'Rebasing', 'rebase-exhausted': 'Needs human decision', 'duplicate-of': 'Duplicate of' }; // merge_gate.state of a PR the queue holds because another open PR // fixes the same issue: "duplicate-of:15402" (merge_gate.duplicate_of // / duplicate_issue carry the numbers). @@ -314,9 +322,12 @@ // The blocker headline for a provisional train member, by stage — // the same words the stage column shows (stageTrackerShort in Go), so // the chevron and the caption name one blocker (hive's own #15577 read - // "Merge queued · 1st" while its caption said "check build-and-test + // "Queued for merge · 1st" while its caption said "check build-and-test // still running"). Keys below STAGE_TRACKER_MERGE_READY only. - const STAGE_TRACKER_PROVISIONAL_STAGE_WORD = { 10: 'Actionable', 20: 'Claimed', 30: 'PR in progress', 40: 'Covered by PR', 45: 'Needs human decision', 50: 'CI / Review', 60: 'Review passed', 70: 'Remediating', 71: 'Needs author', 72: 'Returned to contributor', 74: 'Adopted by hive' }; + // 080 flagged provisional by the server (the slot is held ahead of + // readiness) reads the pre-admission word, never "Queued for merge · + // queued 1st once ready" (hivecommons/hive#16653). + const STAGE_TRACKER_PROVISIONAL_STAGE_WORD = { 10: 'Actionable', 20: 'Claimed', 30: 'PR in progress', 40: 'Covered by PR', 45: 'Needs human decision', 50: 'CI / Review', 60: 'Review passed', 70: 'Remediating', 71: 'Needs author', 72: 'Returned to contributor', 74: 'Adopted by hive', 80: 'Review passed' }; // Pure: true when the row's queue slot is a forecast — the server says // so (merge_train.provisional), or, from an older server, the row's // own stage is short of the merge gate. @@ -448,7 +459,7 @@ return STAGE_TRACKER_TRAIN_STALLED_LEAD + what + (dur ? ' · ' + dur : ''); } // The chevron word for a train member ('' for a row not in a train). - // The queued word is the place with the queue length — "Merge queued + // The queued word is the place with the queue length — "Queued for merge // · 2nd of 3" — so it reads the same with the merge sweep on or off // (#15395); never the state slug, never "front" or "queued-behind", // and never '' for a state this table does not know: an unmapped slug diff --git a/src/pkg/dashboard/static-src/js/tracker-words-gate.js b/src/pkg/dashboard/static-src/js/tracker-words-gate.js index 4ac06300e8..a6b21c092b 100644 --- a/src/pkg/dashboard/static-src/js/tracker-words-gate.js +++ b/src/pkg/dashboard/static-src/js/tracker-words-gate.js @@ -259,7 +259,10 @@ } // Pure: the merge-failed pill. A refusal because required checks have // not reported is not a failure — the sweep called too early — so the - // chip reads "Waiting for CI · 4 checks"; a sweep retrying now reads + // chip reads "Queued for merge · after CI" (the check count rides the + // hover, the chip stays ≤ 5 words); a moved head or + // a pending protection rule reads "Queued for merge · needs rebase" / + // "· branch protection pending"; a sweep retrying now reads // "Merge failed · retrying"; otherwise "Merge failed · ". // The chip is a fixed short phrase (≤ 5 words); the tooltip carries the // plain sentence and GitHub's raw text after "Details:". @@ -277,13 +280,21 @@ const details = why ? ' Details: ' + why : ''; if (kind === 'checks-pending') { const tip = 'hive tried to merge this' + when + ' before its required checks had reported — ' + (text || "required checks haven't finished") + '. It merges once they pass' + (mg.sweep_running ? '; hive is on it now' : (nextWords ? ' (' + nextWords + ')' : '')) + '.' + lastSeen + details; - return { state, word: 'Waiting for CI', detail: checks > 0 ? checks + ' check' + (checks === 1 ? '' : 's') : '', tip, cue: mg.sweep_running ? 'running' : 'waiting', until: 0 }; + return { state, word: 'Queued for merge', detail: 'after CI', tip, cue: mg.sweep_running ? 'running' : 'waiting', until: 0 }; } const word = STAGE_TRACKER_MERGE_GATE_WORD[state]; const sentence = 'hive tried to merge this' + when + ' and GitHub refused' + (text ? ' — ' + text : '') + '.'; if (mg.sweep_running) { return { state, word, detail: 'retrying', tip: sentence + ' hive is retrying it now.' + lastSeen + details, cue: 'running', until: 0 }; } + // Refusals the lane clears on its own next pass (the head moved, a + // protection rule still has something pending) are not failures the + // reader must fix: the chip stays "Queued for merge · " + // (hivecommons/hive#16653); the hover still says GitHub refused. + const queuedDetail = { 'head-moved': 'needs rebase', protection: 'branch protection pending' }[kind]; + if (queuedDetail) { + return { state, word: 'Queued for merge', detail: queuedDetail, tip: sentence + ' Still queued: the lane retries it on its next pass' + (nextWords ? ' (' + nextWords + ')' : '') + '.' + lastSeen + details, cue: 'waiting', until: 0 }; + } return { state, word, detail: STAGE_TRACKER_MERGE_REFUSAL_DETAIL[kind] || 'GitHub refused', tip: sentence + ' The lane re-evaluates it on its next pass' + (nextWords ? ' (' + nextWords + ')' : '') + '.' + lastSeen + details, cue: 'waiting', until: 0 }; } // Pure: the hover note for a refusal that belongs to an earlier head @@ -309,7 +320,7 @@ if (!line) return 'GitHub refused the merge'; return line.length > STAGE_TRACKER_MERGE_FAILED_SHORT_MAX ? line.slice(0, STAGE_TRACKER_MERGE_FAILED_SHORT_MAX - 1).trimEnd() + '…' : line; } - // Pure: the pill word with its live detail — "Ready for auto merge · + // Pure: the pill word with its live detail — "Queued for merge · // next pass in 42s". The detail span carries data-ham-until so the // countdown ticks in place. function stageTrackerMergeGateWordHtml(item, nowMs, trains) { diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html index a09cf5b522..3f924a52b6 100644 --- a/src/pkg/dashboard/static/index.html +++ b/src/pkg/dashboard/static/index.html @@ -15560,7 +15560,7 @@

Where to get help

// progress", "checks unreadable", "soak 30m // remaining"); drawn in CI / Review, since it // can still regress to 070 - // 080 Ready for auto merge — green and approved; waiting for hive's + // 080 Queued for merge — green and approved; waiting for hive's // merge pass: "next pass in 42s" // 095 Soaking — admitted; the soak window runs: "7m left" // 100 Merging — admitted and soaked; the merge is being @@ -15570,14 +15570,20 @@

Where to get help

// (stageTrackerGateCueHtml) says the same in a tooltip + aria-label. // STAGE_TRACKER_ACTIVE_WORD repeats the words literally (fixtures lift // it alone); stage_tracker_merge_gate_test.go pins the two equal. - const STAGE_TRACKER_MERGE_GATE_WORD = { 'gate-pending': 'Review passed', ready: 'Ready for auto merge', soaking: 'Soaking', merging: 'Merging', merged: 'Merged', 'merge-failed': 'Merge failed' }; + // One word for every "nothing left but the merge itself" state + // (hivecommons/hive#16653): 080, a merge-train seat, a recorded + // approval and a retryable refusal all read "Queued for merge · " so three adjacent approved rows do not read three ways. + // Spelled out in each table (tests lift the lines one at a time); + // Go's stageTrackerQueuedForMergeWord is the same string. + const STAGE_TRACKER_MERGE_GATE_WORD = { 'gate-pending': 'Review passed', ready: 'Queued for merge', soaking: 'Soaking', merging: 'Merging', merged: 'Merged', 'merge-failed': 'Merge failed' }; // merge_gate.merge_path (the merge call's issuer) in words (#15245). // A merge call (or a sweep's pass on a soaked PR) older than this says // "waiting for GitHub…" rather than spinning without a reason (#15808). const STAGE_TRACKER_MERGING_SLOW_MS = 60000; const STAGE_TRACKER_MERGE_PATH_WORDS = { sweep: 'automerge sweep', dashboard: 'maintainer merge from the dashboard', relay: 'hive-merge relay', forge: 'forge adapter', queue: 'merge queue' }; const STAGE_TRACKER_MERGE_FAILED_SHORT_MAX = 60; - const STAGE_TRACKER_ACTIVE_WORD = { 15: 'Triage needed', 17: 'Possibly exists', 60: 'Review passed', 80: 'Ready for auto merge', 95: 'Soaking', 100: 'Merging', 45: 'Needs human decision', 85: 'Needs human decision' }; + const STAGE_TRACKER_ACTIVE_WORD = { 15: 'Triage needed', 17: 'Possibly exists', 60: 'Review passed', 80: 'Queued for merge', 95: 'Soaking', 100: 'Merging', 45: 'Needs human decision', 85: 'Needs human decision' }; // Whose move it is on each lit chevron: 'author' = the PR's author kind, // 'claimant' = the live claim holder's kind; Open and Actionable carry none. const STAGE_TRACKER_ACTOR = { 15: 'human', 17: 'human', 20: 'claimant', 30: 'author', 40: 'author', 45: 'human', 50: 'hive', 60: 'hive', 70: 'author', 71: 'author', 72: 'author', 74: 'hive', 80: 'hive', 85: 'human', 90: 'human', 95: 'hive', 100: 'hive' }; @@ -15635,13 +15641,15 @@

Where to get help

return `${esc(label)}${STAGE_TRACKER_TRAIN_ICON_PATH}`; } // Pure: ordinal place words — "1st", "2nd", "3rd", "4th", "11th", - // "21st" (the owner's wording for the queue: "Merge queued · 1st"). + // "21st" (the queue word: "Queued for merge · 1st of 3"). // Every merge_train / merge_gate train state in words. A slug reaches a // chip only through this table (or stageTrackerTrainWord), never raw: // hive's own #15406 once read "front" (hivecommons/hive#15395). - // Both queue states read "Merge queued"; the place ("· 1st", "· 2nd") - // is what tells them apart — the owner could not parse "queued-behind". - const STAGE_TRACKER_TRAIN_STATE_WORD = { front: 'Merge queued', 'queued-behind': 'Merge queued', rebasing: 'Rebasing', 'rebase-exhausted': 'Needs human decision', 'duplicate-of': 'Duplicate of' }; + // Both queue states read "Queued for merge" — the same word as a + // queued PR off a train (hivecommons/hive#16653); the place ("· 1st of + // 3", "· 2nd of 3") is what tells them apart — the owner could not + // parse "queued-behind". + const STAGE_TRACKER_TRAIN_STATE_WORD = { front: 'Queued for merge', 'queued-behind': 'Queued for merge', rebasing: 'Rebasing', 'rebase-exhausted': 'Needs human decision', 'duplicate-of': 'Duplicate of' }; // merge_gate.state of a PR the queue holds because another open PR // fixes the same issue: "duplicate-of:15402" (merge_gate.duplicate_of // / duplicate_issue carry the numbers). @@ -15709,9 +15717,12 @@

Where to get help

// The blocker headline for a provisional train member, by stage — // the same words the stage column shows (stageTrackerShort in Go), so // the chevron and the caption name one blocker (hive's own #15577 read - // "Merge queued · 1st" while its caption said "check build-and-test + // "Queued for merge · 1st" while its caption said "check build-and-test // still running"). Keys below STAGE_TRACKER_MERGE_READY only. - const STAGE_TRACKER_PROVISIONAL_STAGE_WORD = { 10: 'Actionable', 20: 'Claimed', 30: 'PR in progress', 40: 'Covered by PR', 45: 'Needs human decision', 50: 'CI / Review', 60: 'Review passed', 70: 'Remediating', 71: 'Needs author', 72: 'Returned to contributor', 74: 'Adopted by hive' }; + // 080 flagged provisional by the server (the slot is held ahead of + // readiness) reads the pre-admission word, never "Queued for merge · + // queued 1st once ready" (hivecommons/hive#16653). + const STAGE_TRACKER_PROVISIONAL_STAGE_WORD = { 10: 'Actionable', 20: 'Claimed', 30: 'PR in progress', 40: 'Covered by PR', 45: 'Needs human decision', 50: 'CI / Review', 60: 'Review passed', 70: 'Remediating', 71: 'Needs author', 72: 'Returned to contributor', 74: 'Adopted by hive', 80: 'Review passed' }; // Pure: true when the row's queue slot is a forecast — the server says // so (merge_train.provisional), or, from an older server, the row's // own stage is short of the merge gate. @@ -15843,7 +15854,7 @@

Where to get help

return STAGE_TRACKER_TRAIN_STALLED_LEAD + what + (dur ? ' · ' + dur : ''); } // The chevron word for a train member ('' for a row not in a train). - // The queued word is the place with the queue length — "Merge queued + // The queued word is the place with the queue length — "Queued for merge // · 2nd of 3" — so it reads the same with the merge sweep on or off // (#15395); never the state slug, never "front" or "queued-behind", // and never '' for a state this table does not know: an unmapped slug @@ -16716,7 +16727,10 @@

Where to get help

} // Pure: the merge-failed pill. A refusal because required checks have // not reported is not a failure — the sweep called too early — so the - // chip reads "Waiting for CI · 4 checks"; a sweep retrying now reads + // chip reads "Queued for merge · after CI" (the check count rides the + // hover, the chip stays ≤ 5 words); a moved head or + // a pending protection rule reads "Queued for merge · needs rebase" / + // "· branch protection pending"; a sweep retrying now reads // "Merge failed · retrying"; otherwise "Merge failed · ". // The chip is a fixed short phrase (≤ 5 words); the tooltip carries the // plain sentence and GitHub's raw text after "Details:". @@ -16734,13 +16748,21 @@

Where to get help

const details = why ? ' Details: ' + why : ''; if (kind === 'checks-pending') { const tip = 'hive tried to merge this' + when + ' before its required checks had reported — ' + (text || "required checks haven't finished") + '. It merges once they pass' + (mg.sweep_running ? '; hive is on it now' : (nextWords ? ' (' + nextWords + ')' : '')) + '.' + lastSeen + details; - return { state, word: 'Waiting for CI', detail: checks > 0 ? checks + ' check' + (checks === 1 ? '' : 's') : '', tip, cue: mg.sweep_running ? 'running' : 'waiting', until: 0 }; + return { state, word: 'Queued for merge', detail: 'after CI', tip, cue: mg.sweep_running ? 'running' : 'waiting', until: 0 }; } const word = STAGE_TRACKER_MERGE_GATE_WORD[state]; const sentence = 'hive tried to merge this' + when + ' and GitHub refused' + (text ? ' — ' + text : '') + '.'; if (mg.sweep_running) { return { state, word, detail: 'retrying', tip: sentence + ' hive is retrying it now.' + lastSeen + details, cue: 'running', until: 0 }; } + // Refusals the lane clears on its own next pass (the head moved, a + // protection rule still has something pending) are not failures the + // reader must fix: the chip stays "Queued for merge · " + // (hivecommons/hive#16653); the hover still says GitHub refused. + const queuedDetail = { 'head-moved': 'needs rebase', protection: 'branch protection pending' }[kind]; + if (queuedDetail) { + return { state, word: 'Queued for merge', detail: queuedDetail, tip: sentence + ' Still queued: the lane retries it on its next pass' + (nextWords ? ' (' + nextWords + ')' : '') + '.' + lastSeen + details, cue: 'waiting', until: 0 }; + } return { state, word, detail: STAGE_TRACKER_MERGE_REFUSAL_DETAIL[kind] || 'GitHub refused', tip: sentence + ' The lane re-evaluates it on its next pass' + (nextWords ? ' (' + nextWords + ')' : '') + '.' + lastSeen + details, cue: 'waiting', until: 0 }; } // Pure: the hover note for a refusal that belongs to an earlier head @@ -16766,7 +16788,7 @@

Where to get help

if (!line) return 'GitHub refused the merge'; return line.length > STAGE_TRACKER_MERGE_FAILED_SHORT_MAX ? line.slice(0, STAGE_TRACKER_MERGE_FAILED_SHORT_MAX - 1).trimEnd() + '…' : line; } - // Pure: the pill word with its live detail — "Ready for auto merge · + // Pure: the pill word with its live detail — "Queued for merge · // next pass in 42s". The detail span carries data-ham-until so the // countdown ticks in place. function stageTrackerMergeGateWordHtml(item, nowMs, trains) { @@ -18823,7 +18845,7 @@

Where to get help

case 'applied': return 'done' + (action.detail ? ' — ' + stageTrackerActedPlain(action.detail) : ''); case 'no-op': return 'nothing changed' + (action.detail ? ': ' + stageTrackerActedPlain(action.detail) : ''); case 'failed': return 'failed' + (action.detail ? ' — ' + stageTrackerActedPlain(action.detail) : ''); - case 'pending': return action.action === 'merge-now' ? 'rebasing, then merging…' : (action.action === 'queue-merge' ? 'approved — hive will merge on the next tick once CI is green' : 'the hive is deciding…'); + case 'pending': return action.action === 'merge-now' ? 'rebasing, then merging…' : (action.action === 'queue-merge' ? 'queued for merge — hive merges it on its next pass once CI is green' : 'the hive is deciding…'); case 'executing': return (action.detail ? stageTrackerActedPlain(action.detail) : 'decided — the hive is carrying it out…'); case 'no-effect': return "hasn't taken effect" + (action.detail ? ' — ' + stageTrackerActedPlain(action.detail) : ''); case 'blocked': return 'blocked' + (action.detail ? ' — ' + stageTrackerActedPlain(action.detail) : ''); @@ -24344,7 +24366,7 @@

All labels

}; const STAGE_TRACKER_ACTION_WORDS = { adopted: 'adopted', approved: 'approved', recommended: 'recommendation only', closed: 'closed', directed: 'direction recorded', refused: 'refused', 'decided-each': 'decided per PR', - merged: 'merged', 'queued-for-merge': 'approved — hive will merge on the next tick once CI is green', [STAGE_TRACKER_ACTION_REBASE_QUEUED]: 'rebase queued, merge to follow', + merged: 'merged', 'queued-for-merge': 'queued for merge — hive merges it on its next pass once CI is green', [STAGE_TRACKER_ACTION_REBASE_QUEUED]: 'rebase queued, merge to follow', held: 'held', released: 'hold released', rescanned: 'rescanned', 'triage-accepted': 'triage accepted', 'needs-human': 'marked needs-human', rerouted: 'rerouted', [STAGE_TRACKER_ACTION_NOOP]: 'no change', [STAGE_TRACKER_ACTION_NO_EFFECT]: 'no effect yet', };