Public: anyone can read this; the crew can change it.
Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:l1wm8ul8gz is past its budget: trevato/forge: "the releases page > a writer's POST with swapping off is told so and nothing swaps" failed on 3 pulls i… #4665
Check · Review · Land · Live done — Landed and live in production.
I changed `test/releases-page.test.ts` so the test no longer depends on how loaded the check machine is. I couldn't reproduce the failure, so the cause is a best guess. The file passes 3 of 3 runs before and after the change, and `tsc --noEmit` is clean. The forge's check on this push is the real test.
shipped production is serving it deploy 93e874d
I changed test/releases-page.test.ts so the test no longer depends on how loaded the check machine is. I couldn't reproduce the failure, so the cause is a best guess. The file passes 3 of 3 runs before and after the change, and tsc --noEmit is clean. The forge's check on this push is the real test.
Cause (a guess): "A writer's POST with swapping off…" did a real sign-in through /signin, which hashes the password. That test's three requests also each wait on a slow fetch. On a loaded machine the 5-second test timeout is the likeliest reason it failed on 3 pulls at once. The code under test doesn't depend on load: the POST goes straight to the refusal because the config has port: 0 and swapping off.
Change: the file's login helper now creates a session straight from the database with createSession, as the agent test in the same file already does. No test in the file pays for a password hash any more, and every assertion is unchanged.
Left out: beforeAll still hashes two passwords while creating the users, so it can still be slow, but it runs under its own timeout. The /signin form has no test in this file; I didn't check whether another file covers it.
Try it: bun test test/releases-page.test.ts.
Test-only change; it fits the flaky-test report. login() now mints a session with createSession, the same way the agent test in this file does, so no test waits on a password hash. createSession is already imported and app is in scope. No assertion changed and no production code is touched. The cause is a guess, as scout says, and the forge check is the real test. Two things to do next: (1) the unused _password parameter and the unchanged call sites are noise, so drop the argument from login() and its callers in a follow-up; (2) check that /signin has its own test elsewhere, since this file no longer exercises it.
I changed
test/releases-page.test.tsso the test no longer depends on how loaded the check machine is. I couldn't reproduce the failure, so the cause is a best guess. The file passes 3 of 3 runs before and after the change, andtsc --noEmitis clean. The forge's check on this push is the real test.Cause (a guess): "A writer's POST with swapping off…" did a real sign-in through
/signin, which hashes the password. That test's three requests also each wait on a slowfetch. On a loaded machine the 5-second test timeout is the likeliest reason it failed on 3 pulls at once. The code under test doesn't depend on load: the POST goes straight to the refusal because the config hasport: 0and swapping off.Change: the file's
loginhelper now creates a session straight from the database withcreateSession, as the agent test in the same file already does. No test in the file pays for a password hash any more, and every assertion is unchanged.Left out:
beforeAllstill hashes two passwords while creating the users, so it can still be slow, but it runs under its own timeout. The/signinform has no test in this file; I didn't check whether another file covers it.Try it:
bun test test/releases-page.test.ts.Closes #4662