Repository navigation
🐛 Stage: keep an approved head at 090 on auto-merge-off repos when a drain loses its verdict - #19380
Merged
hivecommons-hive[bot] merged 1 commit intoNov 20, 2026
Conversation
…drain loses its verdict The engine ticker and the queued sweep drain one shared stage tracker (hivecommons#12573). A lane notes the reviewer verdict before its merge decision but records its observe-only observation after it, so a drain by the other driver in between left a repo-auto-merge-disabled observation with no verdict, which classifies as 050. projectbluefin/server#699 flipped 090 <-> 050 every ~25 minutes under the same reason. The stage pass now folds the head's verdict from the review-verdicts record into such observations (trusted-author, contributor and self-authored lanes; a trusted bot's advisory verdict is left to its lane). An unreviewed or new head still reads 050. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1 Signed-off-by: Danathar <6772335+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
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. Evidence bundle `#19380a95451d` sha256:f7c37443e00d807486128e4d1ff11c2e0a86f63da58c2ae6be509ff90329ee7d — download from the dashboard or `hivectl review evidence #19380`.merged by Hive trusted-author auto-merge: author |
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
On a repository whose auto-merge is off, an approved, green PR could flip between
stage/090-ready-for-human-mergeandstage/050-review-pending, with the samerepo-auto-merge-disabledreason both ways. projectbluefin/server#699 did this every ~25 minutes overnight (050→090 4:22 AM, →050 4:49, →090 4:51, →050 5:14, →090 5:20 EST).Cause
noteStageVerdict) before its merge decision, but records its observe-only observation only after the evaluation returns.repo-auto-merge-disabledwith no verdict classifies as 050 (derive_pr_classify.go).humanEvidence), so the next pass put it back at 090.raw_verdict approve.The contributor lane re-notes the verdict for a trusted author, unless it stops first (repo not in the lane, a prefilter or sentinel park,
mergeable-unknown, a closing or adoption-intent gate, an admission error). Nothing re-notes it for the hive's own PRs.Fix
ApplyStageLabelsfolds the head's verdict into arepo-auto-merge-disabledobservation whose drain carried none (foldObserveOnlyVerdict). It reads the same review-verdicts record the lanes read, for the observation's own head, the way #18669 fixed the sibling mismatch.repo-auto-merge-disabled.foldRecordedDecision, so a recorded human decision still applies on top.A deeper fix in the tracker itself (observations carrying their verdict atomically) would also cover non-observe-only paths. It is left as a possible follow-up.
Tests
TestFoldObserveOnlyVerdictSurvivesSplitDrainreproduces the split on a realStageTracker(note → other driver drains → record → drain) and checks:resolveStageandstageengine.DerivePR; an unreviewed head stays 050; a new head doesn't inherit the old head's verdict;Nothing was run locally (AGENTS.md);
gofmt -lis clean, and CI is the first build.🤖 Generated with Claude Code
https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1