주기 SSE 검증 하네스 수정

This commit is contained in:
Yun Chan 2026-08-09 23:44:53 +09:00
parent 7b4955c3fc
commit fbf29fa40a
3 changed files with 16 additions and 1 deletions

View file

@ -95,7 +95,14 @@ function loadFixture(): ReturnedPracticeFixture {
}
async function expectOk(response: APIResponse) {
expect(response.ok(), await response.text()).toBeTruthy();
if (response.ok()) return;
let detail = `HTTP ${response.status()}`;
try {
detail = await response.text();
} catch {
// Streaming responses may not expose a replayable body through CDP.
}
expect(response.ok(), detail).toBeTruthy();
}
async function signInExistingFixture(

View file

@ -44,6 +44,7 @@ FIXTURE_SCRIPT = (
PERIODIC_SPEC = "e2e/periodic-learner-real-closed-loop.spec.ts"
RETURNED_SPEC = "e2e/returned-practice-db-closed-loop.spec.ts"
SCHEMA_VERSION = "vignette.periodic-learner-e2e-receipt.v1"
PLAYWRIGHT_RETRIES = 0
FORBIDDEN_PORTS = frozenset({8001, 55432, 9099})
FORBIDDEN_MARKERS = (
"vignette.chanpaca.net",
@ -1243,6 +1244,7 @@ class PeriodicRunner:
PERIODIC_SPEC,
"--project=chromium-single-run",
"--workers=1",
f"--retries={PLAYWRIGHT_RETRIES}",
"--reporter=line",
],
cwd=web_dir,
@ -1265,6 +1267,7 @@ class PeriodicRunner:
"--project=chromium-desktop",
"--project=chromium-mobile",
"--workers=1",
f"--retries={PLAYWRIGHT_RETRIES}",
"--reporter=line",
],
cwd=web_dir,

View file

@ -26,6 +26,11 @@ def load_module() -> ModuleType:
runner = load_module()
class PeriodicRunnerStaticContractTests(unittest.TestCase):
def test_browser_failures_are_not_retried_automatically(self) -> None:
self.assertEqual(runner.PLAYWRIGHT_RETRIES, 0)
class FakeController:
def __init__(self, *, tracked_status: str = "") -> None:
self.tracked_status = tracked_status