ci: правка реестра мутантов сама запускает гейт по диффу (#475 r1)

Классификатор отдаёт выход mutants по scripts/mutation-gate.mjs, job
changed_mutants получает третий дизъюнкт из ТЗ §2; fallback-ветки
выставляют mutants=true. Тест AC7 отбирает бэкенд-мутанты по файлу патча.

Issue: #475
User-Visible: no
This commit is contained in:
Codex
2026-09-06 19:33:08 +03:00
parent d2d145427b
commit 0145f9bafe
5 changed files with 29 additions and 9 deletions
+6 -2
View File
@@ -319,8 +319,12 @@ test('#475 AC6: воспроизведение #467 — дифф по src/wall-t
test('#475 AC7: воспроизведение находки ревью — бэкенд-мутанты отбираются по .py гарду и патчу', () => {
const byGuard = selectChangedMutants(MUTANTS, ['tests_backend/test_ha_frontend_registration.py']).map((m) => m.id);
const byPatch = selectChangedMutants(MUTANTS, ['custom_components/houseplan/frontend_registration.py']).map((m) => m.id);
const registration = MUTANTS.filter((m) => m.id.startsWith('frontend-registration-')).map((m) => m.id);
assert.ok(registration.length >= 3, 'в реестре есть бэкенд-мутанты регистрации');
// Отбор по патчу, а не по префиксу id (ревью r1: `frontend-reload-notice-*`
// патчит тот же файл и обязан попасть в набор).
const registration = MUTANTS
.filter((m) => m.patches.some((patch) => patch.file === 'custom_components/houseplan/frontend_registration.py'))
.map((m) => m.id);
assert.ok(registration.length >= 4, 'в реестре есть бэкенд-мутанты регистрации');
for (const id of registration) {
assert.ok(byGuard.includes(id), `${id} не отобран по гарду`);
assert.ok(byPatch.includes(id), `${id} не отобран по патчу`);