Repository navigation
π contributor lane: recognise the cncf/prow-github-actions ok-to-test refusal - #18838
Merged
hivecommons-hive[bot] merged 1 commit intoNov 17, 2026
Conversation
β¦ refusal The lane stopped posting /ok-to-test only on upstream Prow's "Cannot trigger testing until a trusted user" reply naming @<app>. cncf/prow-github-actions answers "Cannot /ok-to-test because Error: <app> is not a reviewer or approver ..." with no @, so the hive posted the command again on every head and never left the needs-human note (projectbluefin/chairlift#802, projectbluefin/utah#1274, hivecommons#1313). Recognise both forms (naming the App), quote the matched wording in the notes, and in the fork lane treat a command for an earlier head that is past the 10m grace with no ok-to-test label and no Prow presubmit on that head as refused, whatever the bot said. 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
Contributor
|
[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 |
This was referenced Nov 17, 2026
Contributor
Open PR overlap checkβ
Resolved: no conflicting open PRs or same-file overlaps remain against |
Contributor
This was referenced Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The contributor lane posts
/ok-to-teston an admitted non-member fork PR once per head, and stops for good once the merge bot refuses the Hive App. It only recognised upstream Prow's refusal. Repositories that run Prow commands through cncf/prow-github-actions reply in different words, so the hive posted the command again on every new head, was refused every time, and never left the needs-human note asking a person to post it.This PR recognises the action's refusal too. It also adds a wording-proof fallback: a command for an earlier head that had no effect after 10 minutes counts as refused, whatever the bot said or didn't say.
What happened
Each of these is a fork PR by a non-member. Every post was refused within a minute with exactly
Cannot /ok-to-test because Error: hivecommons-hive[bot] is not a reviewer or approver for any changed file. None got ahive-ok-to-test-rejectednote. Times are Eastern.mergeraptor[bot]).github-actions[bot]).Cause
workflowApprovalCommentState(automerge_held_runs.go) setrejectedonly when a non-App comment contained Prow'sCannot trigger testing until a trusted userand@<app-login>.cncf/prow-github-actions builds its reply as
`Cannot ${command} because ${e}`(src/issueComment/trigger.ts, v3.5.0). The error names the commenter with no@(src/utils/auth.ts). Neither condition matched, and each new head carried no per-head marker yet, so the lane posted again.What changed
Both refusal forms (
okToTestRefusal):@<app>, as before;Cannot /ok-to-test becauseand names the App login, with or without@.Either must name the App, so a refusal of a contributor's own
/ok-to-testdoes not count. As with Prow's check, the author is not restricted beyond not being the App. The reader serves the fork lane and the same-repo held-runs path, so both pick it up.The notes quote the wording that matched. Prow's note is byte-identical to before.
Fallback, fork lane only (
okToTestUnanswered): the command counts as refused when all of these hold:workflowApprovalGrace(10m) old;ok-to-testlabel (the trigger plugin's label persists across pushes);prowPresubmitStatusPresent).Then the lane does not post again and leaves the one note, which says the earlier post had no effect rather than quoting a refusal. A failed status lookup counts as "a presubmit is present", so nothing is concluded from evidence it could not read.
Reused, not added:
markWorkflowApprovalUntrusted, thehive-ok-to-test-rejectednote andskipped=prow-rejects-bot-commands. No new setting, label or marker.Docs:
hive-merge.md(the paragraph that promised the stop for Prow's wording only) andfork-pr-presubmit-stall-runbook.mdname both wordings and the fallback.Not in this PR
/ok-to-testis posted is unchanged. So is the same-repohive-ok-to-testworkflow route.Tests
TestOkToTestRefusal:@<app>;TestContributorLaneStopsProwOkToTestAfterProwActionsRefusal: across two runs (a restart), exactly one note, quoting the action's wording.TestContributorLaneTreatsUnansweredProwOkToTestAsRefused:ok-to-testlabel present gets nothing.TestTrySweepSelfAuthoredPRStopsOkToTestAfterProwActionsRefusal: the same-repo path stops on the action's wording and its note quotes it.commits/<sha>/statusesfor earlier heads (earlierStatuses).Only
gofmt -lwas run locally (AGENTS.md bans localgo test/go build/go vet); CI runs the tests.π€ Generated with Claude Code
https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1