Skip to content

Commit 8c19d3d

Browse files
fangge518claude
andcommitted
run-quality-gate: pytest rule sharpened to the two-case condition (per Ge)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent bb486ba commit 8c19d3d

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

agent-skills/run-quality-gate/SKILL.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,15 @@ orchestrator, a pre-merge check — scoped as above. Cheap gates (`pre-commit`
3838
~6s, `ts` 2–3s) cost nothing to include; the expensive gates (`build` ~78s,
3939
`pytest` ~96s) are the reason scoping matters.
4040

41-
**Skip the local pytest when your next operation triggers the backend-test
42-
CI anyway** (`test-backend.yml` runs the suite on every push touching
43-
`backend/**`, any branch) — running it locally right before such a push pays
44-
twice for the same verdict (`--only pre-commit,ts,build` covers the rest).
45-
Run pytest locally when iterating on expected failures, or at a checkpoint
46-
CI never sees (a worker handing a branch to the orchestrator, a pre-merge
47-
check of unpushed work). The script automates one shortcut itself: when HEAD is
41+
**Local pytest runs in exactly two cases; otherwise don't run it.**
42+
(1) You expect a failure and are fixing it — run just the specific test or
43+
file you expect to fail, not the suite. (2) You're at a checkpoint CI never
44+
sees (a worker handing a branch to the orchestrator, a pre-merge check of
45+
unpushed work) — a full run is permitted there. Never run the full suite
46+
before an operation that triggers the backend-test CI (`test-backend.yml`
47+
runs it on every push touching `backend/**`, any branch — `--only
48+
pre-commit,ts,build` covers the rest), and don't run before a handoff when
49+
you expect green. The script automates one shortcut itself: when HEAD is
4850
exactly the pushed tip (clean `backend/` worktree) and CI's `test-backend.yml`
4951
already completed for that SHA, it reuses CI's verdict instead of running
5052
pytest locally — the summary line says so when it happens. A CI *failure* for

0 commit comments

Comments
 (0)