Repository navigation
π fix(stage): the 090 comment names a base that requires up-to-date branches instead of "Blocked only by" trust - #17551
Conversation
β¦ranches instead of "Blocked only by" trust projectbluefin/utah#1072 (head c38126c, 2026-11-06/07) had every required check green but GitHub reported it BEHIND a `main` whose ruleset requires up-to-date branches. The 090 entry comment still said "Blocked only by `role/untrusted`" and offered "(or merge)", which GitHub refuses. The lanes' fresh PR fetch (noteStagePR) now records mergeable_state for the head it read; the stage pass carries it to the human-route evidence for that exact head only. A behind head stays at 090, but its digest says "behind `main`", the trust clause reads "Blocked by", and the comment says GitHub will not merge it until `main` is merged in. Up-to-date heads read as before. The missing-required-check half of projectbluefin/common#1619 was already fixed by hivecommons#16822; a new test pins that a skipped required check counts as reported, as GitHub treats it. 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>
|
[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 checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. Reviewed by Reviewer notesRead the non-test diff against the v6 tree. This looks correct to me; no findings. What I checked:
Body and diff agree. |
There was a problem hiding this comment.
Read the diff against the v6 tree and the callers. This looks correct to me.
What I checked:
mergeable_stateis real, not empty: all fournoteStagePRcallers (automerge_contributor_lane.go:1477,automerge_sweep_queued.go:31,automerge_sweep_trusted.go:31,653) pass a PR fromPullRequests.Get/guardedPR, not from a list call, so the field is populated. GitHub's transient"unknown"after a push simply reads as not-behind and falls back to today's wording.- Head pinning holds end to end:
noteStagePRrecords the state withpr.Head.SHA,drain(automerge_stage_labels.go:424) copies it only whenMergeableStateHead == o.HeadSHA, andhumanBehindBasere-checks the same equality β a state read on a previous head cannot leak onto the current one.TestHumanBehindBaseOnlyForTheFetchedHeadpins that. RouteHumanstill returnsReadyForHumanMerge; onlyRoute.BehindBase/the comment text change, as the body says.
One thing for whoever merges, not a defect: the overlap check reports a textual conflict with #17506 (the v5βv6 top-up) on src/pkg/stagelabels/human.go. Whichever lands second needs a rebase of that file.
Minor, optional: readyCommentBehindTail is appended even when blockedBy == "", so the sentence starts with "The branch is also behind β¦" with nothing before it. Harmless; "also" just reads oddly in that branch.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
Summary: The 090 "Ready for a human merge" comment said "Blocked only by
role/untrusted" and offered "(or merge)" on PRs that GitHub reported BEHIND a base requiring up-to-date branches, so nobody could merge them as they were. The stage pass now gets GitHub'smergeable_statefrom the lane's own PR fetch (no extra API call). A behind head stays at 090, but the comment names the out-of-date branch as a second blocker. The other half of projectbluefin/common#1619, required checks that never reported, already landed in #16822. This PR only adds a test that pins how a skipped required check is counted.What went wrong
stage/060-reviewedon 2026-11-06, as intended.c38126chad all 20 checks green, including the requiredcontractandbuild_main / Check all testing builds successful. Butmainhad moved on at 02:41Z on 11-06, and themain β review policyruleset setsstrict_required_status_checks_policy: true. Even so, the hive rewrote the receipt at 2026-11-06 15:15Z and re-entered 090 at 19:45Z, 05:58Z and 06:11Z, each time saying "Blocked only byrole/untrustedβ¦/lgtm/approve(or merge)".humanEvidence) never looked atmergeable_state. The contributor lane returns on the trust reason before it reaches its ownbehindcheck.What changes
noteStagePR, which every lane already calls with a freshly fetched PR, also recordsmergeable_statetogether with the head it was read on.StageTracker.draincopies it into an observation only when the head matches.humanEvidencesetsEvidence.BehindBaseto the base branch when that head readsbehind. GitHub only reportsbehindwhen the base requires up-to-date branches.RouteHumandoes not change the stage. The digest gains "behind `main`", and the trust-blocked 090 comment now reads "Blocked by β¦":The footnote drops "(or merge)" and says the branch must be brought up to date first. A head that is up to date reads exactly as before.
The merge gate is unchanged. It already blocks on a missing required check (
required-check-missing:), and GitHub enforces strict freshness itself.Files
src/pkg/stageengine/prstage/types.go:Detail.MergeableState/MergeableStateHeadsrc/pkg/github/automerge/automerge_stage_labels.go: record innoteStagePR, carry indrainsrc/pkg/github/automerge/automerge_stage_human.go:humanBehindBase, set inhumanEvidencesrc/pkg/stagelabels/human.go:Evidence.BehindBase,Route.BehindBase, digest and 090 comment wordingstage-labels.md(090 row) and two drifted citations inadr/0025-central-stage-engine.md; changelog fragmentTests
None of these were run locally (repo policy). CI is the verdict.
TestReadyCommentNamesBehindBase(stagelabels): with a behind head the comment has "Blocked by", the base-merge sentence and no "(or merge)". An up-to-date head keeps the old text. On the v6 tip the comment always says "Blocked only by", whatever the base state.TestRouteHumanBehindWithMissingRequiredStillWaits: a behind head with a missing required check still waits at 060.TestReadyCommentNamesBehindBaseFromLaneFetch(automerge, end to end): a lane fetch withmergeable_state: behindproduces the new 090 comment. On the tip the state is dropped, so the comment says "Blocked only by".TestHumanBehindBaseOnlyForTheFetchedHead: a state read for an older head, or acleanstate, never counts as behind.TestSummarizeCommitChecksRequiredSkippedAndPendingAreReported(github): pins current behaviour. A skipped required job counts as reported and green, as GitHub treats it. A queued one counts as pending, and only a context nothing reported is missing.Left for follow-ups
integration_idis not compared yet.RequiredStatusCheckPolicyalready returns the bindings.This touches
stagelabels/human.go, which #17506 also edits (sentinel/hold gates inReadyComment). The hunks here are kept away from those lines.Refs projectbluefin/common#1619, #16822
π€ Generated with Claude Code
https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1