Repository navigation
Conversation
…2529) ## Summary The prose gate in `validate-task.yml` diffed against `github.event.pull_request.base.sha` while the lint job checks out GitHub's merge commit for the pull request. The merge commit is built on the base branch's current tip, and the event's `base.sha` can be older than that, as after a close and reopen. The diff then scanned every commit landed on the base branch in between as the pull request's own, and failed a pull request that added nothing the gate reports. A new `Resolve prose base step` resolves the base as the checkout's first parent where HEAD is a merge commit, which is by construction the base the checkout was built on, and keeps the event's `base.sha` for a checkout that is no merge commit. The gate step reads that output. A promotion still diffs against the default branch's tip, since that is the merge commit's first parent there. ## Tests `TestTheGateDiffsAgainstTheMergeCommitsOwnBase` in `tests/test_prose_lint.py` runs the workflow step's own script and the composite action's own script against a constructed repository, where a commit carrying a comment lands on the base after the event's base and before the merge: - the step resolves the merge commit's first parent, and the gate passes on it - the event's base, fed to the gate, reports the landed commit's comment, which is the defect itself - a checkout that is no merge commit keeps the event's base, with `HEAD^1` held apart from it so an unguarded first parent fails - the gate step consumes the resolved output Each of the guard and the wiring was reverted in turn, and the suite failed each time. The step-script extraction is shared with the existing label-step helper. Closes on promotion: #2490 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Improved pull request prose checks so they compare changes against the appropriate baseline in both merge and non-merge checkouts. * **Tests** * Added coverage for baseline selection and verification that prose checks use the resolved baseline. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Note
Copilot was unable to run its full agentic suite in this review.
Copilot review overview
2 open findings
What changed in this PR
Updates the prose gate workflow to diff PRs against the correct base when GitHub checks out a merge commit, preventing unrelated landed commits from being attributed to the PR.
Changes:
- Add a workflow step to resolve the correct prose diff base (merge commit’s first parent vs. event base SHA).
- Update the prose gate invocation to use the resolved base output.
- Refactor tests to extract workflow step scripts generically and add coverage for the merge-commit base-resolution behavior.
| File | Description |
|---|---|
tests/test_prose_lint.py |
Adds a reusable helper to extract workflow step scripts and introduces tests covering base-resolution for merge commits. |
.github/workflows/validate-task.yml |
Adds “Resolve prose base step” and wires its output into the prose gate action input. |
🧠 Review effort: Lite
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2532 +/- ##
=======================================
Coverage 58.40% 58.40%
=======================================
Files 16 16
Lines 8090 8090
=======================================
Hits 4725 4725
Misses 3365 3365
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|

Summary
Promotes one change from
develop:validate-task.ymldiffs against the base the pull request's checkout was built on. The checkout is GitHub's merge commit, and the event'sbase.shacan be older than its first parent, as after a close and reopen, which made the gate scan commits landed on the base branch since as the pull request's own. A newResolve prose base stepuses the merge commit's first parent, and keeps the event'sbase.shafor a checkout that is no merge commit. A promotion still diffs against the default branch's tip.Fixes #2490
Verification
TestTheGateDiffsAgainstTheMergeCommitsOwnBaseruns the workflow step's own script and the composite action's own script against a constructed repository whose base moved after the event, and shows the event's base reporting a landed commit's comment while the resolved base does not. Reverting the guard, and reverting the gate's input tobase.sha, each failed the suite.🤖 Generated with Claude Code