Repository navigation
test(browser): deflake relay-recovery and solo-legacy-invitation - #3681
Merged
Merged
Conversation
Two WebKit journeys fail now and then in CI on branches that cannot affect them. Both are races in the tests, not product defects. This changes the two spec files only; no production code. relay-recovery.spec.mjs: wait for the open channel's own refused read The test cuts the network, waits for the open channel's catch-up read to meet the outage, jumps the clock 30 s and expects the connection notice to stay up. The wait accepted a refused /query from any community. CI traces show the second community's background reads refused first, so the clock jumped before the open channel's read was refused. The notice then cleared once the live socket returned, and the later refusal started a fresh 30 s timer that the test's clock never advances. The failure is toBeInViewport "element(s) not found" on the notice, for example run 43995560292 job 133746953063 (webkit 5/18). It began after PR #3459 added a background session for other communities. The wait now passes only when a refused primary /query carries the open channel's timeline head. The filter test is the one isChannelHead uses in src/features/relay/session.ts, depth_limit clause included. The comment above the wait already asked for this; the condition now does what it says. solo-legacy-invitation.spec.mjs: seed the colour mode before boot Each colour-mode pass did goto, a localStorage write, then reload about 40 ms later, while the app was still booting. In WebKit that reload can fail the document request with "WebKit encountered an internal error" (run 43995560292 job 133746953195, webkit 6/18). PR #1972 fixed the same pattern in settings.spec.mjs and account-profile.spec.mjs. As there, the mode is now written by an init script before the document loads, and the boot reload is gone. The second pass adds a second script; scripts run in the order added, so the last mode wins. The reload the test is about, after Retry, is unchanged, and the existing data-color-mode assertion still proves each pass booted in its mode. Not touched: find-on-screen.spec.mjs. Its race is fixed by a commit in open PR #3647. Evidence. All local, macOS 27.2, Playwright 1.63.0, on 23d1d70 plus this change, with --no-deps and the config's two workers. Hosted CI runs Linux WebKit and was not run. relay-recovery, forced ordering. Temporary copies of the spec outside the repository, each with the same two additions: a refused second-community /query recorded at the moment of the outage, and a one second pause before the toBeInViewport assertion, as on a slower runner. - Previous wait (the spec at 23d1d70): 20 of 20 fail, 10 Chromium and 10 WebKit, every one at the toBeInViewport assertion with "element(s) not found", the CI error. - New wait (the spec in this commit): 20 of 20 pass, 10 Chromium and 10 WebKit. relay-recovery, unforced. The committed spec with --repeat-each=10: 20 of 20 pass, 10 Chromium and 10 WebKit. solo-legacy-invitation. The committed spec with --repeat-each=10: 20 of 20 pass, 10 Chromium and 10 WebKit. There is no fail-before run: the CI failure has not been reproduced on macOS WebKit, so these runs show the journey still works, not that the flake is gone. That proof is the error staying absent from CI. One guard check for the new seeding, in a temporary copy with the init script removed: the "dark" pass fails on both engines at the data-color-mode assertion (expected "dark", received "light"). So the init script is what sets the mode, and that assertion is live. Static checks, in the new worktree: - pnpm typecheck (tsc --noEmit) passed. - pnpm lint (biome lint --error-on-warnings plus the icon check) passed. It reports 39 infos, none in the touched files. - biome format on the two files reports no changes. - git diff --check is clean. Not run: the rest of the browser suite, the unit tests, and any hosted CI job. Signed-off-by: Matt Toohey <contact@matttoohey.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
wesbillman
reviewed
Nov 17, 2026
wesbillman
left a comment
Collaborator
There was a problem hiding this comment.
🤖 Star Lord: no blocking findings at fd57e82; recommend approval once required CI passes. Source review only; CI was still running at the single status snapshot.
wesbillman
approved these changes
Nov 17, 2026
tellaho
added a commit
that referenced
this pull request
Nov 17, 2026
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz> * origin/main: test(browser): deflake relay-recovery and solo-legacy-invitation (#3681) Align message and composer typography (#2990) fix(repos): fix commit counts, file sizes and commit heading copy (#3686) fix(usage): count standalone timer and watch turns (#3518) Avoid rewriting unchanged artifact indexes (#3672) ci(release): keep release Rust caches from being evicted (#3665) Give the community join dialog a navigation visit (#3063) Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
joshfriend
added a commit
that referenced
this pull request
Nov 17, 2026
…-navigation * origin/main: (41 commits) fix: open threads at the first unread reply (#3689) Share channel media viewers and icons with panels (#3626) ci(deny): accept the chrono and humantime unmaintained advisories (#3710) feat(messages): forward readable message snapshots (#3631) ci(release): cache Rust in the Linux release build (#3692) feat(agents): transparent emoji avatar background (#2895) feat(agents): pan and zoom agent avatars (#2611) feat(agents): expose safe model settings in agent_read (#3639) fix(codex): steer waiting messages into one turn instead of a turn each (#3624) feat(builderlab): read a remote agent's stored sessions (#3601) ci: give Chromium shards headroom so 7/9 stops hitting the job cap (#3691) fix(agents): drop "Work with unconfirmed thread" from the Working now card (#3693) test(browser): deflake relay-recovery and solo-legacy-invitation (#3681) Align message and composer typography (#2990) fix(repos): fix commit counts, file sizes and commit heading copy (#3686) fix(usage): count standalone timer and watch turns (#3518) Avoid rewriting unchanged artifact indexes (#3672) ci(release): keep release Rust caches from being evicted (#3665) Give the community join dialog a navigation visit (#3063) feat(plugins): expose the host sharing picker (#2761) ... Signed-off-by: Josh Friend <jfriend@block.xyz> # Conflicts: # src/bundled/channels/PageTabs.tsx
joshfriend
added a commit
that referenced
this pull request
Nov 17, 2026
* origin/main: (50 commits) Remove the bundled Todos plugin (#3729) Name GitHub panel tabs after the pull request (#3712) fix: open threads at the first unread reply (#3689) Share channel media viewers and icons with panels (#3626) ci(deny): accept the chrono and humantime unmaintained advisories (#3710) feat(messages): forward readable message snapshots (#3631) ci(release): cache Rust in the Linux release build (#3692) feat(agents): transparent emoji avatar background (#2895) feat(agents): pan and zoom agent avatars (#2611) feat(agents): expose safe model settings in agent_read (#3639) fix(codex): steer waiting messages into one turn instead of a turn each (#3624) feat(builderlab): read a remote agent's stored sessions (#3601) ci: give Chromium shards headroom so 7/9 stops hitting the job cap (#3691) fix(agents): drop "Work with unconfirmed thread" from the Working now card (#3693) test(browser): deflake relay-recovery and solo-legacy-invitation (#3681) Align message and composer typography (#2990) fix(repos): fix commit counts, file sizes and commit heading copy (#3686) fix(usage): count standalone timer and watch turns (#3518) Avoid rewriting unchanged artifact indexes (#3672) ci(release): keep release Rust caches from being evicted (#3665) ...
joshfriend
added a commit
that referenced
this pull request
Nov 17, 2026
…ation-links * origin/main: (75 commits) Sidebar sections contributed by plugins, no visible change. (#3695) feat(dms): add people and agents to a DM (#2670) feat(search): revamped search UI with ranked groups, preview (#3547) fix(github): read pull request states in small requests so checks survive many links (#3713) Remove the bundled Todos plugin (#3729) Name GitHub panel tabs after the pull request (#3712) fix: open threads at the first unread reply (#3689) Share channel media viewers and icons with panels (#3626) ci(deny): accept the chrono and humantime unmaintained advisories (#3710) feat(messages): forward readable message snapshots (#3631) ci(release): cache Rust in the Linux release build (#3692) feat(agents): transparent emoji avatar background (#2895) feat(agents): pan and zoom agent avatars (#2611) feat(agents): expose safe model settings in agent_read (#3639) fix(codex): steer waiting messages into one turn instead of a turn each (#3624) feat(builderlab): read a remote agent's stored sessions (#3601) ci: give Chromium shards headroom so 7/9 stops hitting the job cap (#3691) fix(agents): drop "Work with unconfirmed thread" from the Working now card (#3693) test(browser): deflake relay-recovery and solo-legacy-invitation (#3681) Align message and composer typography (#2990) ... Signed-off-by: Josh Friend <jfriend@block.xyz> # Conflicts: # src/features/channel-navigation/ChannelInventory.test.tsx
wpfleger96
added a commit
that referenced
this pull request
Nov 17, 2026
* origin/main: (93 commits) fix(unread): narrow a full evidence window instead of emptying it (#3716) Sidebar sections contributed by plugins, no visible change. (#3695) feat(dms): add people and agents to a DM (#2670) feat(search): revamped search UI with ranked groups, preview (#3547) fix(github): read pull request states in small requests so checks survive many links (#3713) Remove the bundled Todos plugin (#3729) Name GitHub panel tabs after the pull request (#3712) fix: open threads at the first unread reply (#3689) Share channel media viewers and icons with panels (#3626) ci(deny): accept the chrono and humantime unmaintained advisories (#3710) feat(messages): forward readable message snapshots (#3631) ci(release): cache Rust in the Linux release build (#3692) feat(agents): transparent emoji avatar background (#2895) feat(agents): pan and zoom agent avatars (#2611) feat(agents): expose safe model settings in agent_read (#3639) fix(codex): steer waiting messages into one turn instead of a turn each (#3624) feat(builderlab): read a remote agent's stored sessions (#3601) ci: give Chromium shards headroom so 7/9 stops hitting the job cap (#3691) fix(agents): drop "Work with unconfirmed thread" from the Working now card (#3693) test(browser): deflake relay-recovery and solo-legacy-invitation (#3681) ... # Conflicts: # src/features/relay/unread.test.ts # src/features/relay/unread.ts
This was referenced Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Two WebKit browser journeys fail now and then in CI on branches that cannot affect them. One failed test fails its shard and
CI required, because the Playwright config setsretries: 0, and the only recovery is a manual re-run. Both are races in the tests themselves, not product defects.tests/browser/relay-recovery.spec.mjs:9, "relay reads recover automatically after the network returns".tests/browser/solo-legacy-invitation.spec.mjs:49, "Outbox Retry reconciles a recorded then removed Solo invitation without replaying it".This PR is test-only. It changes those two spec files (+26 −9) and no production code. No journey is added or removed.
Both failures surfaced together in one CI run on #3677 (run 43995560292, attempt 1). That PR did not cause them. It renames a presence label in the profile panel, which neither journey opens or asserts. The failed jobs passed on re-run at the same commit, and the same failure signatures appear on other branches, listed below.
relay-recovery: the wait was satisfied by another community's read
The failure.
toBeInViewportreports "element(s) not found" for the connection notice, on WebKit shard 5/18. Example: run 43995560292, job 133746953063.The race. The test cuts the network, waits for the open channel's catch-up read to meet the outage, jumps the clock 30 s, and expects the connection notice to stay up. The wait accepted a refused
/queryfrom any community. In the CI trace the second community's background reads were refused first, so the wait passed on one of them and the clock jumped before the open channel's own read was refused:/queryclock.fastForward(30_000)/queryfor the open channel's communitycreateRecoveryinsrc/features/relay/recovery.tshides the notice as soon as no source is failed or busy. Once the live socket returns there is an instant where nothing is failed, just before the open channel's read is queued and refused. That later refusal starts a fresh 30 s notice timer, which the test's clock never advances.Why now. #3459 added a background session for other communities, which is the source of the early second-community refusals. In a sweep of CI runs from 14 to 17 Nov, this exact signature failed in 5 of the 126 completed runs created after #3459 merged, and in none of the 660 completed runs created before it.
The fix. The wait now passes only when a refused
/queryfor the primary community carries the open channel's timeline head. The filter test is the oneisChannelHeaduses insrc/features/relay/session.ts,depth_limitclause included. The comment above the wait already asked for this. Once that read is refused, the channel's head stays failed or pending while the outage holds, so recovery cannot go idle and the notice cannot clear before the network returns.solo-legacy-invitation: a reload while the app was still booting
The failure.
page.reload: WebKit encountered an internal error, on WebKit shard 6/18, followed by the fixture's console-error check failing on the resulting "Failed to load resource" message. Example: run 43995560292, job 133746953195.The race. Each colour-mode pass did
goto, alocalStoragewrite, thenreload. In the CI trace the reload began 39 ms aftergotoresolved, while the app was still booting. The trace shows the in-flight boot requests cancelled at that moment, then the document request hanging 3.5 s and failing. #1972 diagnosed and fixed the same pattern insettings.spec.mjsandaccount-profile.spec.mjs, but not in this spec.The fix. As in #1972, the mode is written by an init script before the document loads, and the boot reload is gone. The second pass adds a second script. Scripts run in the order added, so the last mode wins. The reload the test is about, after Retry, is unchanged. The existing
data-color-modeassertion still proves each pass booted in its mode.Known limit. The trigger is established from the trace and matches #1972's diagnosis. The reason WebKit fails the document request is not established.
Occurrences on other branches
From a sweep of 1,196 CI workflow runs created between 2026-11-14 01:25Z and 2026-11-17 01:49Z, excluding the #3677 run. History before 14 Nov was not swept. The 12 Nov run was found by hand.
relay-recovery.spec.mjs:9, line 83 onmain,toBeInViewport"element(s) not found"solo-legacy-invitation.spec.mjs:49,page.reload: WebKit encountered an internal errorOne more run failed
relay-recovery.spec.mjs:9at other lines: run 43683311686 on #3551's own branch, which rewrites the test's navigation. It is not counted above.Evidence
All local: macOS 27.2, Playwright 1.63.0, on
23d1d7045bplus this change, with--no-depsand the config's two workers.toBeInViewportassertion with "element(s) not found"--repeat-each=10--repeat-each=10data-color-modeassertion: expected "dark", received "light"pnpm typecheckpnpm lintbiome formaton the two files,git diff --check/queryrecorded at the moment of the outage, and a one second pause before thetoBeInViewportassertion, as on a slower runner. The only difference between the two runs is the wait.data-color-modeassertion is live.Not proven and not run
git push --no-verify, so the hook did not run.23d1d7045b.mainhas since gained one commit, a release CI change (ci(release): keep release Rust caches from being evicted #3665) that touches neither spec. The branch was not rebased.Not included, and related PRs
find-on-screen.spec.mjsis deliberately left out. A third WebKit flake failed in the same run:window.openFind is not a function. Commitc111ae8c6d"test(search): await find shortcut registration" in open PR feat(solo): grant chat admin access to owned agents #3647 already fixes it by waiting for the hook to be registered. Changing the same lines here would only conflict with it./querycarries atop_levelfilter for the channel. That PR is a 628-file draft that currently conflicts withmain, so it is not a near-term fix.solo-legacy-invitation.spec.mjsbut leave the boot reload in place.🤖 Generated with Claude Code