Files
image-workbench-desktop/docs/plans
qiqi 940c92982d
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 40s
test(visual): 视觉基线 threshold 压到 0 —— 此前的「0 diff」是假绿灯
toHaveScreenshot 的 threshold 默认 0.2(每像素 YCbCr 距离),maxDiffPixels: 0 只约束
「超阈值像素数」——两者叠加不等于逐像素精确。B5 端口描边从 #ababab 改成 color-mix(text 55%)
后,亮色只差约 19 级,全程被 0.2 吃掉:基线没更新、比对报 12/12 通过、--update-snapshots
也不写盘(它同样按阈值判断「有没有变」)。

压到 threshold: 0 后重生成 4 张亮色基线,12/12 仍通过 —— 同机渲染是确定性的,
所以这条不会变成 flaky 来源,而「0 diff」从此名副其实。

教训写进 docs/plans/design-tokens-rollout.md:此前各批记的「逐像素 0 diff」,
真实含义是「没有超过 0.2 阈值的像素」。
2026-11-23 16:40:09 +08:00
..