Skip to content

test(browser): play the draft clip at rate 0 instead of looping it before the Play click - #3446

Merged
matt2e merged 2 commits into
mainfrom
mtoohey/flake-draft-clip-rate-zero
Nov 14, 2026
Merged

matt2e merged 2 commits into
mainfrom
mtoohey/flake-draft-clip-rate-zero

Conversation

@matt2e

@matt2e matt2e commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Why

composer-attachments.spec.mjs, "local previews stay interactive during eager upload and removal collapses the composer", hung once in CI: 11 Nov, Flake check, WebKit 7/9, passed on re-run. The "Play video" click stayed in "performing click action" past its 10 s action timeout, the test ran to its 120 s timeout, and the error context holds no page snapshot.

This PR is a mitigation. The root cause is not pinned down.

What the trace shows

The test pauses the review viewer's autoplaying 2 s clip with loop = true; pause() and then clicks "Play video". The failed attempt's trace (artifact 13898342784) shows:

  • the viewer opening at 12.07 s and the clip at 1.250 s in the dialog screenshot at 12.52 s;
  • a blank stage with the clip reset to 0 at 13.17 s under the same blob source;
  • the clip playing at 1.417 s at 14.08 s, the loop = true; pause() evaluate at 14.11 s (paused at 1.583 s), and the Play click at 14.13 s;
  • a last screencast frame at 14.40 s with the clip back on its first frame. No frame followed in the remaining 110 s and the click never returned.

The clip was mid-way and never reached its end after loop was set, so a loop seek did not occur. The page froze when the click resumed the paused pipeline. The exact WebKit mechanism is unknown.

Change

Set playbackRate = 0 instead of loop, as messages.spec.mjs does since #3058. A zero-rate play turns paused false without advancing the clock, so the Play click leaves the clip on its paused frame and the clip can neither end nor loop while the eager-upload assertions run. The Pause button, paused, same-element and same-source assertions are unchanged.

The second commit corrects the code comment, which first attributed the stall to the loop seek. It now says the cause is not pinned down and that rate 0 removes both the end and the loop seek.

No timeouts or assertions were relaxed. No browser cases were added or removed.

Evidence

Local runs on Linux, WebKit, -g "local previews stay interactive".

Scope Unchanged test With rate 0
Idle host, --workers=1 --repeat-each=10 10/10 passed, 12.5 to 13.0 s 10/10 passed, 13.0 to 17.2 s
Pinned to 4 CPUs shared with 5 busy loops, --repeat-each=6 6/6 passed, 24.9 to 31.2 s 6/6 passed, 26.5 to 31.9 s
Whole file, --workers=2 WebKit 10/10, Chromium 10/10

A scratch copy that waited for ended before taking over passed 3/3 with rate 0 and 3/3 with loop, so the ended path needs no extra seek. After the comment correction, user-status.spec.mjs and this spec passed 11/11 together on WebKit.

Not reproduced, not run

  • The stall was not reproduced locally, with or without the change. The contended runs matched the 27 to 29 s of the job's passing repeats and still passed.
  • Because the mechanism is unknown, this change removes two candidate triggers but is not shown to remove the hang. The test needs watching after it lands.
  • No human has tested this yet, so buzz-review-completed is not set.

Left alone

🤖 Generated with Claude Code

matt2e and others added 2 commits November 13, 2026 13:42
…fore the Play click

The "local previews stay interactive" test pauses the review viewer's
autoplaying 2 s clip with `loop = true; pause()` and clicks "Play
video". In Flake check (webkit, 7/9) job 130840308592 (2026-11-11) that
click never completed: it stayed in "performing click action" past its
10 s action timeout, the test ran to its 120 s timeout, and
error-context.md holds no page snapshot.

The triage read the job's artifact as having no trace, but that artifact
came from the job's re-run attempt (its ci-report.json starts at 23:13,
after the 23:02 failure); the failed attempt's artifact (13898342784)
has the trace. It shows the viewer opening at 12.07 s, the clip at
1.250 s in the 12.52 s dialog screenshot, a blank stage with the clip
reset to 0 at 13.17 s under the same blob src, the clip playing at
1.417 s at 14.08 s, the `loop = true; pause()` evaluate at 14.11 s
(paused at 1.583 s) and the Play click at 14.13 s. The last screencast
frame, at 14.40 s, shows the clip back on its first frame; no frame
followed in the remaining 110 s and the click never returned. The clip
was mid-way and never reached its end after `loop` was set, so the loop
seek the triage suspected did not occur: the page froze when the click
resumed the paused pipeline, and the exact WebKit mechanism is not
pinned down.

Set `playbackRate = 0` instead of `loop`, as messages.spec.mjs does
since #3058. A zero-rate play turns `paused` false without advancing the
clock, so the Play click leaves the clip on its paused frame and the
clip can neither end nor loop while the eager-upload assertions run. The
Pause button, `paused`, same-element and same-src assertions are
unchanged.

The stall was not reproduced locally. Unfixed, WebKit, -g "local
previews stay interactive":
- idle host, --workers=1 --repeat-each=10: 10/10 (12.5–13.0 s).
- pinned to 4 CPUs shared with 5 busy loops (taskset), --repeat-each=6:
  6/6 (24.9–31.2 s, close to the 27–29 s of the job's passing repeats).
  2 CPUs with 6 loops only made page.goto time out at 15 s (8/8), before
  the clip was reached.
Fixed, WebKit: idle 10/10 (13.0–17.2 s); same 4-CPU contention 6/6
(26.5–31.9 s). Whole file, --workers=2: WebKit 10/10 (53.8 s), Chromium
10/10 (45.1 s). A scratch copy that waited for `ended` before taking
over passed 3/3 with rate 0 (the click seeks to 0 and reports paused
false) and 3/3 with `loop`, so the ended path needs no extra seek. Biome
is clean on the file. These runs guard against regression; they do not
reproduce CI timing.

Not addressed here: the earlier reset of the same video element at about
13 s in the failing run, and this spec's cold per-test dev server.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: mtoohey <[email protected]>
Signed-off-by: Matt Toohey <[email protected]>
The comment on the rate-0 play in "local previews stay interactive"
attributed the Linux WebKit stall to a looping clip's seek back to 0.
The failing run's trace showed that seek did not occur: the clip was
mid-way when the Play click hung. Say the cause is not pinned down and
that rate 0 removes both the end and the loop seek, as messages.spec.mjs
does.

Comment only; the test's steps and assertions are unchanged.

Verified as part of the combined review follow-up, before it was split
by path: `bin/pnpm test:browser:ci --project webkit --no-deps
--workers=1 tests/browser/user-status.spec.mjs
tests/browser/composer-attachments.spec.mjs` passed 11 of 11 (1.4 m),
and biome check --error-on-warnings is clean on the file.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: mtoohey <[email protected]>
Signed-off-by: Matt Toohey <[email protected]>
@matt2e
matt2e requested a review from a team as a code owner November 13, 2026 02:49

@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. Approved.

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 at head f2e83b91367276ed222db92f32af0f52522acb85 against base 7f03764beb8eb0ddcb4ff9ec0b8bda3e07699716.

The zero-rate setup preserves the real Play action, Pause control visibility, unpaused state, and element/source continuity across eager upload. It reuses the existing messages-test pattern without adding cases, relaxing assertions or persisting a playback preference. It does not establish advancing-frame or natural-end behavior.

Inspected the hosted flake-check run reports at merge 99c0356dd79dd241690515eb243170e4b1e0fa7f, whose parents match the reviewed head/base: the changed journey passed 10/10 repetitions in each engine. WebKit: 115.8 s elapsed wall time, 218.3 s summed test execution, slowest repetition 26.1 s. Chromium: 128.0 s elapsed, 237.1 s summed execution, slowest repetition 25.6 s. These are hosted samples, not a matched before/after performance comparison.

Source-only review; I ran no tests or application. The original Linux WebKit hang and this mitigation’s effectiveness remain unverified, as the PR description states. The author’s ended-before-setup and forced-load runs were not independently reproduced.

@matt2e
matt2e merged commit 40ea42f into main Nov 14, 2026
47 checks passed
@matt2e
matt2e deleted the mtoohey/flake-draft-clip-rate-zero branch November 14, 2026 00:46
wpfleger96 added a commit that referenced this pull request Nov 14, 2026
…y-unreads

* origin/main: (24 commits)
  [1/2] feat(agents): add a recommended agent setup (core) (#3344)
  test(browser): survive the live-stream restart a page-clock jump causes (#3442)
  chore(renovate): hold rusqlite below 0.41 for mesh-llm (#3438)
  test(browser): serve the diffs and CLI reload fixtures outside the navigation budget (#3445)
  test(browser): play the draft clip at rate 0 instead of looping it before the Play click (#3446)
  fix(status): reopen a status whose preset deadlines coincide as Today (#3449)
  fix(messages): tolerate a cancelled reaction-name chunk load (#3450)
  fix(pairing): tolerate /proc/net/tcp rows printed twice or missed (#3451)
  test(browser): wait on the signal each test asserts in local-agent-activity and message-navigation (#3444)
  Expose native channel headings to Solo sources (#3523)
  test(browser-host): run the 100,000-channel broker scale check alone in the measurements lane (#3447)
  fix(solo): keep every contributed destination action (#3516)
  fix(identity): report an issuer that keeps rate-limiting an agent as a limit (#2365)
  fix(identity): let a stuck at-launch sign-in copy its link (#2453)
  fix(profiles): open avatar previews on hover in compact density (#3510)
  feat(solo): smooth chat recency reordering (#3502)
  Reject self-mentions that cannot wake another session (#3513)
  feat(status): offer don't clear for every status (#3515)
  Let plugin panels name their tab with panels.useTabTitle (#3251)
  fix(agents): report a conversation wake that fails before its turn starts (#2192)
  ...

# Conflicts:
#	tests/browser/message-management.spec.mjs
wpfleger96 added a commit that referenced this pull request Nov 14, 2026
* origin/main: (27 commits)
  [2/2] feat(agents): offer Automatic (Recommended) in Create agent and Identity (#3345)
  fix(solo): preserve and resume unsent chat drafts (#3525)
  fix(builderlab): give refused app sign-ins and Identity links a route to Organization sign-in (#3078)
  fix(agents): say why Import an agent can't import here, and link Manage plugins (#3073)
  [1/2] feat(agents): add a recommended agent setup (core) (#3344)
  test(browser): survive the live-stream restart a page-clock jump causes (#3442)
  chore(renovate): hold rusqlite below 0.41 for mesh-llm (#3438)
  test(browser): serve the diffs and CLI reload fixtures outside the navigation budget (#3445)
  test(browser): play the draft clip at rate 0 instead of looping it before the Play click (#3446)
  fix(status): reopen a status whose preset deadlines coincide as Today (#3449)
  fix(messages): tolerate a cancelled reaction-name chunk load (#3450)
  fix(pairing): tolerate /proc/net/tcp rows printed twice or missed (#3451)
  test(browser): wait on the signal each test asserts in local-agent-activity and message-navigation (#3444)
  Expose native channel headings to Solo sources (#3523)
  test(browser-host): run the 100,000-channel broker scale check alone in the measurements lane (#3447)
  fix(solo): keep every contributed destination action (#3516)
  fix(identity): report an issuer that keeps rate-limiting an agent as a limit (#2365)
  fix(identity): let a stuck at-launch sign-in copy its link (#2453)
  fix(profiles): open avatar previews on hover in compact density (#3510)
  feat(solo): smooth chat recency reordering (#3502)
  ...

# Conflicts:
#	src-tauri/src/federated_identity/agent/tests.rs
#	src-tauri/src/federated_identity/mod.rs
#	src-tauri/src/federated_identity/protocol.rs
joahg added a commit to joahg/buzz-app that referenced this pull request Nov 14, 2026
* origin/main: (133 commits)
  Expose ordinary chats without workspace headings (block#3530)
  [2/2] feat(agents): offer Automatic (Recommended) in Create agent and Identity (block#3345)
  fix(solo): preserve and resume unsent chat drafts (block#3525)
  fix(builderlab): give refused app sign-ins and Identity links a route to Organization sign-in (block#3078)
  fix(agents): say why Import an agent can't import here, and link Manage plugins (block#3073)
  [1/2] feat(agents): add a recommended agent setup (core) (block#3344)
  test(browser): survive the live-stream restart a page-clock jump causes (block#3442)
  chore(renovate): hold rusqlite below 0.41 for mesh-llm (block#3438)
  test(browser): serve the diffs and CLI reload fixtures outside the navigation budget (block#3445)
  test(browser): play the draft clip at rate 0 instead of looping it before the Play click (block#3446)
  fix(status): reopen a status whose preset deadlines coincide as Today (block#3449)
  fix(messages): tolerate a cancelled reaction-name chunk load (block#3450)
  fix(pairing): tolerate /proc/net/tcp rows printed twice or missed (block#3451)
  test(browser): wait on the signal each test asserts in local-agent-activity and message-navigation (block#3444)
  Expose native channel headings to Solo sources (block#3523)
  test(browser-host): run the 100,000-channel broker scale check alone in the measurements lane (block#3447)
  fix(solo): keep every contributed destination action (block#3516)
  fix(identity): report an issuer that keeps rate-limiting an agent as a limit (block#2365)
  fix(identity): let a stuck at-launch sign-in copy its link (block#2453)
  fix(profiles): open avatar previews on hover in compact density (block#3510)
  ...

Signed-off-by: Joah Gerstenberg <[email protected]>

# Conflicts:
#	src/bundled/codex/prompt.test.ts
#	src/bundled/goose/runtime.ts
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