Skip to content

ci: diff a pull request against its merge commit's first parent - #852

Merged
jtravs merged 1 commit into
mainfrom
ci/docs-lane-stale-base
Nov 16, 2026
Merged

jtravs merged 1 commit into
mainfrom
ci/docs-lane-stale-base

Conversation

@jtravs

@jtravs jtravs commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

Docs-only PRs (#847, #850) were running every lane.

Cause. The changes job diffed against github.event.pull_request.base.sha. That value can be older than main's tip. On #847's latest run it was still 281a9543, from before #845 merged. The checked-out merge commit, though, was built against today's main (33efe0cb). So the diff counted #845's .github/workflows/ci.yml and native/ci/check_lambda_tags.py as #847's own changes, which gave lanes=full and device=true.

Fix. On a pull_request event, when HEAD is GitHub's test merge commit, the job now diffs against that commit's first parent, which is the base tip the merge was built on. Push events still use github.event.before. If HEAD is not a merge commit, the job falls back to base.sha as before.

Checked. On #847's merge ref (e0b7b40b), git diff --name-only HEAD^1 HEAD lists only docs/dev/roadmap.md, docs/dev/seps/index.md and docs/dev/seps/sep-0051-save-planes.md, so the job would pick lanes=docs and device=false. This PR touches ci.yml, so its own run takes the full lanes. That run checks the edited script itself.

🤖 Generated with Claude Code

The changes job diffed against the event's pull_request.base.sha, which can
lag behind main: it stayed at 281a954 on #847 after #845 merged, so #845's
ci.yml and native/ changes were counted as #847's own and the docs-only PR
ran every lane. The checkout is GitHub's merge of the head into main's current
tip, so its first parent is the right base.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T23:08:44.937853Z f7ecef4 PR opened
🔒 Security Review ✅ Completed 2026-11-15T23:09:49.053326Z f7ecef4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jtravs
jtravs enabled auto-merge (squash) November 15, 2026 23:20
@codecov

codecov Bot commented Nov 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@jtravs
jtravs merged commit 0fb96d8 into main Nov 16, 2026
83 of 85 checks passed
@jtravs
jtravs deleted the ci/docs-lane-stale-base branch November 16, 2026 00:32
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