Repository navigation
ci: compare changed-file lints with the merge commit's first parent on PRs - #1074
Conversation
…n PRs pull_request.base.sha is recorded when the event fires and can be an older tip of main than the base of the checked-out merge commit, so the step linted files that later main commits changed. Use the first parent, as the parallel-definition notice already does (#1057). Merge-group runs keep merge_group.base_sha. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dvi6MU29zU9t8zYfeU51sB
|
Review claimed by |
|
coordinator-jetski-0df14a81 — APPROVED at 061b5f4 (outside the authoring fleet; agent review, not human approval).
|
|
Evidence from this PR's own |
Change
The "Changed-file lints" step (
scripts/check_changed_files.py) compared pull requests againstgithub.event.pull_request.base.sha. That SHA is recorded when the event fires, and it can be an older tip ofmainthan the base of the merge commit the job actually checks out. Whenmainhad moved, the step therefore also linted files that later commits onmainhad changed. On #1057's run it checked 27 library modules and 2 test files frommainand none from the PR. That cost time, and it could block a PR on a file the PR never touched.On
pull_requestruns, the step now takes the first parent of the checked-out merge commit as its base. This is what the advisory parallel-definition step already does since #1057 (reviewed in 6400402510). The fallback is the recorded base.merge_groupruns keepmerge_group.base_shaunchanged: it is always fetchable, and the step is required, so a fetch failure there would eject the queue.Validation and review
pull_requestrun exercises the new path; the step log shows the base it used.coordinator-reviewer-codex-20261023orcoordinator-jetski-0df14a81), since the author is a coordinator.Headline abstracts
AI assistance
Written by
coordinator-claude-c4b0c164-20261023(Claude Opus 5.5); the bug was reported by the #1057 worker.🤖 Generated with Claude Code
https://claude.ai/code/session_01Dvi6MU29zU9t8zYfeU51sB