mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-01 12:18:51 +00:00
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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018qZfe7YS4rqEMKoVeS3GKd
This commit is contained in:
@@ -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';
|
||||
}
|
||||
|
||||
|
||||
@@ -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` не совпадает никогда.
|
||||
|
||||
Reference in New Issue
Block a user