Skip to content

Add breaking change detection CI check#7351

Merged
alfonso-noriega merged 2 commits into
mainfrom
major-change-check
Apr 29, 2026
Merged

Add breaking change detection CI check#7351
alfonso-noriega merged 2 commits into
mainfrom
major-change-check

Conversation

@alfonso-noriega

@alfonso-noriega alfonso-noriega commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

PRs that introduce breaking changes (major version bumps, removed CLI commands/flags/env vars, or removed Zod schema fields) currently have no automated gate to ensure the dev_experience team is aware and can coordinate the release timing.

WHAT is this pull request doing?

Adds an automated breaking change detection workflow to the PR CI pipeline with two new jobs:

  • major-change-check: Runs a new workspace/src/major-change-check.js script that compares the current branch against the main baseline and detects:

-Changesets requesting a major version bump

Screenshot 2026-04-20 at 19.23.33.png

-Removed commands, flags, or flag environment variables in the OCLIF manifest (packages/cli/oclif.manifest.json)

Screenshot 2026-04-20 at 19.29.32.png

-Removed or deleted Zod schema fields in app/extension configuration models

Screenshot 2026-04-21 at 14.30.40.png

  • When breaking changes are found, the script posts a detailed sticky PR comment via marocchino/sticky-pull-request-comment and sets a has_breaking_changes output.
  • major-change-approval: A dependent job that only runs when has_breaking_changes is true. It gates on the breaking-change-approval GitHub environment, requiring a member of the @shopify/dev_experience team to manually approve the workflow run before the PR can merge.

How to test your changes?

  1. Open a PR that includes a changeset with a major bump, removes a CLI command or flag, or removes a Zod schema field.
  2. Verify the major-change-check job posts a comment to the PR detailing the detected breaking changes.
  3. Verify the major-change-approval job blocks and requires a breaking-change-approval environment approval.
  4. Approve the environment and confirm the job passes.
  5. Open a PR with no breaking changes and verify both jobs pass without requiring approval.

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is user-facing — I've identified the correct bump type (patch for bug fixes · minor for new features · major for breaking changes) and added a changeset with pnpm changeset add

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@alfonso-noriega alfonso-noriega force-pushed the major-change-check branch 2 times, most recently from 6124472 to ad648ce Compare April 20, 2026 17:17
@alfonso-noriega alfonso-noriega temporarily deployed to breaking-change-approval April 20, 2026 17:20 — with GitHub Actions Inactive
@alfonso-noriega alfonso-noriega temporarily deployed to breaking-change-approval April 20, 2026 17:27 — with GitHub Actions Inactive
@alfonso-noriega alfonso-noriega force-pushed the major-change-check branch 9 times, most recently from bfb406e to 9e7cd44 Compare April 21, 2026 12:05
@alfonso-noriega alfonso-noriega temporarily deployed to breaking-change-approval April 21, 2026 12:07 — with GitHub Actions Inactive
@alfonso-noriega alfonso-noriega force-pushed the major-change-check branch 3 times, most recently from 2058e62 to 336b840 Compare April 21, 2026 12:50
@alfonso-noriega alfonso-noriega temporarily deployed to breaking-change-approval April 21, 2026 12:51 — with GitHub Actions Inactive
@alfonso-noriega alfonso-noriega temporarily deployed to breaking-change-approval April 21, 2026 12:58 — with GitHub Actions Inactive
@alfonso-noriega alfonso-noriega temporarily deployed to breaking-change-approval April 21, 2026 13:03 — with GitHub Actions Inactive
@alfonso-noriega alfonso-noriega marked this pull request as ready for review April 21, 2026 13:19
@alfonso-noriega alfonso-noriega requested a review from a team as a code owner April 21, 2026 13:19
@alfonso-noriega alfonso-noriega force-pushed the major-change-check branch 3 times, most recently from dc94e76 to d93f43e Compare April 21, 2026 15:35
Adds a new 'major-change-check' job to the PR workflow that detects
potential breaking changes by comparing the branch against main:

1. Changesets requesting a major version bump
2. OCLIF manifest: removed commands, flags, or flag env vars
3. Zod schemas: removed fields in app/extension config specifications

When breaking changes are detected:
- A sticky PR comment is posted pinging @Shopify/dev_experience to
  coordinate inclusion in the next major release
- The check fails (red) until a dev_experience team member approves
  the workflow run via the 'breaking-change-approval' environment gate
- Comment links to #help-dev-platform for coordinating major releases

When no breaking changes are found, any stale sticky comment from a
previous run is deleted.

@isaacroldan isaacroldan 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.


Review assisted by pair-review

Comment thread workspace/src/major-change-check.js Outdated
Comment thread workspace/src/major-change-check.js Outdated
Comment thread workspace/src/major-change-check.js Outdated
Comment thread workspace/src/major-change-check.js Outdated
- extractSchemaFields: brace-counted walker, handles nested objects so
  sibling fields after a nested .object(...) are no longer dropped
- extractSchemaFields: also recognize .extend({...}) blocks, which is
  how spec files in models/extensions/specifications/** add their
  top-level fields onto a base schema
- Strip strings/comments before brace counting; walk original source
  for key collection so quoted keys ('foo': ..., "foo": ...) survive
- Update substring guard to match .object( OR .extend(
- Remove unused currentSchemaFiles glob walk
- cloneCLIRepository: add {install, build} options. major-change-check
  passes {install: false, build: false} since it only consumes
  git-tracked sources (oclif.manifest.json + .ts files), saving
  ~5-10 min of CI per PR. type-diff keeps the default.

Adds a regression test (node --test) covering the failure modes
flagged in review: nested .object siblings, .extend(), chained
.extend, quoted keys, comments, and malformed input.
@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 Apr 28, 2026
@alfonso-noriega alfonso-noriega added this pull request to the merge queue Apr 29, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Apr 29, 2026
@alfonso-noriega alfonso-noriega added this pull request to the merge queue Apr 29, 2026
Merged via the queue into main with commit 310df35 Apr 29, 2026
29 checks passed
@alfonso-noriega alfonso-noriega deleted the major-change-check branch April 29, 2026 13:51
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.

2 participants