Repository navigation
🐛 090 and workflow-fence comments: name auto-merge off, and no /lgtm without Prow - #18843
Conversation
…without Prow On a repository whose hive auto-merge is off, the 090 comment said "Blocked only by `role/trusted`" and offered /lgtm /approve even where no Prow runs, and the workflow-fence approval comment said "the hive merges this PR itself". The 090 comment now states a non-trust reason in the dashboard's words (moved to prstage.HumanMergeReasonWords so both read one table), asks for a GitHub approve and merge when the PR wears none of Prow's labels, and the fence comment says a person merges on an auto-merge-off repository. Text only; routing is unchanged. Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap check✅ Resolved: no conflicting open PRs or same-file overlaps remain against |
| held() | ||
| } | ||
| b.WriteString("\n\n<sub>The hive never merges this lane's changes itself: click **Merge** (or `/lgtm` + `/approve` for tide) to land it.</sub>") | ||
| if r.NoProw { |
There was a problem hiding this comment.
Nit (advisory): this if/else duplicates the whole sentence for one clause. Consider building the tail once, e.g. tail := "click **Merge**"; if !r.NoProw { tail += " (or /lgtm+/approve for tide)" }, so the two variants cannot drift.
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. Review findings from Correctness review at 4c063db. The words refactor is behaviour-preserving; the problems are in the conditions that choose the new text. Both have inline threads with fixes.
Tests cover the wording only. None covers a Prow repo whose PR carries no size/ label, so finding 1 would pass them all. Findings not on a changed line
Review findings from HUMAN DECISION NEEDED — intent-alignment review could not run (GitHub API hourly cap reached); please re-dispatch after the cap resets. I could not read the diff or the 4c063db..78036e7 delta (96 files, 5650 lines). Every Review findings from Read the diff against the tree ( One open question, not a defect: I did not run anything; CI is the verdict. Review findings from The change does what the body says: I read Findings not on a changed line
merged by Hive trusted-author auto-merge: author |
|
@Danathar this PR is back in your court ( Review asks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Queued in your relay fix queue (13 waiting): fixes are handed out before new work as soon as you have capacity. |
There was a problem hiding this comment.
Delta re-review at 78036e7. The four earlier findings are all still present, none fixed:
- Fence comment 'off' vs 'not allowed': still present.
automerge_contributor_workflow_approval.go:160uses!repoAutoMergeAllowed. That is also false for below-L6 and bad merge_strategy, whererepoObservedOnlyis false (automerge_sweep.go:672-677). Usec.repoObservedOnly(displayRepo). - NoProw from PR labels: still present at
automerge_stage_human.go:746. A Prow repo with an unlabelled PR is told to approve and merge on GitHub. - Wider 090 wording: still present.
readyCommentRouteappliesHumanMergeWhyto all non-trust reasons (automerge_stage_human.go:735). - Style, duplicated NoProw wording: still present (low). The manual-merge branch in
stagelabels/human.go(~L955) still hardcodes the Prow and no-Prow strings instead of reusingreadyCommentAccept/approve.
— hive: agent=adjudicator backend=claude model=claude-sonnet-5-5 claude=2.1.326
| // The merge relay's lane gate evaluates on the live engine even for | ||
| // an auto-merge-off repo, so the comment must not promise a hive | ||
| // merge there (projectbluefin/actions#752). | ||
| if err := c.commentWorkflowApproval(ctx, owner, repo, number, headSHA, approval, verdictState, !c.repoAutoMergeAllowed(displayRepo)); err != nil { |
There was a problem hiding this comment.
Gate on the switched-off state, not 'not allowed':
| if err := c.commentWorkflowApproval(ctx, owner, repo, number, headSHA, approval, verdictState, !c.repoAutoMergeAllowed(displayRepo)); err != nil { | |
| if err := c.commentWorkflowApproval(ctx, owner, repo, number, headSHA, approval, verdictState, c.repoObservedOnly(displayRepo)); err != nil { |
| route.HumanMergeWhy = why | ||
| } | ||
| } | ||
| route.NoProw = !hgithub.ProwManagedLabels(obs.Labels) |
There was a problem hiding this comment.
NoProw is inferred from this PR's labels, so an unlabelled PR in a Prow repo gets the no-Prow wording. Use a per-repo Prow signal.
…0 manual-merge line (#18862) Follow-up to the hive review of #18843 (merged before it was addressed): - The fence comment is gated on !repoAutoMergeAllowed, which is also true below L6 and for an invalid merge_strategy, where the hive does not merge either. Keep that gate (repoObservedOnly would bring back "the hive merges this PR itself" below L6) and word the note so it is true in every case. - Build the 090 manual-merge closing line once, so the Prow and no-Prow variants cannot drift. Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Summary
On a repository whose hive auto-merge is off, two hive comments describe the wrong merge path:
role/trusted" and asks for/lgtm/approve, even in repositories that run no Prow.With this PR:
This changes comment text only. Routing, stages, and which repositories have auto-merge off are unchanged.
What happened
Seen on projectbluefin, where actions, common, documentation, server and website have hive auto-merge off. actions and website run no Prow. Times are Eastern.
role/trusted. …/lgtm/approve(or merge) if you accept it." The same text appears on chore(deps): update the code-style checker to version 10 and apply its formatting projectbluefin/website#1038 and feat: goose CLI + nav fix + provider env vars #1040, and on fix(setup-runner): keep downloaded packages so apt cache hits install offline projectbluefin/actions#757 and test: CDP UI checks + content quality at every phase #762./lgtmdoes nothing in those repositories.Cause
090 comment
postHumanEntrybuilds the comment withtrustCause(obs.Reason, role).trustCausehas no case forrepo-auto-merge-disabled, so it falls through to the bare role label.prstage.HumanMergeReasonmaps it toauto-merge-off, and the dashboard shows it. The comment never used it./lgtm/approve.Fence comment
workflowApprovalCommentalways promised a hive merge.What changed
Shared words (
prstage/reasons.go)prstage.HumanMergeReasonWords.stage_tracker_caption.go,stage_tracker_actor.go) read it from there, and so does the 090 comment. The strings themselves are unchanged.090 comment (
stagelabels/human.go,automerge_stage_human.go)Routegains two fields, whichpostHumanEntryfills throughreadyCommentRoute:HumanMergeWhy: the sentence for a reason other than the author's trust (auto-merge off, merge method, branch protection, App permission, reviewer deferred). It replaces "Blocked only byrole/…".NoProw: set when the PR carries none of the labels inProwManagedLabels(approved,size/*,do-not-merge/*,ok-to-test,needs-ok-to-test,tide/*). The hive already uses this function for its dashboard approvals.policyfallback), keeptrustCause, so the text is unchanged there.NoProw, every closing line drops/lgtm/approve:/lgtm+/approvefor tide)".Fence comment (
automerge_contributor_workflow_approval.go)workflowApprovalCommenttakes the repository's auto-merge state, fromrepoAutoMergeAllowed(displayRepo).Docs and changelog
stage-labels.mdgets a 090 row for the non-trust reasons and a note on when the closing line asks for/lgtm.operator-reference/README.mdnotes the fence comment's wording on auto-merge-off repositories.Related
config.RepoAutoMergeEnabled, which is also what the automerge engine'srepoAutoMergeAllowedreads. The two PRs touch different files.Not in this PR
Tests
stagelabels/ready_wording_test.go:ReadyCommentwith Prow and without, across five cases: trust, auto-merge off (with and without behind-base), behind-base, held, and manual merge. The Prow cases keep today's text exactly.automerge_stage_ready_wording_test.go:readyCommentRouteforrepo-auto-merge-disabled, with and without asize/Mlabel;workflowApprovalCommentwith auto-merge on and off, for every verdict state and for carried approvals.prstage/human_merge_words_test.go: every human-merge code exceptpolicyhas words.automerge_stage_ready_status_test.go: its fixture PR has no Prow labels, so the folded 090 line now asks for a GitHub approve and merge;workflowApprovalCommentcall sites now passfalse, which keeps their text.Only
gofmt -lwas run locally (AGENTS.md bans localgo test/go build/go vet); this PR's CI is the test run.🤖 Generated with Claude Code
https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1