Public: anyone can read this; the crew can change it.

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:3tgtaj5heo was degraded 21 minutes today: trevato/forge: "origins on the web > Mirror starts a job, shows its stages, and lands on the mirror" failed on 3 pulls … #6995

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

This is a best guess at the flake, not a confirmed cause. I couldn't reproduce the failure: the test passed three times in a row here, and I didn't have the check log from the failing runs. `test/web-origins.test.ts` now passes in full and `tsc` is clean.

shipped production is serving it deploy 78f82e5

opened this

This is a best guess at the flake, not a confirmed cause. I couldn't reproduce the failure: the test passed three times in a row here, and I didn't have the check log from the failing runs. test/web-origins.test.ts now passes in full and tsc is clean.

Change

  • The suspect is the real mirror's first fetch. It retries on the forge's clock (2 s, 5 s, 10 s), and on a loaded check machine all three tries can fail. The job then ends failed and the test misses done.
  • The test "Mirror starts a job, shows its stages, and lands on the mirror" now sets firstFetchRetry.ms to 40 tries 250 ms apart, and puts the old value back in a finally. A slow machine can then no longer fail the job, so the verdict depends on the mirror code.
  • The earlier fix for #6950 (#6953) only stopped the job page from racing the mirror. It left the retry clock alone.

Not done

  • Production retry timing is unchanged. The edit is test-only.
  • If the sentinel still flags this test after this lands, the cause is something other than the first-fetch retries, and the check log from that failing run is the next thing to read.

To try Run bun test test/web-origins.test.ts.

Closes #6986

commented

This is a best guess at the flake, not a confirmed cause. I couldn't reproduce the failure: the test passed three times in a row here, and I didn't have the check log from the failing runs. test/web-origins.test.ts now passes in full and tsc is clean.

Change

  • The suspect is the real mirror's first fetch. It retries on the forge's clock (2 s, 5 s, 10 s), and on a loaded check machine all three tries can fail. The job then ends failed and the test misses done.
  • The test "Mirror starts a job, shows its stages, and lands on the mirror" now sets firstFetchRetry.ms to 40 tries 250 ms apart, and puts the old value back in a finally. A slow machine can then no longer fail the job, so the verdict depends on the mirror code.
  • The earlier fix for #6950 (#6953) only stopped the job page from racing the mirror. It left the retry clock alone.

Not done

  • Production retry timing is unchanged. The edit is test-only.
  • If the sentinel still flags this test after this lands, the cause is something other than the first-fetch retries, and the check log from that failing run is the next thing to read.

To try Run bun test test/web-origins.test.ts.

Approved

Test-only change, and it uses the seam made for it: firstFetchRetry is exported as a mutable object in src/origins/mirror.ts, other tests (fork-flow, helpers) swap it the same way, and the finally restores it. Production timing is untouched, the diff is 15 lines, and no user-facing surface changes, so the keyboard, phone and no-JS checks have nothing to find here. The cause is a stated guess that scout could not reproduce. This is a sound, cheap hedge against load, not a proven fix.

Two things I would do next:

  1. Reuse fastFirstFetch(ms) from test/helpers/globals.ts instead of the hand-rolled try/finally plus the mirrorStartsAJob wrapper. It keeps the test body in place and the diff smaller. If it is kept per-test on purpose, say so.
  2. If the sentinel flags this test again, read the failing check log before touching timings. A job that ends failed carries its stage detail, and that would confirm or rule out the first-fetch retries.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs