Skip to content

🐛 fix(dashboard): a new PR on an auto-merge-off repo says a person merges it instead of waiting for a stage pass that never comes - #17550

Merged
hivecommons-hive[bot] merged 2 commits into
hivecommons:v6from
Danathar:fix/tracker-auto-merge-off-new
Nov 10, 2026

Conversation

@Danathar

@Danathar Danathar commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

On a repo whose auto-merge is off, a new pull request in the Activity Monitor said "New · waiting for the stage-label pass (→ 050 review pending) (next pass due now)" for days. That pass never comes there, because every merge lane skips such a repo before it records anything. This PR makes the row honest: no countdown, no stage-label pass, a final gate that says a person merges it, and the merge verdict. When GitHub would take the merge, the row leads with Merge now as maintainer. Dashboard-only: no lane, merge-path or label changes.

What went wrong

  • On the projectbluefin hive, auto-merge is off for common, server, actions, website and documentation. Their open PRs carry no stage/* label and have no stage record. For example, fix: stop false build safety failures projectbluefin/server#626 has read "next pass due now" since 2026-11-05, and ci: run zizmor as an Audit GitHub Actions job projectbluefin/actions#726 (opened by the hive itself) did the same until it was merged by hand.
  • It is not the write-back gate: a hive-authored PR is never gated, and contributor PRs on that hive's auto-merge-on repos do get stage labels.
  • The cause is that the four merge lanes continue past an auto-merge-off repo before recordStage. With no lane observation the stage engine abstains, and the tracker falls back to the 000-new narration, which always names the stage-label pass. Below ACMM L6, config.RepoAutoMergeEnabled is false for every repo, so the same applies to every PR on those hives.
  • Actually staging these PRs needs a change in the lanes and an owner decision. That is written up separately; this PR only stops the row from promising something that never happens.

What changes

  • New narration on auto-merge-off repos. For a 000-new PR where RepoAutoMergeEnabled(repo) is false, the narration (stageTrackerAutoMergeOffNew):
    • sets new.auto_merge_off;
    • drops next_pass_at, so the SPA no longer prints "next hive pass due now";
    • ends with a human-merge gate: "auto-merge is off for this repo (its auto-merge setting, or the hive is below ACMM L6) — a person merges it";
    • quotes the governor's merge verdict in the gates.
  • The text is true below L6 too. The gate sentence names both causes, the same wording the merge verdict already uses, so no L6 scoping is needed.
  • Who moves next.
    • Maintainer, only when the verdict is a hand merge: an outstanding verdict, meaning GitHub would take the merge and only the switch (or a hive gate on top of it) holds it. The caption reads "New · auto-merge off — a person merges it". The row gets a decision like 090 · auto-merge off: Merge now as maintainer leads, Approve and let hive merge is greyed ("Auto-merge is off for this repo; hive never merges here — merge it now as maintainer", the existing 090 auto-merge-off reason), plus Close as won't fix and Hold. So TestStageTrackerMaintainerRowsHaveLeadAction's rule holds: every maintainer-moved row has an enabled lead action. Merge now is the existing gated path (merger/owner role, the author cannot merge their own PR, head pinned, confirm dialog).
    • Hive, for every other PR (red CI, conflicts, no verdict yet). It is still in CI / review, as the old narration said, and the person's merge is the later gate. I didn't give these rows a maintainer mover because there is no real action to lead with yet, and the your-turn chip already flags the ones that need a person.
  • Offline-clanker clause skipped. The "a green PR is reviewed and merged without its author" clause is not appended on these rows, because no lane merges there.

Files

  • src/pkg/dashboard/stage_tracker_new.go: AutoMergeOff field, stageTrackerAutoMergeOffNew, gate text.
  • src/pkg/dashboard/stage_tracker_build.go: applies it in addPR when the repo's auto-merge is off; skips the offline-clanker clause there.
  • src/pkg/dashboard/stage_tracker_decision.go, stage_tracker_decision_human_merge.go: decisionForAutoMergeOffNew.
  • src/docs/dashboard-sections/activity-monitor.md: the narration, plus auto_merge_off in the new{} payload list.
  • changelog.d/fixed-tracker-auto-merge-off-new-pr.md.

Tests

Not run locally (AGENTS.md); CI is the verdict.

  • TestStageTrackerAutoMergeOffNewPRNamesThePersonsMerge (new). L6, acme/console with auto_merge: false, governor kick already past.
    • A hand-merge PR gets: no stage-label pass, no countdown, the human-merge gate, maintainer mover, Merge now leading, queue greyed, and an enabled lead in the SPA's stageTrackerLeadAction.
    • A blocked PR gets the hive mover with "CI failing: zizmor" in its gate.
    • On the v6 tip this fails: both rows read "… stage-label pass … (next pass due now)", carry next_pass_at, and have no decision (New.AutoMergeOff and the gate constant don't exist yet).
  • TestStageTrackerAutoMergeOffNewFollowsTheEffectiveSwitch (new).
    • At ACMM 5 with no per-repo policy, the row reads auto-merge off.
    • At L6 with the switch on, the old stage-label-pass narration is unchanged and there is no decision.
    • On the tip the below-L6 half fails.
  • stage_tracker_offline_clanker_test.go: the fixture now sets ACMM 6. With the old Config{} (level 0) every repo reads auto-merge off, and that test is about the stage-label-pass caption on a repo where the lanes run.

Refs #15122 (the write-back gate, ruled out as the cause).

🤖 Generated with Claude Code

https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1

…rges it

Every merge lane skips a repo whose auto-merge is off (its per-repo
switch, or any repo of a hive below ACMM L6) before it records stage
evidence, so no stage-label pass ever places a PR there. The Activity
Monitor still read "New · waiting for the stage-label pass (→ 050 review
pending) (next pass due now)" on such PRs for days
(projectbluefin/server#626).

The 000-new narration on those repos now drops the countdown and the
stage-label pass, ends at a human-merge gate ("auto-merge is off for this
repo ... — a person merges it") and quotes the merge verdict. When the
verdict is a hand merge, the maintainer is the next mover and the row
leads with Merge now as maintainer; otherwise the hive stays the next
mover for CI and review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 10, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

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

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

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v6

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

PR Title Relation Files
#17506 🌱 Top up v6 with v5 (durable hosted hive.yaml, shared-CI deferral naming and 118 more) same files src/docs/dashboard-sections/activity-monitor.md
src/pkg/dashboard/stage_tracker_build.go
src/pkg/dashboard/stage_tracker_decision.go

…insensitively

The greyed 'Approve and let hive merge' option reuses the 090 auto-merge-off
reason, which starts with a capital A.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
@hivecommons-hive

hivecommons-hive Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

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

Reviewed by reviewer-2 — no findings.

Reviewer notes

Read the non-test diff against the v6 tree and the SPA. This looks correct to me; no findings.

What I checked:

  • Ordering in addPR (src/pkg/dashboard/stage_tracker_build.go): applyStageTrackerNew runs at ~445 and stageTrackerDecisionNeededWith at ~495, so the new it.New.AutoMergeOff && NextMover == maintainer case in stage_tracker_decision.go:216 sees a populated it.New.
  • cfg.RepoAutoMergeEnabled(repoName) is passed the short repo name while neighbouring cfg.* calls use qualifyRepo(repoName). That is fine here: RepoPolicyFor (pkg/config/repo_policy.go:86-101) keys through repoPauseKey(c.Project.Org, repo) which normalises short names, and status_builder.go:2604 already calls it with the same bare repoName.
  • Countdown removal is real end-to-end: NextPassAt is nilled server-side, and the row tooltip (static-src/js/tracker-row.js:372-376) only renders "next hive pass …" from fresh.next_pass_at. The governor-kick fallback at tracker-actions.js:346-348 is the issue-triage hint path, not the PR row, so no stale "due now" leaks back in.
  • The human-merge gate merge (stageTrackerAutoMergeOffNew) keeps an existing breaking/needs-owner-merge gate text by prepending it, matching the gate stageTrackerNewState appends at stage_tracker_new.go:147.

Body and diff agree: dashboard-only, no lane or label changes.

Evidence bundle `#17550ef97ff5` sha256:3d9bd07e96ff04132e0023e2e374a78dd6d2a6cf3b2a38b07ef63fea4b21b87c — download from the dashboard or `hivectl review evidence #17550`.

@hivecommons-hive
hivecommons-hive Bot merged commit c70bdaa into hivecommons:v6 Nov 10, 2026
69 of 71 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant