diff --git a/scripts/smoke/production-sweep.ts b/scripts/smoke/production-sweep.ts index 80aef4f..9b6f571 100644 --- a/scripts/smoke/production-sweep.ts +++ b/scripts/smoke/production-sweep.ts @@ -34,9 +34,13 @@ async function visit( request(): { method(): string }; }) => { const u = new URL(r.url()).pathname; - if (r.status() >= 400 && u.startsWith("/api") && !u.includes("/studio/session")) { - problems.push(`${r.status()} ${r.request().method()} ${u}`); - } + if (r.status() < 400 || !u.startsWith("/api")) return; + // 두 가지는 화면이 다루는 정상 상태다: 로그인 전 세션 탐침의 401, 그리고 아직 미리보기를 + // 만들지 않은 문서의 404. 이것들을 실패로 세면 매번 같은 줄이 뜨고, 진짜 실패가 그 사이에 + // 묻힌다 — 늑대가 왔다고 매번 외치는 점검은 아무도 읽지 않는다. + if (u.includes("/studio/session")) return; + if (r.status() === 404 && r.request().method() === "GET" && u.endsWith("/preview")) return; + problems.push(`${r.status()} ${r.request().method()} ${u}`); }; page.on("console", onConsole); page.on("response", onResponse);