Fix infra change detection to use merge-base instead of base tip - #285
Merged
Conversation
The evaluation workflow was using a two-point diff (base_sha..head_sha) to detect changed files, which includes files changed on main that the PR branch hasn't merged yet. This caused false 'Infrastructure changes detected' triggers when evaluation workflow files were modified on main after a PR branch diverged. Switch to computing the merge-base first, so only changes actually introduced by the PR are considered. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes false “Infrastructure changes detected” triggers in the evaluation workflow by diffing PR changes against the PR’s merge-base instead of the base branch tip, ensuring only files actually introduced by the PR are considered.
Changes:
- Compute
git merge-basebetween PR base and head commits. - Diff changed files from merge-base → head when determining infra vs. skill changes.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Skill Validation Results
Model: claude-opus-4.6 | Judge: claude-opus-4.6 |
ViktorHofer
enabled auto-merge (squash)
March 9, 2026 08:21
JanKrivanek
approved these changes
Mar 9, 2026
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.
The evaluation workflow was using a two-point diff (
base_sha..head_sha) to detect changed files in PRs. This includes files changed onmainthat the PR branch hasn't merged yet, causing false Infrastructure changes detected triggers.For example, this run on PR #75 triggered infra detection because
evaluation-run.ymlwas modified onmain(by PR #284) after the PR branch diverged — even though the PR itself never touched any evaluation workflow files.Fix: compute the merge-base between the base branch tip and the PR head, then diff against that. This ensures only changes actually introduced by the PR are considered.
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com