Skip to content

Fix PR starter validation to check out the run merge commit - #22668

Draft
Copilot wants to merge 1 commit into
mainfrom
copilot/fix-starter-validation-merge-checkout
Draft

Copilot wants to merge 1 commit into
mainfrom
copilot/fix-starter-validation-merge-checkout

Conversation

Copilot AI commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Description

PR starter validation can fail on branches that predate a helper script added on main: the workflow definition comes from the PR's synthetic merge commit, but starter validation explicitly checks out the unmerged PR head. A newer workflow step can therefore call a script that is missing from its checkout.

Use ${{ github.sha }} for all six PR starter-validation callers so their helper scripts come from the same pinned merge commit as the workflow definition and the CLI artifacts built by that run. Reopening an older, mergeable PR can then use the current merged result without requiring the author to merge or rebase main; rerunning an existing run retains its original merge SHA.

Rename the reusable workflow's checkout step to "Checkout validation commit" to reflect the caller-provided ref. The manually dispatched platform-smoke caller retains its existing explicit source ref. No dependencies, action pins, permissions, or job-selection gates change.

Fixes #22667

Validation

  • bash .github/workflows/lint-handwritten-workflows.sh - passed for all 57 handwritten workflows using repository-pinned actionlint 1.7.12.
  • git diff --check - passed.
  • Inspected the reported failure's actual job logs: workflow commit df332a15 was paired with checkout 7f0ad43a. Confirmed the missing diagnostics helper exists at the workflow's merge commit.
  • Checked test-selection impact: existing routes already cover tests.yml with ALL and cli-starter-validation.yml with job:cli-starter-validation; no map changes are needed.
  • No source-text unit tests added. Full six-platform starter validation was not run locally; workflow execution remains to be validated by PR CI.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No

Created from a Teams conversation with Jose Perez Rodriguez (@joperezr).

This branch has not been deployed

No deployments
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.

[CI] Starter validation fails on PRs branched before #22348: diagnostics staging script missing from PR head checkout

1 participant