镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

test(navigation): split the plugin-settings return-path journey - #2800

Merged
matt2e merged 1 commit into
mainfrom
test/split-plugin-settings-return-path
Nov 7, 2026
Merged

matt2e merged 1 commit into
mainfrom
test/split-plugin-settings-return-path

Conversation

@matt2e

@matt2e matt2e commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Failing test

src/app/navigation.test.tsx "keeps a return path for addressed plugin settings and retires it on Close" (added by #2491) fails intermittently in the Vitest flake-check lane:

Error: Test timed out in 5000ms.

It is one long journey on a full App mount with the default 5000 ms timeout: open the Plugins list, open Pair mobile, Back, Forward, open Appearance, open Pair mobile, Close, Back, Back.

Why this is a timeout flake, not a race

The test is slow all the time, and every failure is the same timeout. No assertion has failed.

  • Main: 25 green JavaScript shard runs since Offer plugin updates from the Buzz shell #2491 took 2148–4414 ms (median 3921 ms). That leaves under 1.2 s of headroom.
  • Flake-check failures: each one was a cold iteration 1 that ran past 5000 ms. The same test then passed iterations 2–5 at its usual speed, with no product or test change between them.
Run Iter 1 Iters 2–5
#2718 42217828904, Flake check 1/2 × 5045 ms 4061–4133 ms
#2718, Flake check 2/2 3796 ms 3377–3581 ms
#2729 42194107421 attempt 1 × 5055 ms 3973–4399 ms
#2729 attempt 2 × 5224 ms 4016–4423 ms

What this changes

The test is split where its title already splits. Each new test mounts its own App with the file's usual per-test setup. The 5000 ms timeout is unchanged.

  1. "keeps a return path for addressed plugin settings through Back and Forward": open the list, open Pair mobile, Back, Forward. These are the original's first-half assertions, verbatim.
  2. "retires every visit to addressed plugin settings on Close": open the list, open Pair mobile, open Appearance, open Pair mobile, Close, Back, Back. These are the original's second-half assertions, verbatim.
    • The test keeps one earlier Pair mobile visit behind Appearance. dismissPluginDetails retires every matching visit, and the final Back landing on the list is what proves it.
    • Without the earlier visit, that last assertion is vacuous. With Close mutated to retire only the current visit (navigation.dismiss([navigation.snapshot().entry.id], settings)):
Version Result with the mutated Close
Original test fails
Split without the earlier visit passes (misses the regression)
This split fails

Every assertion in the original test is kept in one of the two tests. Production code is unchanged.

Verification

All runs were local, on macOS (16 cores). The flake-check runs happened while the machine was under heavy unrelated load (load average 35–40).

  • tsc --noEmit and biome check --error-on-warnings src/app/navigation.test.tsx pass.
  • Each new test passes run alone (-t), and the whole file passes under --sequence.shuffle with seeds 1–3. Seed 2 runs the Close test first.

Per-test timings (ms). The command was BUZZ_TEST_WORKERS=2 ./bin/node scripts/flake-check.mjs vitest --iterations=5 <files>. The file list is the same 15-file selection as #2718's failing lane.

Test 1 2 3 4 5
Before: original (on 3bcf1c4bb) 2407 1994 2487 2037 4920
After: Back and Forward 1399 2071 1538 906 1384
After: Close 1951 2966 2131 1496 1801

Running navigation.test.tsx alone the same way: Back and Forward took 848–1595 ms and Close took 1352–2114 ms, with 0 of 5 iterations failing.

Headroom. The local worst case drops from 4920 to 2966 ms. The Close half is the longer one, at about 0.75–0.8× the original's local time. Scaled to CI's 3921 ms median, it should land near 3 s, about 1.8–2 s under the timeout instead of about 1.1 s. That is an estimate. This PR's own flake-check lane will repeat the edited file and give the real CI numbers.

Unrelated local failures. Each 15-file run had one failure in src/app/entity-navigation.test.tsx, which this PR does not touch, and both happened under the load above:

  • Before: "opens Inbox for a malformed launch link when the catalog settles after the client" failed a findByRole wait.
  • After: "normalizes old Bestie links … retaining { …(2) } scope" timed out at 5608 ms.

No browser journeys were added or removed.

🤖 Generated with Claude Code

"keeps a return path for addressed plugin settings and retires it on
Close" (added by #2491) is one long full-App journey with the default
5000 ms timeout. Green CI runs took up to 4.4 s, and three flake-check
iterations timed out at 5045-5224 ms.

Split it into its two behaviours, each mounting its own App:

- Back and Forward: open the Plugins list, open Pair mobile, Back,
  Forward.
- Close: open the list, open Pair mobile, open Appearance, open Pair
  mobile, Close, Back, Back. The earlier Pair mobile visit stays in
  history so the last Back still proves that Close retires every
  matching visit, as dismissPluginDetails does. Without it, a Close that
  retired only the current visit would still pass.

Every assertion is kept. The timeout is unchanged.

Signed-off-by: Matt Toohey <contact@matttoohey.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@matt2e
matt2e requested a review from a team as a code owner November 6, 2026 13:54

@kazemek21 kazemek21 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Kyle reviewed this PR and the Nexus review-tracker notes and approved with no comments.

Posted by Codex (gpt-6.1-sol) on behalf of kylez.

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Star Lord’s automated source review via Wes’s account.

No actionable findings in the test split after independent Rocket, Mantis and Groot reviews and Star Lord integration. The Back/Forward assertions are preserved, and the separate Close test keeps two Pair mobile visits separated by Appearance, so its final Back assertion still detects retirement of only the current visit. Each case uses fresh services and the existing awaited teardown; production code and the 5000 ms timeout are unchanged.

Observed hosted evidence at this head: CI run 42229295012 succeeded. Both Vitest flake lanes ran the full 18-case navigation file five times each, with no failures. Back/Forward measured 1781–2060 ms and Close 2761–3153 ms; the regular shard passed 18/18 in 23.884 s. This supports per-case timeout headroom, not reduced aggregate execution cost or proof that all timing failures are eliminated.

Reviewed head 8a77a99f4394e9f2de605ecdd61d0a3651b20805, base 067db608fbc624e56161ccf3e4ff1c0f11c30baf (PR merge-base 3bcf1c4bb1111d924a84d9b710c1da2db80ccf0b). Source-only review; no local tests or app execution. Author-reported baseline, shuffle and mutation experiments were not independently rerun.

@matt2e
matt2e merged commit 898df08 into main Nov 7, 2026
43 checks passed
@matt2e
matt2e deleted the test/split-plugin-settings-return-path branch November 7, 2026 00:18
tellaho added a commit that referenced this pull request Nov 7, 2026
Integrate the mainline sidebar geometry correction while retaining the dialog focus changes.

Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>

* origin/main:
  fix(sidebar): give Drafts & sent the page rows' icon box (#2946)
  fix(sidebar): drop the draft pencil from channel and DM rows (#2943)
  feat(channels): create #general for the owner of an empty community (#2904)
  feat(agents): move local teams to the relay and show sync state (#2846)
  Preserve legacy emoji avatars during agent import (#2849)
  feat(communities): skip join consent covered by a Builderlab account (#2912)
  fix(mentions): keep @mentions tagged when punctuation or quotes follow the name (#2713)
  fix(sidebar): align Drafts & sent row with channel rows (#2733)
  test(navigation): split the plugin-settings return-path journey (#2800)
  fix(messages): let Escape close Forward and return focus to ⋯ (#2807)
  fix(messages): say older messages can load once Buzz reconnects, instead of an inert Load older button (#2810)
  fix(navigation): say when the open page's plugin is turned off, and open it in Manage plugins (#2817)
  fix(settings): reopen plugin details on Back and Forward (#2825)
  fix(agents): show agent card pictures without a backdrop (#2828)
  feat(agents): team instructions history and agent/team config tools (#2848)
  test(plugin-manager): use an immutable git socket fixture (#2665)
  fix(attention): show the attention toggle when an agent has nothing yet (#2907)

Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
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.

3 participants