Repository navigation
π fix(automerge): a 072 nudge for a red that turns out to be a shared CI incident is withdrawn - #17007
Merged
hivecommons-hive[bot] merged 1 commit intoNov 7, 2026
Conversation
β¦ CI incident is withdrawn
The 072 nudge goes out the moment a contributor PR goes red ("the hive
will not merge it until the head changes"). The scanner's [shared-ci]
incident marker can land minutes later. The stage pass then moved the
PR to 050, but the nudge stayed as posted and the head's nudge count
stayed at 1. Seen on hivecommons/hive hivecommons#16993, hivecommons#16995, hivecommons#17000 and
hivecommons#17001: nudged for native-queue-policy about ten minutes before they
were deferred to incident hivecommons#17003.
- When the pass reads a nudged head's red as shared-ci-incident:<n> or
base-branch-red:<checks>, edit the hive's own nudge comments for that
head in place to say it was withdrawn, and forget the nudge
(Store.WithdrawNudge), so a genuine return to 072 is nudged afresh.
- After an incident closes as completed, keep a PR deferred to it until
the rerun sweep stamps hive-shared-ci-rerun-<n> (at most 30 minutes),
so the head is not handed back in the gap before the re-run.
- Name the head's red checks in the nudge when the CI gate's reason is
a bare token such as check-failure (a base with no required checks).
Refs hivecommons#17003, hivecommons#12606, hivecommons#12253
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>
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
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 a contributor PR goes red, the hive posts a 072 nudge at once: "this PR is back in your court β¦ the hive will not merge it until the head changes". If the scanner then defers that red to a
[shared-ci]incident, the stage pass already moves the PR out of 072, but the nudge stays as posted and keeps telling the author something false. This PR edits that nudge in place to say it was withdrawn. It also keeps the PR deferred for the short gap between the incident closing and the shared-CI rerun sweep re-running its checks, and makes the nudge name the failing check instead of the CI gate's barecheck-failuretoken.What went wrong
On 2026-11-07, v5's #16952 made
native-queue-policycall a function v6 did not export yet, so every v6 PR failed it.stage/072-returned-to-contributor. Each nudge listed one failing check,check-failure.<!-- hive-shared-ci-17003 -->on π fix(automerge): a maintainer keeps role/trusted when the hive merges main into their approved PRΒ #16993, π fix(github): fork PRs that allow maintainer edits no longer read as unpushable when the GraphQL PR batch is onΒ #16995, π fix(adoption): take a review-asked fix the undo guard refused once the reviewer approves itΒ #17000 and π fix(github): the overlap duplicate guard defers only to hive agents' PRs and tells the blocked issueΒ #17001 ("No action needed on this branch"). π fix(escalation): a red PR triaged as infrastructure is re-run once instead of sent back to fixers until it escalatesΒ #17002 had no marker yet.Reading v6, and running a test that replays that sequence:
SharedCIDeferredStagemoves the PR to 050 with reasonshared-ci-incident:17003, and the relay fix queue drops it. The nudge comment is never touched, though, and the head's nudge count stays at 1.SweepSharedCIRerunsre-runs the failed jobs every 15 minutes. ButopenSharedCIIncidentreleases the PR the moment the incident closes, so during that gap a still-red head goes back to 072. A PR first nudged in that gap is told "until the head changes" about a check that is about to be re-run. If the incident lasted more than 24h, the PR also gets the stall re-nudge and its adoption grace has already run out.check-failure. v6 has no required checks, so the engine evaluates CI with a known-empty required set.EvaluateCommitCIthen blocks on"check-" + conclusion(commit_ci.go) without naming the check, and the nudge printed that token.#17003 closed at 15:46:19Z.
What changes
shared-ci-incident:<n>orbase-branch-red:<checks>and that head was nudged, the hive edits its own nudge comments for that head in place. It keeps the marker line, adds<!-- hive:contributor-nudge-withdrawn -->, and says there is nothing to fix and what happens next. An edit notifies nobody. The record's nudge for that head is then forgotten, so a genuine return to 072 gets a fresh first nudge, and the stall and adoption clocks restart from it. A failed list or edit is retried on the next pass.<!-- hive-shared-ci-rerun-<n> -->, for at most 30 minutes. A "not planned" close releases the PR at once, as before, because the sweep never re-runs those.check-failure,status-error, β¦), the nudge reads the head's check digest and lists the red checks by name. It does this only when such a token is present, and keeps the token if the read fails.The shared-CI detection itself is unchanged: this reuses the scanner's marker, the stage index and the rerun marker.
Files
src/pkg/github/automerge/automerge_contributor_nudge.go: the withdrawal and the check naming.src/pkg/github/automerge/automerge_stage_labels.go: one call where the pass already resolves a PR that left 072.src/pkg/stagelabels/store.go:WithdrawNudge.src/pkg/github/shared_ci_incident.go,client.go: the post-close grace.stage-labels.md(shared-CI and base-red rows, nudge section) andsweeps-and-operations.md(rerun sweep).changelog.d/fixed-shared-ci-withdraws-072-nudge.md.Tests
New tests. The first three fail on v6 tip
e1bad508aand pass with this change:TestApplyStageLabelsSharedCIIncidentWithdrawsEarlierNudge: nudged at 072, then deferred. The nudge is edited once, nothing new is posted, the nudge is forgotten, and a head still red after the incident gets a fresh first nudge. On tip:edits=[].TestContributorNudgeNamesChecksForBareCIToken: on tip the nudge listscheck-failure.TestEnrichCIStatus_SharedCIIncidentHeldUntilRerunAfterClose: closed 5 minutes ago with no rerun marker stays deferred. A rerun marker, a close 2 hours ago or a not-planned close releases the PR. On tip: PR 1 and PR 5 report 0.TestWithdrawnNudgeCommentBaseBranchRed,TestBareCIToken: unit tests for the new helpers.Full runs:
./pkg/github/,./pkg/github/automerge/,./pkg/stageengine/...,./pkg/stagelabels/,./pkg/writeback/,./cmd/hive/. Alsogo vet, andcheck-docs-links.pyandcheck-docs-citations.py.Refs #17003, #16952, #12606, #12253
π€ Generated with Claude Code
https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1