Public: anyone can read this; the crew can change it.
Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:3tgtaj5heo is past its budget: trevato/forge: "origins on the web > Mirror starts a job, shows its stages, and lands on the mirror" failed on 3 pulls … #6953
Check · Review · Land · Live done — Landed and live in production.
I fixed the flaky "Mirror starts a job, shows its stages, and lands on the mirror" test in `test/web-origins.test.ts`, and it no longer depends on how fast the mirror runs. `bun test test/web-origins.test.ts` passes (31 tests) and the branch is pushed. I only ran that one file, not the whole check.
shipped production is serving it deploy 4183511
I fixed the flaky "Mirror starts a job, shows its stages, and lands on the mirror" test in test/web-origins.test.ts, and it no longer depends on how fast the mirror runs. bun test test/web-origins.test.ts passes (31 tests) and the branch is pushed. I only ran that one file, not the whole check.
Cause: this is my reading of the code, not something I reproduced. The test started a real mirror, then fetched the job page expecting the "running" checklist. If the mirror finished first, which can happen on a fast or loaded machine, the page redirected to the repository. The test then read an empty body and failed on "Creating the repository".
Change: the checklist assertions now read a job that nothing drives, so it stays running until the test fails it itself. The real mirror is still started and awaited. The test still checks that it reaches done, that the repository exists, and that the finished page has no refresh loop and shows "Open the mirror".
Not changed: no application code. The same pattern may exist in other job-page tests; I didn't look.
To try it: run bun test test/web-origins.test.ts.
🤖 Generated with Claude Code
Test-only change, and it fixes the race correctly (#1073-class flake, pipeline-first). The running-checklist assertions now read a job created with createJob that nothing advances, so they can no longer lose a race to a fast mirror that redirects first. The real mirror is still started through the form, awaited with settled, and checked for done, the repository, and the finished page (no http-equiv, "Open the mirror"), so no coverage of the real flow is lost. The pending job is failed at the end, so it can't linger as a runningJob for later tests. It touches no app code, so there's nothing new for security, the terminal, or the README. I applied the head's file onto main and ran bun test test/web-origins.test.ts three times: 31 pass, 0 fail each time. The preview at this head answers / with 200.
Nit, not blocking: the kept comment says "a meta refresh keeps it current while the mirror is still running", but no assertion checks http-equiv on the running page. expect(running).toContain("http-equiv") would make the comment true, and it is now race-free to assert.
I fixed the flaky "Mirror starts a job, shows its stages, and lands on the mirror" test in
test/web-origins.test.ts, and it no longer depends on how fast the mirror runs.bun test test/web-origins.test.tspasses (31 tests) and the branch is pushed. I only ran that one file, not the whole check.Cause: this is my reading of the code, not something I reproduced. The test started a real mirror, then fetched the job page expecting the "running" checklist. If the mirror finished first, which can happen on a fast or loaded machine, the page redirected to the repository. The test then read an empty body and failed on "Creating the repository".
Change: the checklist assertions now read a job that nothing drives, so it stays running until the test fails it itself. The real mirror is still started and awaited. The test still checks that it reaches
done, that the repository exists, and that the finished page has no refresh loop and shows "Open the mirror".Not changed: no application code. The same pattern may exist in other job-page tests; I didn't look.
To try it: run
bun test test/web-origins.test.ts.🤖 Generated with Claude Code
Closes #6950