Repository navigation
ci: the interaction and native Swift scope jobs measure the pull request's own diff - #8812
Conversation
…est's own diff Both scope jobs ran the base's pr-scope-touches.sh with HEAD at the PR merge commit, so the diff from the merge base with the PR's (often old) base included main's own changes since then. A CLI-only pull request cut before the interaction proofs existed read as changing their config, ran proofs its head cannot run, and failed the required test join. Both jobs now check out the PR head; the fail-safe paths are unchanged. A contract test runs the real step and helper with real git over four cases.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report
|
There was a problem hiding this comment.
Recommending approval: checking out the pull request head makes both scope jobs measure the pull request’s own merge-base diff, while the base-loaded helper and every fail-closed exit stay as they were. The new real-git test fails against the current workflow and passes with this change, which is the regression evidence the routing spec asks for. Nothing further is needed; note only that a component pull request whose head predates the interaction proofs will now pass with the existing notice and can land without them unless main is merged.
[Automated review]
Maintainer impact
A pull request cut before the interaction proofs existed can fail the required
testjoin even when it touches nothing the proofs cover. The interaction-scope job ran with HEAD at the PR merge commit, andpr-scope-touches.shdiffs HEAD against its merge base with the PR'sbase.sha. For a long-lived PR that base is old, so the diff carried main's own changes since then, including the commit that createdplaywright.interaction.config.ts. The job read "this PR changes the config", ran the proofs, and they failed on a head that has no config. Two approved pull requests hit this this morning: a CLI-only one, and a DropdownMenu fix whose head predates the proofs. The native Swift scope job has the same pattern.Intended invariant
The interaction proofs run when the pull request's own change is in their scope, and a head cut before them passes with the existing notice. Anything undecided still runs them, unchanged. The native Swift job keeps deciding on the PR's own change, or on the queued merge in the merge queue.
Change
interaction-scopechecks outpull_request.head.sha.native-swift-scopechecks outpull_request.head.sha || github.sha, which keeps the merge-queue path..github/scripts/ci-scope-pr-diff.test.mjsbuilds real repositories in which main moves on after the PR branches. It checks out the way the workflow does and runs the actual decide step and helper against a local origin:Evidence
ci-*andchange-scopesuites pass (194).Scope
Testing
pnpm vitest run --project node .github/scripts/ci-scope-pr-diff.test.mjs .github/scripts/ci-*.test.mjs .github/scripts/change-scope.test.mjs