From 569867487cb9821cc17923ff1a428f95c447747f Mon Sep 17 00:00:00 2001 From: Codex Date: Sun, 30 Aug 2026 20:52:15 +0300 Subject: [PATCH] fix: adopt the #392 dependency file as the single source (#42) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rebase resolution: dev's #392 introduced tests_backend/requirements.txt (python 3.14, phcc 0.13.357, homeassistant 2026.8.3) — exactly the single-source-of-pins AC of this issue, so the duplicate requirements_test.txt is dropped and both workflows keep installing from the #392 file; ruff is added there for the lint step. The backend reuse key no longer names the dead file (tests_backend/ as a root already covers the new one); ARCHITECTURE.md points at the real path. User-Visible: no Issue: #42 --- docs/ARCHITECTURE.md | 6 ++++-- scripts/gate-reuse.mjs | 12 ++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 2452e0d2..935317b8 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -1549,8 +1549,10 @@ their passports; `scripts/config-audit.mjs` treats both as `current`. ## Backend quality gates (#42, 2026-08-30) -- `requirements_test.txt` is the single source of backend CI dependencies - (validate.yml and mutation-gate.yml install from it). +- `tests_backend/requirements.txt` is the single source of backend CI + dependencies (validate.yml and mutation-gate.yml install from it; the file + itself was introduced by #392, which also moved the harness to python 3.14 + and the current Home Assistant — #42 adds ruff to it for the lint step). - `pyproject.toml` configures ruff (E/F/B/I, E501 excluded by decision) and mypy strict for a grow-only allowlist of pure modules; the completeness guard lives in `tests_backend/test_backend_quality.py`. diff --git a/scripts/gate-reuse.mjs b/scripts/gate-reuse.mjs index de5252d4..cc106bbe 100644 --- a/scripts/gate-reuse.mjs +++ b/scripts/gate-reuse.mjs @@ -49,13 +49,13 @@ export const HARNESS = { || /^demo\/benchmark_(glow|large_house)\.mjs$/.test(rel), }, backend: { - // #42: порог покрытия и пины зависимостей — прямые входы job - // (`head -1 baseline` в шаге сравнения; `pip install -r`): их изменение - // без правок тестов обязано сбрасывать реюз, иначе baseline-bump молча - // пройдёт по старому зелёному маркеру. + // #42: порог покрытия и конфиг линтеров — прямые входы job + // (`head -1 baseline` в шаге сравнения; ruff/mypy читают pyproject): их + // изменение без правок тестов обязано сбрасывать реюз, иначе baseline-bump + // молча пройдёт по старому зелёному маркеру. Пины зависимостей + // (tests_backend/requirements.txt, #392) покрыты корнем tests_backend. roots: ['tests_backend', 'custom_components', 'pytest.ini', - 'scripts/backend-coverage-baseline.txt', 'requirements_test.txt', - 'pyproject.toml'], + 'scripts/backend-coverage-baseline.txt', 'pyproject.toml'], // Внутри custom_components/** значим только Python: собранный фронтенд // лежит там же и меняется от любой сборки, а backend его не исполняет. keep: (rel) => !rel.startsWith('custom_components/') || rel.endsWith('.py'),