Run the quality gates locally, before they ever reach CI - #118
Merged
Conversation
Adds scripts/check.ps1, which runs the same checks quality.yml runs, on
your own machine. The default "quick" tier -- ruff, pytest, contract
drift, and frontend types/lint/unit tests -- finishes in about two
minutes. "-Tier full" adds compileall, the Playwright browser tests, and
the bundle build.
Packaging and the qualification spikes are deliberately excluded from
both tiers. They take 35+ minutes and need signing tooling, so there is
no honest way to make them part of a local edit loop.
A tracked .githooks/pre-push runs the quick tier and aborts the push if
anything fails, so a red build is caught before it is published rather
than minutes later in a browser tab. Enable it per clone with:
git config core.hooksPath .githooks
Bypass with --no-verify when you genuinely need to.
quality.yml is split to match. A pull request now runs only the fast job
(lint, tests, contracts, frontend). The Windows packaging, the recipe
worker and coordinator qualifications, and the WebView2 signature check
move to a heavy job that runs on main or on demand, and only after the
fast job is green -- so nothing spends 35 minutes to discover a lint
error. Every step from the original single job is preserved.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
What
scripts/check.ps1— runs the same gates CI runs, locally..githooks/pre-push— runs them automatically and aborts a failing push.quality.yml— split into a fast PR gate and a heavy main-only job.Local runner
quick = ruff, pytest, contract drift, frontend types/lint/unit tests. full adds
compileall, the browser tests, and the bundle build.Packaging and the qualification spikes are deliberately excluded from both tiers — they take 35+ minutes and need signing tooling, so there's no honest way to put them in a local edit loop. CI keeps them.
Enable the hook once per clone:
Hooks live in a tracked
.githooks/directory rather than.git/hooks/, so they survive clones and work for anyone else. Bypass withgit push --no-verifyorCORTEX_SKIP_HOOK=1.Workflow split
fastheavyneeds: fastA PR no longer waits on ~35 minutes of Windows packaging that it almost never invalidates, and
needs: fastmeans nothing spends that time only to discover a lint error. All 26 steps from the original single job are preserved — verified by parsing both YAML files and diffing the step lists.Note on cost
To be accurate about the motivation: this repo is public, so GitHub Actions on standard runners is already free and unlimited — this change doesn't reduce a bill, because there isn't one. What it does buy is faster feedback, fewer red PRs, and a much cheaper posture if the repo ever goes private (where
windows-latestbills at a 2x multiplier).Testing
The hook gated this very push: all 6 quick checks ran and passed in 68s before the push was allowed through.
🤖 Generated with Claude Code