chore(repo): one canonical way to run the checks - #249
Merged
Conversation
Two background invocations of `uv run pytest -q | tail -20` reported exit 0 during the #229–#233 run while the suite was failing. A pipeline's status is the last command's, so `tail` succeeding at printing lines masked pytest failing at running them, and a real broken test survived two task cycles. `scripts/check.sh` is the fix and the place the rule now lives. It carries `set -euo pipefail`, and it collects every failure rather than stopping at the first — knowing that lint *and* a test are broken is one round trip where learning it twice is two. Three groups, run individually or together: bash scripts/check.sh # python + frontend + generated bash scripts/check.sh python pnpm check # the same script, from the other half A script rather than a Makefile because this repository has never had `make`, and `build_dist.sh` / `cycle_server.sh` are the established shape for "several commands whose order or failure handling matters". What it does not run is stated rather than implied: the wheel build, the 30-minute flow, the format smoke tests and everything Playwright stay in CI, because each costs minutes or needs its own install. `CONTRIBUTING.md`'s table is still the full list and now carries a column saying which group covers each row — including the two that are covered indirectly, so `pnpm -r lint` running the annotator boundary and `uv run pytest` running the wire-fixture gate are visible rather than assumed. Two details worth the lines. The `generated` group mirrors each artifact's real mechanism instead of inventing a uniform `--check` they do not have: `openapi.json` has no check mode, so it regenerates and diffs the way CI does, and the wire fixture is absent because its gate is a pytest test the `python` group already runs. And a missing `node_modules` is refused up front with a sentence naming `pnpm install`, because otherwise the first thing a fresh worktree sees is `ERR_MODULE_NOT_FOUND: openapi-typescript` under a nine-line node stack, which reads as a broken client rather than an empty checkout. Verified by reproducing the original bug: a deliberately failing test gives `exit 0` through `| tail -3` and `exit 1` through this script, naming the group. All three groups run green on this branch.
This was referenced Aug 5, 2026
Closed
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.
Two background invocations of
uv run pytest -q | tail -20reported exit 0 during the #229–#233 run while the suite was failing. A pipeline's status is the last command's, sotailsucceeding at printing lines masked pytest failing at running them — and a real broken test survived two task cycles.scripts/check.shis the fix, and the place the rule now lives.It carries
set -euo pipefail, and it collects every failure rather than stopping at the first — knowing that lint and a test are broken is one round trip where learning it twice is two.Decisions taken
A script, not a Makefile. This repository has never had
make, andscripts/build_dist.sh/scripts/cycle_server.share the established shape for "several commands whose order or failure handling matters". Adding a second tool convention to hold four lines of dispatch is not worth it.What it does not run is stated rather than implied. The wheel build, the 30-minute flow, the format smoke tests (ultralytics brings torch) and everything Playwright stay in CI, because each costs minutes or needs its own install.
CONTRIBUTING.md's table is still the full list and now carries an Incheck.shcolumn — including for the rows covered indirectly, sopnpm -r lintrunning the annotator boundary gate anduv run pytestrunning the wire-fixture gate are visible rather than assumed.The
generatedgroup mirrors each artifact's real mechanism instead of inventing a uniform--checkthey do not have.openapi.jsonhas no check mode, so it regenerates and diffs exactly as CI does — a side effect worth knowing about, since a stale spec is left corrected in the working tree.tests/fixtures/wire_annotations.jsonis deliberately absent: its gate istests/server/test_wire_fixtures.py, which thepythongroup already runs.A missing
node_modulesis refused up front, with a sentence namingpnpm install. Found while testing this in a fresh worktree: otherwise the first thing you see isERR_MODULE_NOT_FOUND: openapi-typescriptunder a nine-line node stack, which reads as "the generated client is broken" rather than "nothing is installed" — and a fresh worktree is exactly where somebody runs this first.Verification
The original bug, reproduced and then caught. A deliberately failing test:
All three groups run green on this branch (
python,frontend,generated).Not in this PR
The same rule was added to the local
CLAUDE.md, which is git-excluded and must never be committed. The committed home for it isCONTRIBUTING.md, above the check table.