ci: исполнять TS/Python parity на чистом runner (#548)

Issue: #548
User-Visible: no
This commit is contained in:
Sergey Matyunin
2026-09-13 10:49:07 +03:00
parent e85849b86e
commit 76d8017e87
20 changed files with 520 additions and 92 deletions
+7
View File
@@ -2034,6 +2034,13 @@ not the feeling that "editor text should be lazy".
- The backend CI job measures branch coverage (pure + HA harness combined),
fails below `scripts/backend-coverage-baseline.txt` and refuses to run when
the HA harness would silently skip.
- The junction-limit mirror has a separate clean-runner `geometry_parity` job
(#548). It compiles only the transitive TypeScript graph rooted at
`src/junction-limits.ts`, loads the production Python module without Home
Assistant and compares both over `test/fixtures/junction-limits-parity.json`.
The job fails closed on missing build/runtime prerequisites, announces the
number of executed scenarios, and reuses a result only when both mirrors,
fixture, toolchain pins and harness inputs are byte-identical.
- `const.ERROR_CODES` / `ERROR_CODE_FAMILIES` are THE stable error contract:
the scanner test proves every emitted code (send_error literals, exception
class attrs, literal and variable-passed MarkerControlError codes, f-string
+5
View File
@@ -130,6 +130,11 @@ git config core.untrackedCache true
`$env:PYTEST_DISABLE_PLUGIN_AUTOLOAD='1'`.
- Full backend (including `test_ha_*.py`): `python -m pytest tests_backend/ -q`
in CI or WSL/Linux only.
- Junction-limit TS/Python parity (clean, no Home Assistant):
`npx tsc -p tsconfig.junction-parity.json && node scripts/fix-test-build.mjs &&
python tests_backend/junction_parity.py --build-dir=test-build/junction-parity`.
Its dedicated reusable Validate job owns this proof; missing compiled modules
fail setup instead of turning into a pytest skip.
- IMPORTANT (audit lesson): the rollup typescript plugin reports a syntax error as a WARNING and still
builds the bundle — a truncated file can "pass". That is why the build starts with `tsc --noEmit`,
which fails on such errors. Always build with `npm run build`, never bare `rollup -c`.