Repository navigation
Landing policy: commit ranges follow ancestry, not commit dates - #1044
Merged
Merged
Conversation
Merge-queue commits carry committer dates out of order. git rev-list base..head walks by date and stopped early, so a queue group counted main's own #984 merge commit as a commit of #1034 and refused it for a missing co-author trailer. Commit ranges are now computed from full ancestry sets, and the queue's first-parent walk stops exactly at the group base. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
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 merge-queue group for #1034 failed the landing policy with
65047cbc05: land/view-publication-scoped-reads agent commit missing alfonso-aft co-author trailer. 65047cb is main's own #984 merge commit, which the group base already contains.Cause: merge-queue commits carry committer dates out of order, and
git rev-list base..headwalks by date and stops early, so it listed 26 commits for a PR that has 3 (reproduced locally on the real SHAs).Fix:
landing_policy.commits_betweentakes commits reachable from the head minus those reachable from the base (exact ancestry).merge-queue-search.first_parent_betweenwalks the head's first-parent chain until it reaches the base, and refuses when the base is not on that chain.Tests: a scratch repository with out-of-order dates where the naive range includes main commits; the new helpers return only the PR's commit. The merge-queue suite (24 tests) passes.