Repository navigation
Compare PR deltas against the merge commit base - #243
Merged
Jake Bailey (jakebailey) merged 2 commits intoSep 30, 2026
Merged
Jake Bailey (jakebailey) merged 2 commits into
Jake Bailey (jakebailey) merged 2 commits into
Conversation
A PR merge ref can lag behind main, so using a fresh main checkout as the baseline reports unrelated fixes as regressions. Tie the baseline to the merge commit to keep both sides of each comparison consistent.
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The persistent baseline worktree causes subsequent runs in the same workspace to fail.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Aligns PR baselines with the merge commit’s first parent to avoid unrelated main changes affecting comparisons.
Changes:
- Builds baseline and candidate from one PR merge snapshot.
- Verifies merge, base, and head SHAs before building.
- Retains the legacy baseline CLI argument as ignored.
| File | Description |
|---|---|
src/main.ts |
Creates and builds a baseline worktree from the merge commit’s first parent. |
src/checkReposTriggered.ts |
Stops forwarding the legacy baseline ref. |
test/main.test.ts |
Tests snapshot verification and baseline selection. |
README.md |
Documents PR baseline behavior. |
azure-pipelines-userTests.yml |
Marks the baseline parameter as legacy. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Triggered comparisons can run more than once in the same workspace. Readding an existing worktree aborts before either compiler is built, so reuse it at the merge commit base instead.
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.

A PR merge ref can lag behind main, so using a fresh main checkout as the baseline reports unrelated fixes as regressions. Tie the baseline to the merge commit to keep both sides of each comparison consistent.