From 7feb39f8e3fddd3ada440409ff1fee21dcbdbbc3 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 1 Oct 2026 15:10:42 +0300 Subject: [PATCH] fix(ci): the screenshot fingerprint is only a warning on a task branch (#760) The pipeline dispatches a full Validate for a `ci:golden` task, and `screenshotsGateMode` read `full=true` as strict on any ref. Between betas the source fingerprint on dev is legitimately stale (#479: re-captured for the beta candidate), so every visual task failed preflight on the conveyor's material until its author re-ran `docs:accept --identical` on the current dev - #718 and #740 both did, and two visual tasks in a row could not merge without it. On a task branch the mode is now `warn` even with `full=true`; dev, main, PRs, the schedule and Release: candidates stay strict. Issue: #760 User-Visible: no Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_018qZfe7YS4rqEMKoVeS3GKd --- scripts/classify-changes.mjs | 6 ++++++ test/classify-changes.test.mjs | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/scripts/classify-changes.mjs b/scripts/classify-changes.mjs index 0c925102..62c7daea 100755 --- a/scripts/classify-changes.mjs +++ b/scripts/classify-changes.mjs @@ -144,6 +144,12 @@ export function mutantsRequested() { * Где нужен один ответ — CLI отдаёт один ответ. */ export function screenshotsGateMode(inputs) { + // #760: на ветке задачи — только предупреждение, даже при `full=true`. + // Конвейер диспатчит полный Validate для `ci:golden`, а отпечаток на `dev` + // между бетами законно устаревает (#479): строгий режим заставлял каждую + // визуальную задачу переснимать кадры после любого сдвига `dev`. Кандидат + // собирается на `dev` — там режим прежний. + if (isTaskBranch(inputs?.refName)) return 'warn'; return heavyGatesRequested(inputs) ? 'strict' : 'warn'; } diff --git a/test/classify-changes.test.mjs b/test/classify-changes.test.mjs index 5047cdd6..002a08d1 100644 --- a/test/classify-changes.test.mjs +++ b/test/classify-changes.test.mjs @@ -197,6 +197,12 @@ test('#586: режим гейта скриншотов приходит одни assert.equal(screenshotsGateMode({ eventName: 'workflow_dispatch', fullInput: 'false' }), 'warn'); assert.equal(screenshotsGateMode({ eventName: 'pull_request' }), 'strict'); assert.equal(screenshotsGateMode({ eventName: 'schedule' }), 'strict'); + // #760: полный Validate ветки задачи (`ci:golden`) судит отпечаток мягко, + // кандидат на `dev` — строго, как прежде. + assert.equal(screenshotsGateMode({ eventName: 'workflow_dispatch', fullInput: 'true', refName: 'issue/740-stairs' }), 'warn'); + assert.equal(screenshotsGateMode({ eventName: 'workflow_dispatch', fullInput: 'true', refName: 'refs/heads/issue/718-moon' }), 'warn'); + assert.equal(screenshotsGateMode({ eventName: 'workflow_dispatch', fullInput: 'true', refName: 'dev' }), 'strict'); + assert.equal(screenshotsGateMode({ eventName: 'push', headMessage: 'x\n\nRelease: v1.2.3', refName: 'dev' }), 'strict', 'кандидат на dev'); // Регрессия, ради которой заведён #586: у `--heavy` вывод ДВУХСТРОЧНЫЙ, и // сравнение всего вывода со строкой `heavy=true` не совпадает никогда.