mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
test: golden acceptance keeps environment witnesses (#355)
Declaring the whole matrix in --expect-change could accept a completely foreign capture (different font stack, different machine): no undeclared passed scenes would remain, and undeclared passed scenes are exactly what proves the capture environment equals the accepted baseline's. The realistic failure is fatigue, not malice — a mass framing change where the author lists "everything that went red", accidentally sweeping in scenes that diverged because of the environment. Acceptance now requires a witness floor: after subtracting --expect-change/--expect-new, at least min(10, 10% of baseline scenes) undeclared scenes must match their accepted baselines BYTE-FOR-BYTE (a sub-threshold 'passed' proves nothing about the environment — #351). A truly total repaint passes only with an explicit --no-witnesses --reason="…", and the reason is written into the baseline manifest — a trace in the artifact and its git history, not just in the shell history. A first-ever capture with no baselines requires no witnesses: every frame there is declared in --expect-new anyway. Issue: #355 User-Visible: no
This commit is contained in:
@@ -4,6 +4,13 @@
|
||||
*
|
||||
* node scripts/golden-accept.mjs --reviewed --expect-change=<id,id>
|
||||
* node scripts/golden-accept.mjs --reviewed --expect-new=<id,id>
|
||||
* node scripts/golden-accept.mjs --reviewed --expect-change=… --no-witnesses --reason="…"
|
||||
*
|
||||
* Floor свидетелей (#355): после вычета объявленных сцен должно остаться
|
||||
* достаточно необъявленных, совпавших с эталоном байт-в-байт, — они доказывают,
|
||||
* что среда съёмки та же, что у принятого эталона. Тотальная перерисовка
|
||||
* обходится только явным `--no-witnesses --reason="…"`; причина уезжает в
|
||||
* манифест эталонов.
|
||||
*
|
||||
* Обёртка появилась потому, что до #344 любой `.mjs` из `demo/golden` входил в
|
||||
* корпус отпечатка, и правка инструмента приёмки объявляла устаревшими бандл и
|
||||
|
||||
Reference in New Issue
Block a user