Fix consistency review PR delta detection#2018
Open
roji wants to merge 1 commit into
Open
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 107c6541-f2ca-4f5b-b7f5-9cd70eab5844
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the SDK consistency reviewer to identify PR changes exclusively through authoritative GitHub API data.
Changes:
- Requires complete changed-file and diff retrieval with pagination.
- Prohibits unreliable local-history delta inference and fails closed on missing data.
- Refreshes generated workflow metadata.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/sdk-consistency-review.md |
Adds authoritative PR-delta instructions. |
.github/workflows/sdk-consistency-review.lock.yml |
Updates the generated body hash. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Medium
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.
Summary
The consistency review agent can choose an incorrect base commit for understanding what changed in a PR, example.
pull_request_readHEAD^, merge-parent ordering, commit history, or local refs; fail closed withmissing_dataRoot cause
In SDK Consistency Review run 29561137136 for #2010, the depth-1 checkout had no usable
origin/main. The prompt only suggested fetching changed files with GitHub tools, so the agent fell back to local history. It eventually mislabeled the PR head's first parent (0846618) as the base and analyzed0846618...3745ae2, which is the merge-from-main delta rather than the pull-request delta fromff18f7e...3745ae2. That caused features already on main to be attributed to the PR.The GitHub MCP server already exposes the authoritative
pull_request_readget_filesandget_diffmethods, so the fix is prompt-only rather than changing checkout behavior.Validation
gh aw compile --strictgit diff --check