Repository navigation
π stage: a refused shared-CI re-run no longer hides the PR's real blocker - #19024
Merged
hivecommons-hive[bot] merged 1 commit intoNov 18, 2026
Conversation
β¦blocker The rerun 403 (`unauthorized:rerun-shared-ci`, hivecommons#16277) replaced the stage, reason and route of every PR whose exact head it was refused for, whatever held the PR: on projectbluefin it showed "re-run CI" over a reviewer's changes request (utah#1313), a withheld security approval (utah-packages#1013) and high-risk decision requests. It was meant to keep an infrastructure failure out of source fixing, not to outrank review gates. RecoveryUnauthorizedOwnsStage lets it take the stage only when CI is what holds the PR (a red/pending check, a shared-CI or base-branch-red deferral, a red optional check) and no review gate stands; it is used by both the stage-label pass and DerivePR. The hive:unauthorized label and comment are still written either way. 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 |
Contributor
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
Contributor
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
When the shared-CI rerun is refused (403, because the App has no Actions write, which is an owner decision), the PR's stage became
unauthorized:rerun-shared-ciat 085. That happened whatever was actually holding the PR, so a maintainer reading "re-run CI" never saw the real blocker. On the projectbluefin hive it covered:The refusal now takes the stage only when CI is what holds the PR and no review gate stands. Otherwise the PR keeps its real stage and caption, and the re-run ask stays as the
hive:unauthorizednote.Why it happened
#16277 added the refusal as a post-classification override in two places: the stage-label pass and
DerivePR's mirror. It set stage 085, the reason and the route for any PR whose current head had a refused rerun, as long as it had any stage at all. The intent was to keep an infrastructure failure out of source fixing. It was not meant to outrank a changes request, a decision request, or another 085.The fix
stageengine.RecoveryUnauthorizedOwnsStage(verdict, reason, detail)is true only when all of these hold:sharedCIRecoveryUnauthorizedstill runs first, so thehive:unauthorizedlabel and its actionable comment are written either way.docs/github-app-setup.md("Optional shared-CI recovery") now says this.Other unauthorized steps checked
approve-workflow-runs: the contributor lane's own reason when held runs stop CI (automerge_contributor_held_runs.go).merge-workflow-path: a merge-time refusal.Both go through
ClassifyStagelike any lane reason, and they really are the blocker at that point. Onlyrerun-shared-ciis applied as an override, so only it is changed.Tests
TestRecoveryUnauthorizedOwnsStage, a table:TestDerivePRRecoveryPermissionBlockKeepsAChangesRequest: a changes-requested PR with a refused rerun stays at fixing.TestDerivePRRecoveryPermissionBlockIsNotSourceFixingstill covers the case where the re-run is the only blocker.Locally I ran only
gofmt -l(AGENTS.md bans localgo test/go build/go vet) andcheck-docs-citations.py, which verified 2183 references. CI is the test run.Appendix: code refs
src/pkg/stageengine/derive_pr_classify.go:RecoveryUnauthorizedOwnsStagesrc/pkg/stageengine/derive_pr.go: theDerivePRoverridesrc/pkg/github/automerge/automerge_stage_labels.go: the stage-label pass overridesrc/pkg/github/automerge/shared_ci_recovery.go:sharedCIRecoveryUnauthorized(label and comment, unchanged)π€ Generated with Claude Code
https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1