Skip to content

Compare PR deltas against the merge commit base - #243

Merged
Jake Bailey (jakebailey) merged 2 commits into
microsoft:mainfrom
jakebailey:pr-merge-parent-baseline
Sep 30, 2026
Merged

Jake Bailey (jakebailey) merged 2 commits into
microsoft:mainfrom
jakebailey:pr-merge-parent-baseline

Conversation

@jakebailey

Copy link
Copy Markdown
Member

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.

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The persistent baseline worktree causes subsequent runs in the same workspace to fail.

Review effort: Balanced
Findings: 1 Medium severity

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.

Comment thread src/main.ts Outdated
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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The implementation matches the stated purpose and includes focused coverage for snapshot validation and worktree reuse.

Review effort: Balanced
Findings: None

Resolved since last review (1)

@jakebailey
Jake Bailey (jakebailey) merged commit 07a4e40 into microsoft:main Sep 30, 2026
2 checks passed
@jakebailey
Jake Bailey (jakebailey) deleted the pr-merge-parent-baseline branch September 30, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants