Repository navigation
🐛 fix(stage): a required check that never reported keeps the PR at 060 - #16822
hivecommons-hive[bot] merged 1 commit into
Conversation
projectbluefin/utah#1074 read "4/4 checks green … Ready for a human merge" while its ruleset-required checks never ran (opened with GITHUB_TOKEN). The check digest now names required contexts with nothing reported on the head (base branch required set, cached per repo and branch) and RouteHuman waits on them. 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 |
There was a problem hiding this comment.
Read at head bc6ebce against v6, including requiredStatusCheckContexts → RequiredStatusCheckPolicy (commit_ci.go:181-210) and the existing summarizeRequiredChecks fold (commit_checks_summary.go:109-171). The fix is sound; one low-severity gap in the cache.
Verified correct
automerge_stage_human.go:89-104:headChecksreleasestracker.mubefore callingsummarizeChecks, and the newheadRequiredChecksclosure takes the lock itself only for the map read/write — no lock is held across the API call, no re-entrancy.SummarizeCommitChecksRequired(commit_checks_summary.go:45-55) reuses the samefetchCommitChecksread, so no extra API round-trip per head;summarizeRequiredChecksalready existed and is used by the merge sweep, so the name-matching semantics are the gate's own.stagelabels/human.go:579-581: the missing-required reason is appended towait, which is the existing 060 path — so a PR at 090 whose required check later vanishes correctly drops back, andKnown == falsestill routes as before. Body's claim "a test-swappedCheckSummarizeris unchanged" holds (automerge_stage_human.go:48-49).go build ./pkg/github/... ./pkg/stagelabels/passes at this head.
Low: an unreadable required set is cached as "none required" for 10 minutes
automerge_stage_human.go:74-84: when requiredStatusCheckContexts returns known == false (API error, or RequiredStatusCheckPolicy's "none" branch at commit_ci.go:210), set is forced to nil and that nil is written to tracker.required[key] with a fresh at. For the next humanChecksTTL (10m, line 31) every PR on that base branch gets MissingRequired empty, i.e. exactly the pre-fix picture — so a transient 5xx on the protection read lets a GITHUB_TOKEN-opened PR reach 090 and post its one-shot "Ready for a human merge" comment, then drop back to 060 on the next pass. Not a regression against v6, but it is the window the PR is meant to close. Two cheap options: skip the cache write when !known (retry next pass), or carry known into CheckSummary so an unknown required set is itself a pending gate, like Checks.Known == false already is.
Not blocking from my side.
— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
…ranches instead of "Blocked only by" trust (#17551) 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 #16822; a new test pins that a skipped required check counts as reported, as GitHub treats it. Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1 Signed-off-by: Danathar <Danathar@users.noreply.github.com> Co-authored-by: Danathar <Danathar@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Executive summary
projectbluefin/utah#1074, utah#1072 and utah-packages#873 were labelled
stage/090-ready-for-human-mergewith "4/4 checks green … Ready for a human merge". They were opened withGITHUB_TOKEN, so no workflow ran: the ruleset-requiredcontractandbuild_main / Check all testing builds successfulnever reported, and GitHub would refuse the merge.The stage pass now reads the base branch's required checks, names the ones with nothing reported, and keeps the PR at
060-revieweduntil they report.What
Why
The stage evidence's check digest (
SummarizeCommitChecks) counts only checks that reported on the head. An absent required check was neither red nor pending, soRouteHumansaw a clean head. A required-check fold that lists missing contexts (summarizeRequiredChecks) already existed; the digest did not use it.How
github.SummarizeCommitChecksRequiredfills a newCommitChecksSummary.MissingRequiredfrom the same status and check-run reads.automerge: the default reader passes the base branch's required set (requiredStatusCheckContexts: protection, rulesets, else config), cached per repo and branch forhumanChecksTTLon the stage tracker. A test-swappedCheckSummarizeris unchanged.stagelabels:CheckSummary.Missing.RouteHumantreats it as a pending gate (060 is "a gate is still pending"), and the summary line names it.Tests
TestHumanHandoffWaitsOnMissingRequiredChecksTestHeadRequiredChecksReadsBaseBranchOncecontract; one protection read per branchTestRouteHumanMissingRequiredChecksIsAPendingGateTestSummarizeCommitChecksRequiredNamesMissinggo teststagelabels, github/..., stageengine/..., writeback, dashboardNotes
required-check-missing. That is the band and verdict side, left to the band-classification fix.🤖 Generated with Claude Code
https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1