Skip to content

test(relay-panel): open the relay panel's pages without the service worker (#4357) - #4977

Merged
devswha merged 3 commits into
mainfrom
fix/relay-panel-conn-live-wait
Nov 28, 2026
Merged

devswha merged 3 commits into
mainfrom
fix/relay-panel-conn-live-wait

Conversation

@devswha

@devswha devswha commented Nov 28, 2026

Copy link
Copy Markdown
Owner

What

Fixes the .conn-live timeout in scripts/relay-panel-regression.ts (run through ui-access-regression.ts) from #4357.

Cause. The reopened page did not stall on its connection: it never booted. Reproduced in herdr-ci-runner:local under load (--cpus 2, 4 busy loops), the #4445 diagnostics plus a request log showed the failing page visible, on "Loading Ovis", with no header chip and no WebSocket opened; its only failed request was the first module preload (/assets/rolldown-runtime-*.js, net::ERR_ABORTED). That preload was answered by the app's service worker: the same hang #4777 found in file-viewer-regression, which #4895 fixed with scripts/app-context.ts (service worker blocked). This script still built its contexts with browser.newContext. The one branch recurrence in CI since 2026-11-22 (run 46011739423, fix/codex-idle-turn-start) matches: same call, page visible, no chip, no sockets, no errors.

Change. englishContext builds its contexts with appContext(browser, { viewport }) (same viewport and en-US locale as before; the only difference is the blocked service worker), and the script leaves scripts/direct-contexts.json. No sleeps, no raised timeouts; the app is unchanged.

Quarantine. The ui-access-regression.ts entry stays, now pointing at #4026: the script has two other first-attempt failures on main since 2026-11-22 with a different cause, the relay's "Online." wait after Add this PC (7 runs) and connect-dialog-scroll-regression.ts:80 (3 runs). Removing it would turn main red about once a day.

Validation

  • Before (origin/main df6bd8a, checkRelayPanel loop under load): 147/148 passed, 1 failed with the CI error.
  • Service worker on/off, 10 reloads each: 6-24 responses per reload came from the worker before; 0 in all 10 with the change.
  • After: 150/150 passed under the same load; bun scripts/ui-access-regression.ts 4/4 passed in 4 containers.
  • bun run check fast: exit 0. bun test scripts/conventions.test.ts scripts/ci-browser-parallel.test.ts: 92 pass.

Reviews

omo gate at ae1b4fb: CLEAR (LOWs: the cause was shown in a loaded local run and the one branch recurrence, not on #4357's original run; connect-dialog-scroll-regression.ts and ui-regression.ts still allow the service worker, a follow-up). Codex via axwith (short, read-only): CLEAR, no verified findings.

Fixes #4357

…orker (#4357)

The reopened page that never showed .conn-live stayed on "Loading Ovis": the app's service worker answered its first module preload (rolldown-runtime), which failed with net::ERR_ABORTED, so the module graph never ran (the #4777 cause). englishContext now starts from appContext (service workers blocked, en-US), as scripts/app-context.ts asks of every browser script. The quarantine entry stays: the script's other first-attempt failures on main (the relay's Online. wait, connect-dialog-scroll-regression.ts:80) are not this cause.
@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Tests
    • Browser regression checks now use a consistent English locale and 1280×800 viewport.
    • Updated quarantine tracking to reflect a service-worker failure and recent first-attempt failures. The existing quarantine end date remains unchanged.
    • The relay-panel regression check is no longer listed in the direct-context registry.

The relay-panel regression script now creates its English browser context through appContext, and its direct-context registry entry is removed. The quarantine entry now references issue 4026, with revised comments and the existing end date.

Changes: Relay panel regression setup

Layer / File(s) Summary
English browser context setup
scripts/relay-panel-regression.ts, scripts/direct-contexts.json
The script creates its 1280×800 English context through appContext and documents the no-service-worker setup. Its direct-context registry entry is removed.
Quarantine issue attribution
scripts/ci-browser-quarantine.ts
The entry now references issue 4026. Its comments describe the #4357 service-worker failure and other first-attempt failures. The end date remains 2026-12-20.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Possibly related PRs

  • devswha/ovis#4110: It defines validation rules for quarantine entries, which apply to the updated entry.
Merge Risk: Minimal · previous review ae1b4

This updates a browser regression script to avoid a service-worker boot race and adjusts its quarantine note. It has no production runtime impact and little merge risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the change: the relay panel's pages are opened without the service worker, and it references #4357. It matches the main change in relay-panel-regression.ts (appContext blocks the servi…
Description check Passed The description follows the template. It has a Change section that describes the problem (the .conn-live timeout caused by the service worker answering the first module preload), the fix, and the quar…
Linked Issues check Passed [#4357] asks to find the stage where the reopened page's connection stops, then fix the race. At head, scripts/relay-panel-regression.ts englishContext builds its context with `appContext(browser, {…
Out of Scope Changes check Passed The changes stay within the #4357 flake. (1) englishContext switches to appContext, the stated fix. (2) scripts/direct-contexts.json drops the relay-panel-regression.ts entry. The script no lo…
Full details: Title check

Explanation

The title names the change: the relay panel's pages are opened without the service worker, and it references #4357. It matches the main change in relay-panel-regression.ts (appContext blocks the service worker) and the direct-contexts.json removal is a related supporting change. The title is specific and concise, so it passes.

Full details: Description check

Explanation

The description follows the template. It has a Change section that describes the problem (the .conn-live timeout caused by the service worker answering the first module preload), the fix, and the quarantine decision. It also has a Validation section listing the commands run (bun run check fast, bun test, bun scripts/ui-access-regression.ts) and their results. The template asks for contract-test coverage only for HTTP/WS changes; this change does not touch HTTP or WS code, and the description does not state that it was skipped. The Change section links the issue through 'Fixes #4357' rather than an explicit maintainer agreement, which the template only requires for features. The description is substantially complete, so it passes.

Full details: Linked Issues check

Explanation

[#4357] asks to find the stage where the reopened page's connection stops, then fix the race. At head, scripts/relay-panel-regression.ts englishContext builds its context with appContext(browser, { viewport: { width: 1280, height: 800 } }). scripts/app-context.ts sets serviceWorkers: "block" and locale: "en-US", so the service worker no longer answers the page's module preloads. The same file documents this failure mode (#4777). openPhoneSettings at head also names the stage on timeout: it records socket creation, first frame, close and error events, page state, and console or page errors. The PR states that the reproduction showed the page stuck on "Loading Ovis" with a net::ERR_ABORTED preload and no socket. That reproduction, the 150/150 and 4/4 runs, and the service-worker counts are author-reported. I could not verify them from the repository. The git diff against the merge base was unavailable, so I could not confirm the base version of englishContext or the exact diff of openPhoneSettings. The head code is consistent with the stated cause and remedy.

Full details: Out of Scope Changes check

Explanation

The changes stay within the #4357 flake. (1) englishContext switches to appContext, the stated fix. (2) scripts/direct-contexts.json drops the relay-panel-regression.ts entry. The script no longer builds its context directly, so the entry no longer applies. (3) scripts/ci-browser-quarantine.ts keeps the ui-access-regression.ts quarantine and points it at #4026 with comments on the other first-attempt failures. This changes attribution for the same script and keeps the quarantine active. It does not alter other tests. (4) openPhoneSettings diagnostics serve the issue's requested stage diagnosis. The PR does not change the app. The diff against the merge base was unavailable, so the exact base-to-head hunks were not read. This conclusion rests on the head file and the summary.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between c6c060d and ae1b4fb.

Files selected for processing: 3

  • scripts/ci-browser-quarantine.ts
  • scripts/direct-contexts.json
  • scripts/relay-panel-regression.ts
Files with no reviewable changes: 1

  • scripts/direct-contexts.json

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review.

@devswha
devswha merged commit ca4f188 into main Nov 28, 2026
25 of 27 checks passed
@devswha
devswha deleted the fix/relay-panel-conn-live-wait branch November 28, 2026 14:58
@devswha

devswha commented Nov 28, 2026

Copy link
Copy Markdown
Owner Author

Merged through pr-merge at head 0667f5921. Seen before the merge was asked for: required checks green, no unresolved thread, no conflict, no hold, main not red, no release in progress. CodeRabbit said it did not review (a limit or a skip) since this head.

main moved but untouched: merged without update. Its new commits up to 3c1437d70 change no file of this pull request, none imported by one, nothing that decides which checks run, and no core path.

Reviews at ae1b4fb: omo gate CLEAR (LOWs only: cause shown in a loaded local run and the one branch recurrence; two other scripts still allow the service worker, a follow-up); Codex via axwith (short, read-only) CLEAR, no verified findings. Test-only change; the ui-access-regression quarantine stays, pointed at #4026 for its two other failures. Integration tests at 0667f59 first failed in two tests this PR does not touch (OpenCode v2 native service send settling; a 30 s timeout in 'reads the live API without a report'); the failed job was rerun.

devswha added a commit that referenced this pull request Nov 28, 2026
…tempt failures (#4990)

## What

Three browser scripts that failed on their first attempt in CI, each
fixed at its cause (test code only; no sleeps, no longer timeouts, app
unchanged).

**agy-chat-browser-qa.ts** (run 46144224001, `TimeoutError: waitFor:
Timeout 12000ms` on the unavailable-chat reason). After `DROP TABLE
steps` the catalog was just written, so the server answers a read "try
again" for 5 s (`AGY_WRITE_RACE_MS`, server/conversation.ts), and the
chat asks again on its 10 s backstop: the reason showed about **11.3 s**
after the drop, against a 12 s wait. The script now dates the dropped
catalog (and its WAL) back a minute, as a catalog Agy stopped writing:
the reason shows after about **1.3 s**. Its page also comes from
`appContext` (service worker blocked).

**connect-dialog-scroll-regression.ts** (main, 3 runs; `relay: the tab
bar stays put while the body scrolls`, `100 !== 114.75`). The relay
tab's sign-in asked the real `https://account.ovis.sh/v1/providers`;
until it answers the tab shows a disabled "Sign in to Ovis" placeholder,
then the provider buttons, a taller dialog whose re-centred tab bar
moves up. When that answer landed between the tab's two measurements,
the check failed. The provider list is now a fixture, and the relay tab
waits for its buttons before measuring. The context comes from
`appContext` (service worker blocked).

**ui-regression.ts** (a branch failure, `goto: Timeout 10000ms
exceeded`). Its eight contexts allowed the app's service worker, the
hang #4777/#4977 found (a module preload the worker answers is aborted
under load). They now come from `appContext`. The only test touching the
worker there (the push subscription after alerts off) reads
`navigator.serviceWorker.getRegistration()`, which still answers with no
registration.

The three scripts leave `scripts/direct-contexts.json`; the
`ui-access-regression.ts` quarantine note no longer names the
connect-dialog failure (the entry stays for the relay's "Online." wait,
#4026).

## Validation

All runs in `herdr-ci-runner:local` on old-desktop (uid 1001, `CI=true`,
4 busy loops beside the script).

| Script | Before (main ca4f188) | After |
|---|---|---|
| agy-chat-browser-qa | 20/20 pass at 2 CPUs, 20/20 at 1 CPU (not
reproduced by load); **5/5 fail** with the CI error when conversation
answers are 1 s slower | 20/20 pass at 2 CPUs and 1 CPU (twice); 5/5
pass with the 1 s delay |
| connect-dialog-scroll | 20/20 pass at 2 CPUs, 20/20 at 1 CPU; **3/3
fail** with the exact CI assertion (`100 !== 114.75`) when the provider
list is released at the relay tab's first measurement | 20/20 pass at 2
CPUs (final head) ; 3/3 pass with the same release |
| ui-regression | 20/20 pass at 3 CPUs (not reproduced) | 20/20 pass at
3 CPUs |

Service worker responses per reload on ui-regression's main page: 21
with `browser.newContext`, 0 with `appContext` (5 reloads each).

`bun run typecheck`: exit 0. `bun test scripts/conventions.test.ts
scripts/app-context.test.ts`: 66 pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI flake: ui-access-regression relay panel waits 15 s for .conn-live after reopening the page

1 participant