Repository navigation
test(relay): fix the three races behind relay-offline-reasons-regression's flakes - #4313
Conversation
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
c6e9e5b to
128c71f
Compare
|
Merged through CodeRabbit did not review this head. Reviews of record at head ca6b8a0: omo review (dori review) CLEAR, and the omo gate reviewer (gpt-6.2-astra) CLEAR after its MEDIUM (a shell redirect escaping the route) was fixed and its 418-origin reproduction rerun; its LOW (a missing file's 404 without content-type) is left and noted in the PR body. Proof: 20/20 in the CI runner image on hosthatch with typecheck first; bun run check fast exit 0. Merged by lane flaky-relay-offline on the lead's merge override. |
Release 0.5.7, on the owner's word (2026-11-20: "릴리즈하고 배포까지해봐"). - `package.json` and `herdr-plugin.toml`: 0.5.6 -> 0.5.7. - `REMOTE_BUNDLE_VERSION` 50 -> 51 (`shared/machines.ts`): `server/` and `shared/` changed since `remote-v50`, so the remote bundle's inputs differ. After this merges, `remote-v51` is tagged on the merge commit and the Remote PC bundles run publishes it before the Release run. Until the Release run is done, nothing touching `server/`, `shared/`, `bun.lock` or `patches/` merges. - `CHANGELOG.md`: no fragments had been added since 0.5.6, so this PR writes one and folds it under 0.5.7 (dated 2026-11-21) with `bun scripts/changelog-fold.ts 0.5.7`: a Maintenance section for the step-2 account groundwork (#4278 to #4327, all behind `OVIS_ACCOUNT_OPENS_ALL`, off by default) and the two browser-regression flake fixes (#4313, #4317). PR links written by hand (the fold found no merged PR for a fragment added in this PR). No `by @login` credits: all 22 PRs are by the maintainer. - `release-summaries.json`: 0.5.7 has one `improved` line in en, ko, ja and zh. What users see is small because step 2 is off by default: the line says so ("Groundwork for account device safety, switched off: nothing changes."). - `telemetry/deployed.json` unchanged: no Worker source changed since 0.5.6 (release guards agree). ## Validation - `bun run check fast` on the remote heavy host at 8dab46d (on main bd9f574): every step ok, unit 20809 pass, 0 fail. - `bun test scripts/changelog-fold.test.ts scripts/release-notes.test.ts server/release-notes.test.ts scripts/release-guards.test.ts`: 60 pass, 0 fail. - `bun scripts/release-guards.ts --base origin/main`: "Release 0.5.7: remote bundle, telemetry Worker and release metadata are in order." - `bun scripts/release-notes.ts 0.5.7` renders the notes. - Not run: `check full` (the diff is versions, notes and one constant).
What
scripts/relay-offline-reasons-regression.tsfailed now and then in CI browser lane 2/3 and passed on rerun (seen on #4300 and #4303). This fixes the two races behind it, in the script only. No sleeps, no longer timeouts.socket hang up, then a 20 s reload timeout (CI job 136078025377). The
app.ovis.shroute answered each request withroute.fetchto a localBun.serveofdist-shell/. That fetch threwsocket hang up(line 181), so the route was never fulfilled and the walk'sreloadwaited out its 20 s. The shell is now answered in the script's own process withpagesResponsefromscripts/pages-static.ts(asrelay-media-browser-qa.tsalready does), so no socket can hang up."precondition: both rows: evaluate: Execution context was destroyed" (seen 4 times while proving 1).
toPcssetlocation.hashwithpage.evaluateand then reloaded, on a page the sign-in's return could still be navigating. It now always loads the PCs view with a navigation of its own (goto /?pcs, which boot.ts moves into#pcs), which supersedes any navigation still in flight.seedalso waits for the stored session as well as the key, since only the session marks the end of the sign-in's navigations."stopped pc-a: its check: found it 'checking'" (seen once while proving 1 and 2). The glyph was read right after a check settled, and the list's sweep can begin another check of that PC in between. The glyph is now read once no check of it runs.
The in-process answer also follows the shell's own same-origin redirects (
/s/<id>to/s/<id>/), as route.fetch did, so a redirect never leaves the route for the real host (gate review). A missing file's 404 no longer carriescontent-type: text/plain; its body and headers are otherwise the same, and the walk loads no missing file.I could not catch the stray navigation in a log (instrumented runs passed 32/32), so part 2 removes the fragile step rather than naming that navigation.
Validation
ovis-in-image,ci-browser-parallel.ts,BROWSER_RETRY=0, 6 workers), withbun run typecheckfirst. Before part 2 the same loop failed 3 times in 15 runs; before part 3, once in 19.bun run check faston hosthatch: exit 0.