Repository navigation
🐛 fix(ci): surface and recover shared CI permission blocks - #16277
Conversation
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
[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 |
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of No conflicting open PRs or same-file overlaps were found. |
There was a problem hiding this comment.
Decision needed: @hanthor should decide whether the DCO squash gate may stop counting hive-authored commits without the PR author's sign-off as squash-unsafe on bot-authored PRs (automerge_stage_dco.go:67,101-104), mirroring the shell check's existing skip.
Read the diff against v5 plus src/scripts/check-squash-signoff-attribution.sh, automerge_stage_dco.go, shared_ci_rerun.go, and the passDecision path in stageengine/derive_pr.go. The code does what the body says; I'm routing it because it relaxes a merge gate and the author is one of the approvers, so a second approver should sign.
What I verified
-
Bot-PR squash attribution.
botSquashAuthor(automerge_stage_dco.go:125) suppressessquashUnsafeHivewhen the PR author login ends in[bot], both on the fresh read (:67) and the cached same-head path (:99-103). The shell gate already does this:check-squash-signoff-attribution.sh:104-105exits early with "PR author … is a bot; squash will stay bot-authored". The Go predicate is narrower than the script'sis_bot_identity(:93-102, which also matchesgithub-actions, copilot noreply addresses, etc.), so this does not exempt anything the script would still check.unsigned/unsignedOtherare untouched, so unsigned commits still fail. The alignment claim holds — this is a policy relaxation of the Go gate, not a bug fix, which is why I'm asking an approver to confirm it. -
Permission block → NeedsDecision.
trySharedCIRerunnow recordsSharedCIRerunBlock{HeadSHA, RunID}on 403/405 (shared_ci_rerun.go:338-349) and on the repo cooldown short-circuit (:331-334); themarkSeenmemo is skipped when blocked (:358-361), so the unchanged-PR dedupe at:267no longer swallows the retry.hasSharedCIRerunBlocks(:95-103) keeps the repo in the sweep when discovery finds no closed incidents, and:298-310re-seeds the previously seen incident set for the blocked head only. InApplyStageLabels(automerge_stage_labels.go:1141-1148) andpassDecision(derive_pr.go:305-310) the block parks the PR inNeedsDecisionwith theunauthorized:rerun-shared-cireason, andsharedCIRecoveryUnauthorizedclears the label once the block is gone. Consistent with the doc added ingithub-app-setup.md.
Open question (not a finding): at shared_ci_rerun.go:363-366, when some runs were re-run and a later one was refused, the function returns handled=true without stamping the comment or markSeen. The next sweep will call RerunFailedJobsByID again on the already-accepted runs. I could not verify from the tree what GitHub returns for a rerun already in progress; if it is a non-403 error the loop just logs and continues (:352), so this is at worst noise, but worth a glance.
— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. @clubanderson this PR is held at Why:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. |
|
/hive decision Owner-directed disposition for head 6bac75c: accept the narrow bot-authored squash-attribution alignment and complete this PR under my instruction to finish these without another person-review wait. This is a PR-specific owner decision, not a second reviewer’s approval or a repository-wide rule change. The Go gate only suppresses the extra PR-author sign-off attribution counter when the authenticated PR-author login ends in [bot]. That is narrower than the already-required shell checker’s existing bot-author exemption at src/scripts/check-squash-signoff-attribution.sh:93-105. Unsigned commits remain rejected, human PRs retain attribution enforcement, and both fresh and cached paths have regression coverage. No App permissions or alternate credentials are granted by this change. The partial-rerun advisory is not a merge blocker: latestFailedWorkflowRuns selects the newest attempt per workflow and excludes queued/in-progress attempts before any retry. Partial permission refusal preserves the outstanding block and does not stamp the incident complete. The existing bounded permission cooldown is retained; there is no new retry or permission bypass. All 12 protected entries, native-queue-policy, all Go shards, coverage, patch coverage, lint and the build/runtime/contract checks currently pass at this exact head. Preserve those gates and use an exact-head guard for completion. Source merge does not claim deployment or an App grant. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
…blocker (#19024) The rerun 403 (`unauthorized:rerun-shared-ci`, #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
Summary
Validation
Operational evidence (separate from this code)
Related #16188 and #16048. One owner-authorized expected-head base refresh as clubanderson produced 9b93938. Required gosec job125454843482/run41497095558 succeeded at2026-11-02T18:07:00Z in132seconds. No App permission grant, deployment, merge approval or check bypass was performed. The obsolete optional PR Type and normal OWNERS/Prow approvals are separate gates.