@@ -114,14 +114,20 @@ Playwright). Pick the cheapest layer that can express the behaviour;
114114the full decision tree, promotion criteria, and authoring rules for
115115permanent E2E specs live in [ ` doc/testing-strategy.md ` ] ( ../doc/testing-strategy.md ) .
116116
117- ** Mandatory rule for UI changes** : every change that touches the UI
118- — bug fix, feature, or ** any phase** of a multi-phase implementation —
119- must be exercised end-to-end with Playwright before it is declared
120- done. Type-checks, unit tests, and "looks fine in the dev server" are
121- not enough; Pyodide round-trips and async state interactions silently
122- break in ways only a browser-driven test catches reliably. Use a
123- throwaway probe (` tests/e2e/_repro_*.spec.ts ` , deleted afterwards) when
124- the change does not warrant a permanent regression spec.
117+ ** Mandatory pre-completion checks** — before declaring ANY change
118+ done (bug fix, feature, or any phase of a multi-phase task):
119+
120+ 1 . ** Always run the ` 🟢 Vitest (TS) ` task** (` npm test ` ). Stale unit
121+ tests (e.g. action-registry length assertions) silently break when
122+ production code grows; type-checks and dev-server smoke do not catch
123+ them. CI failures from skipping this step are not acceptable.
124+ 2 . ** For UI changes** , additionally exercise the change end-to-end with
125+ Playwright — Pyodide round-trips and async state interactions
126+ silently break in ways only a browser-driven test catches reliably.
127+ Use a throwaway probe (` tests/e2e/_repro_*.spec.ts ` , deleted
128+ afterwards) when the change does not warrant a permanent regression
129+ spec.
130+ 3 . ** For ` src/runtime/*.py ` changes** , run pytest (` tests/python ` ).
125131
126132## Git workflow
127133
0 commit comments