Repository navigation
π fix(automerge): share merge-train lane verdicts across sweep engines - #19292
Merged
hivecommons-hive[bot] merged 1 commit intoNov 19, 2026
Merged
Conversation
A PR the lane leaves to a person (contributor-lane:no-linked-issue, untrusted-author-role, ...) is never a merge-train member. The planner knows that from the lane's per-head verdict (noteMergeTrainOutcome), but the verdict lived on the engine that reached it. The contributor lane runs both in the long-lived loop and every minute on a one-shot engine (SweepContributorLaneAutoMerges), and the one-shot engine started empty: with no verdict it read the PR's 090 stage record as ready, seated it behind the train front at 080 (merge-train:queued-behind#N), and the next pass put it back at 090. projectbluefin utah-packages#1222 (a github-actions bot PR, no linked issue, overlapping hivecommons#1217) flipped 080/090 this way 51 times in 3.5 hours, each one suppressed by the stage dampener. The verdicts now live in the sweep memory shared by every engine over the same client, next to the once-per-head marks from hivecommons#17178. A read-only integration-eligibility probe keeps its own memory, as before. 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 `#19292a1d5ef9` sha256:764c1ea82f41b9fad23eaa1986c8d99a537970ddfcfd1bfe787d612bf6c3830f β download from the dashboard or `hivectl review evidence #19292`.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.
A PR the contributor lane leaves to a person no longer flips between stages 080 and 090. The merge-train verdicts are now shared by every sweep engine, not kept on one.
What was wrong (live case)
projectbluefin/utah-packages#1222 is a github-actions bot PR with no linked issue. The contributor lane correctly says
contributor-lane:no-linked-issue(090, a person merges it), and by design such a PR is never a merge-train member (mergeTrainHumanMergeReason, #15425). But on 11-19 its stage went 090 β 080 (merge-train:queued-behind#1217) β 090 51 times in 3.5 h. The stage dampener absorbed most of the flips, though GitHub still got 9 stage/090 and 8 stage/080 label writes.Cause: the per-head lane verdicts (
mergeTrainVerdicts) lived on oneEngine. The contributor lane also runs every minute on a fresh one-shot engine (SweepContributorLaneAutoMerges). That engine had no verdict, fell back to the stage store, read the 090 record as "ready", and seated #1222 behind #1217 at 080. On the next pass the long-lived loop parked it at 090 again. This is the same class of gap #17178 fixed for the once-per-head marks; the train verdicts were left out of it.What changed
mergeTrainVerdictsmoves into the sharedsweepMemory(from π fix(automerge): a refused update-branch, merge or merge-forward is sent once per PR head, not again on every sweepΒ #17178), under its own leaf mutex.noteMergeTrainOutcome,mergeTrainVerdictForandmergeTrainEjectWhyLockedread it there. The leaf lock is never taken beforemergeTrainMu.After the change, #1222 stays at 090 (
contributor-lane:no-linked-issue), and #1217 is no longer shown as a two-PR train.Left as they are (noted for follow-up, not needed for this bug):
mergeable-unknownverdict still clears the mark, so a single short 080 blip is possible.Tests
TestMergeTrainHumanMergeVerdictSharedAcrossSweepsreproduces fix: hosted hive NET_ADMIN + CA cert + Copilot 1.0.59Β #1222. The loop engine recordsno-linked-issueand the store holds 090. Three fresh tick engines must not make fix: hosted hive NET_ADMIN + CA cert + Copilot 1.0.59Β #1222 a front, sibling or candidate. A new head starts clean.TestSweepMemorySharedPerClientnow also checks that verdicts are shared between engines and not visible to the probe.dashboard-sections/activity-monitor.md("Who rides"). Changelog:changelog.d/fixed-merge-train-verdicts-shared.md.π€ Generated with Claude Code
https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1