Skip to content

Landing policy: commit ranges follow ancestry, not commit dates - #1044

Merged
ualtinok merged 1 commit into
mainfrom
land/landing-policy-exact-ranges
Oct 27, 2026
Merged

ualtinok merged 1 commit into
mainfrom
land/landing-policy-exact-ranges

Conversation

@aft-alfonso

@aft-alfonso aft-alfonso Bot commented Oct 27, 2026

Copy link
Copy Markdown

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..head walks 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_between takes commits reachable from the head minus those reachable from the base (exact ancestry).
  • merge-queue-search.first_parent_between walks 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.

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>
@ualtinok
ualtinok added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 8c687ab Oct 27, 2026
48 checks passed
@ualtinok
ualtinok deleted the land/landing-policy-exact-ranges branch October 27, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant