Add pnpm pre-ci:affected for a fast, diff-scoped pre-push check#7751
Draft
dmerand wants to merge 3 commits into
Draft
Add pnpm pre-ci:affected for a fast, diff-scoped pre-push check#7751dmerand wants to merge 3 commits into
dmerand wants to merge 3 commits into
Conversation
This was referenced Jun 8, 2026
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
ed599fc to
ccde915
Compare
ccde915 to
8b2b10a
Compare
8b2b10a to
6f30c6e
Compare
eb2d663 to
e96df11
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

About this stack
This stack came out of reviewing recent contributor and agent sessions in
Shopify/cli, where the same avoidable friction kept recurring: failures found only after pushing, generated files regenerated by hand, local checks drifting from what CI actually enforces, and setup conventions relearned every time. The goal is to make the local dev loop mirror CI and keep the two single-sourced so they can't drift — then document it so people and agents stop rediscovering it.WHY are these changes introduced?
pnpm pre-cimirrors CI's full--alltargets, which makes it thorough but slow — slow enough that people won't reach for it on every change, which defeats the point of having an easy pre-push check. This adds a fast, diff-scoped version for the inner loop and keeps the full run for when you actually want that confidence.WHAT is this pull request doing?
pnpm pre-ci:affected(anddev pre-ci:affected), the diff-scoped sibling ofpre-ci.bin/ci-gates.jsnow knows its affected form:type-check/lint/builduse the nx:affectedscripts, unit tests usevitest run --changed, and knip just runs (it's quick and has no affected mode).pnpm codegenif that applies. If it can't work out what changed, it errs toward running them.git status, so the codegen heuristic doesn't quietly miss them.pnpm pre-ciitself is unchanged. Dev tooling only, nothing user-facing.How to test your changes?
pnpm pre-ci:affectedruns the affected checks, runs knip, and skips codegen with a note..graphqlfile, the codegen checks run.pnpm check-ci-gatesstill passes — the gate set hasn't changed.Post-release steps
None.