Skip to content

Check stable-line pull requests with Patch QA and Patch provenance - #9196

Open
craigmichaelmartin wants to merge 3 commits into
mainfrom
patch-qa-and-provenance
Open

craigmichaelmartin wants to merge 3 commits into
mainfrom
patch-qa-and-provenance

Conversation

@craigmichaelmartin

@craigmichaelmartin craigmichaelmartin commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Patch releases ship from stable/X.Y as fixes land, instead of waiting for the next minor. Two things then need checking on every pull request into a stable line, by machine rather than by memory:

  • that the line only takes changes main already has, plus its own version bumps;
  • that the tarball a release would publish installs and runs on the platforms users have, and ships the same files as the line's last release.

Today a stable line's pull requests run unit tests, but nothing installs the packed CLI or checks where a backport's changes come from. After a release publishes, nothing checks the published package either.

WHAT is this pull request doing?

  • Patch QA (patch-qa.yml), on pull requests into stable/**:

    • builds the @shopify/cli tarball the way a release does;
    • installs it with npm install -g on ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm and macos-latest;
    • runs the checks that need no Shopify account (.github/scripts/smoke-test-cli.sh): version, help, the app, theme and Hydrogen topics, and theme init, theme check and theme package;
    • fails if the tarball's files differ from the line's last release on npm. Bundle chunk names are compared without their content hashes.
  • Patch provenance (patch-provenance.yml), on pull_request_target for stable/**, so the workflow comes from the stable line and never runs the pull request's code. It passes only for:

    • a backport that builds on the line's head, adds only patch changesets for the fixed version group, changes no path outside main's mirrored files, and in which every changed file is exactly what the main commit that first added its changesets does to that file when applied to the line's head. That commit must be newer than the line's cut from main;
    • the line's Version Packages pull request, when it's one commit on the line's head that moves every package in the fixed group up one patch version, consumes the line's pending changesets, and changes nothing but versions, version.ts, oclif manifest versions, the lockfile's workspace specifiers and changelog sections made of the consumed changesets' entries.

    Any other pull request into a stable line fails it, and a maintainer reviews and merges it.

  • Release smoke test: after Publish to npm succeeds, release.yml installs the published version from npm on Linux, Windows and macOS and runs the same checks.

Both workflows are inert on main (they only trigger for pull requests into stable/**). They land here first so new stable lines inherit them, then on stable/5.1.

How to manually test your changes?

🤖 Generated with Claude Code

Patch QA builds the @shopify/cli tarball a release of the pull request's head would publish,
installs it on Linux, Windows and macOS (x64 and arm64), runs the checks that need no Shopify
account, and fails if its files differ from the line's last release.

Patch provenance passes only for a backport whose changes main already has (pinned to the main
commit that added its patch changesets) and for the line's Version Packages pull request when it
only versions the packages on top of the line's head. It runs from the stable line's own copy of the
workflow and reads commits without running the pull request's code.

After a release publishes, release.yml installs it from npm on Linux, Windows and macOS and runs the
same checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@craigmichaelmartin
craigmichaelmartin requested a review from a team as a code owner November 25, 2026 13:29
@github-actions github-actions Bot added the no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. label Nov 25, 2026
craigmichaelmartin and others added 2 commits November 25, 2026 08:31
A JSON comparison of package.json and oclif manifests misses changes that parsing normalizes
away, such as a duplicated key. Require the same lines, with only version lines changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A backport now has to build on the line's head, and each file it changes has to be, whole, what
the main commit that added its changesets does to that file when applied to the line. That commit
must have reached main after the line's cut. Before, a backport could reuse an old changeset to
bring back old main code, or apply only part of a main commit's change.

A Version Packages pull request's new changelog section may only hold the consumed changesets'
entries and dependency updates, and no versioned file may change mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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

no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant