opacity.spec:62 times out on webkit-1440 under load #442

Closed
opened 2026-10-15 14:38:00 +00:00 by kayg · 11 comments
Owner

opacity.spec.ts:62 (6 tests) each loads 4 notes with a stub photo and waits 700 ms each, so on webkit-1440 it takes about 16 s at idle. At load ~20 (train k, 2026-10-15) 3 of 21 runs hit the 30 s limit. Alone it passes 6/6, the same timing as dev.

Fix: split each test into one test per opacity, or give it a 60 s budget as bar-focus got in #421. Do not loosen assertions.

opacity.spec.ts:62 (6 tests) each loads 4 notes with a stub photo and waits 700 ms each, so on webkit-1440 it takes about 16 s at idle. At load ~20 (train k, 2026-10-15) 3 of 21 runs hit the 30 s limit. Alone it passes 6/6, the same timing as dev. Fix: split each test into one test per opacity, or give it a 60 s budget as bar-focus got in #421. Do not loosen assertions.
Author
Owner

Starting investigation for #442. Branch: issue/442-opacity-flake. Base SHA from origin/dev: b93ec021d0bf2e7369e19ce073e7e9bf62f19c37.

Starting investigation for #442. Branch: `issue/442-opacity-flake`. Base SHA from `origin/dev`: `b93ec021d0bf2e7369e19ce073e7e9bf62f19c37`.
Author
Owner

Baseline setup finding: the first local runs used pwenv.sh, which selects /home/kayg/Developer/calternal-target-276/debug/calternal. The failed run trace shows GET /api/v1/backdrops/unsplash/stub-aaaa1/full returned 404, so noteWith waited for data-shown=true and hit the 60 second test timeout before reaching the pixel assertion. The repo runner e2etrain-xl.sh selects calternal-target-train; I am switching to that binary for the real baseline.

Baseline setup finding: the first local runs used `pwenv.sh`, which selects `/home/kayg/Developer/calternal-target-276/debug/calternal`. The failed run trace shows `GET /api/v1/backdrops/unsplash/stub-aaaa1/full` returned 404, so `noteWith` waited for `data-shown=true` and hit the 60 second test timeout before reaching the pixel assertion. The repo runner `e2etrain-xl.sh` selects `calternal-target-train`; I am switching to that binary for the real baseline.
Author
Owner

Baseline finding on the current repo runner: webkit-1440, --repeat-each=10, with the current calternal-target-train server binary. The first execution failed in the full page focus case at the pixel assertion: Expected: > 127, Received: 123 for blue shows through at 0% (full). The full page out-of-focus case passed. I am checking whether the sampled frame is still in a transition before changing the test.

Baseline finding on the current repo runner: `webkit-1440`, `--repeat-each=10`, with the current `calternal-target-train` server binary. The first execution failed in the full page focus case at the pixel assertion: `Expected: > 127`, `Received: 123` for `blue shows through at 0% (full)`. The full page out-of-focus case passed. I am checking whether the sampled frame is still in a transition before changing the test.
Author
Owner

The baseline reproduced the exact reported failure on repeat 2: full page, out of focus, Expected: > 63, Received: 39 for blue shows through at 0% (full). Repeat 1 of the same case passed. The repeated run is still in progress; I am using its trace and the helper’s existing animation-settle condition to identify the cause.

The baseline reproduced the exact reported failure on repeat 2: full page, out of focus, `Expected: > 63`, `Received: 39` for `blue shows through at 0% (full)`. Repeat 1 of the same case passed. The repeated run is still in progress; I am using its trace and the helper’s existing animation-settle condition to identify the cause.
Author
Owner

Repeat 2 also failed the narrow page, out of focus, at the same 0% pixel check: Expected: > 63, Received: 39. Combined with the full page failure in both focus and non-focus modes, this points to a shared photo/render-settlement condition rather than the focus layout alone. The photo element has a 450 ms opacity transition; the test currently substitutes a 700 ms wall-clock wait. The existing still(page) helper waits for running CSS animations to end and then two animation frames, which I will use after this baseline completes.

Repeat 2 also failed the narrow page, out of focus, at the same 0% pixel check: `Expected: > 63`, `Received: 39`. Combined with the full page failure in both focus and non-focus modes, this points to a shared photo/render-settlement condition rather than the focus layout alone. The photo element has a 450 ms opacity transition; the test currently substitutes a 700 ms wall-clock wait. The existing `still(page)` helper waits for running CSS animations to end and then two animation frames, which I will use after this baseline completes.
Author
Owner

The before run is complete. Command: bunx playwright test e2e/opacity.spec.ts --project=webkit-1440 --workers=1 --repeat-each=10 using calternal-target-train, with one worker under the shared host load (load average was 35.90 at start; no extra CPU hog). Exact summary: 6 failed and 64 passed (20.8m). All six failures were the 0% pixel assertion. The full page focus failure reported Expected: > 127, Received: 123; the full page and narrow page non-focus failures reported Expected: > 63, Received: 39. The alpha assertions and live slider test passed.

The before run is complete. Command: `bunx playwright test e2e/opacity.spec.ts --project=webkit-1440 --workers=1 --repeat-each=10` using `calternal-target-train`, with one worker under the shared host load (load average was 35.90 at start; no extra CPU hog). Exact summary: `6 failed` and `64 passed (20.8m)`. All six failures were the 0% pixel assertion. The full page focus failure reported `Expected: > 127`, `Received: 123`; the full page and narrow page non-focus failures reported `Expected: > 63`, `Received: 39`. The alpha assertions and live slider test passed.
Author
Owner

Post-fix trial update: the targeted full page WebKit test passed 16 times, then repeat 17 hit the existing 60 second test timeout in still(page). Its trace shows that final settle check began at 57.28 seconds; the prior three checks finished in under 1.2 seconds, so the test had spent almost all its budget opening and sampling four notes. The middle 60% and 20% states have no pixel assertion but were still waiting and taking screenshots. I am narrowing that work to the 100% and 0% states that are actually checked, then will rerun the 30 cases.

Post-fix trial update: the targeted full page WebKit test passed 16 times, then repeat 17 hit the existing 60 second test timeout in `still(page)`. Its trace shows that final settle check began at 57.28 seconds; the prior three checks finished in under 1.2 seconds, so the test had spent almost all its budget opening and sampling four notes. The middle 60% and 20% states have no pixel assertion but were still waiting and taking screenshots. I am narrowing that work to the 100% and 0% states that are actually checked, then will rerun the 30 cases.
Author
Owner

The optimized repeat run has passed its first 24 cases without a pixel failure. Repeat 25 hit the 60 second overall test timeout, not the color assertion. Its trace shows the fourth note ready wait took 6.08 seconds and the final settle check took 7.53 seconds; the test reached its deadline before finishing the last pixel capture. I will keep the settled-state check and strict threshold, and adjust the whole test budget to accommodate the measured loaded run.

The optimized repeat run has passed its first 24 cases without a pixel failure. Repeat 25 hit the 60 second overall test timeout, not the color assertion. Its trace shows the fourth note ready wait took 6.08 seconds and the final settle check took 7.53 seconds; the test reached its deadline before finishing the last pixel capture. I will keep the settled-state check and strict threshold, and adjust the whole test budget to accommodate the measured loaded run.
Author
Owner

The optimized WebKit repeat finished with 1 failed and 29 passed (19.5m). There were no color assertion failures. Repeat 25 reached patchColour after the settle check, then hit the 60 second test timeout while opening its temporary probe page at page.context().newPage(). I am removing that extra page and decoding the captured PNG in the existing page before rerunning the 30 case check.

The optimized WebKit repeat finished with `1 failed` and `29 passed (19.5m)`. There were no color assertion failures. Repeat 25 reached `patchColour` after the settle check, then hit the 60 second test timeout while opening its temporary probe page at `page.context().newPage()`. I am removing that extra page and decoding the captured PNG in the existing page before rerunning the 30 case check.
Author
Owner

Finished. PR #524 is open into dev: #524
Head SHA: a2e841cce956ef98cd1989440f52c24ffe16bd7e.

Before repro on webkit-1440 with --repeat-each=10:

Error: blue shows through at 0% (full)
Expected: > 63
Received: 39
6 failed
64 passed (20.8m)

After the fix, targeted webkit-1440 with 30 repeats:

30 passed (9.6m)

Four project matrix with --repeat-each=3:

18 skipped
66 passed (11.2m)

Svelte check:

COMPLETED 526 FILES 0 ERRORS 12 WARNINGS 7 FILES_WITH_PROBLEMS
Finished. PR #524 is open into dev: https://git.kayg.org/kayg/calternal/pulls/524 Head SHA: `a2e841cce956ef98cd1989440f52c24ffe16bd7e`. Before repro on webkit-1440 with `--repeat-each=10`: ```text Error: blue shows through at 0% (full) Expected: > 63 Received: 39 6 failed 64 passed (20.8m) ``` After the fix, targeted webkit-1440 with 30 repeats: ```text 30 passed (9.6m) ``` Four project matrix with `--repeat-each=3`: ```text 18 skipped 66 passed (11.2m) ``` Svelte check: ```text COMPLETED 526 FILES 0 ERRORS 12 WARNINGS 7 FILES_WITH_PROBLEMS ```
Author
Owner

Closing during the 26 Oct handover cleanup: The opacity.spec timeout was fixed in dev (PRs #524, #532).

Closing during the 26 Oct handover cleanup: The opacity.spec timeout was fixed in dev (PRs #524, #532).
kayg closed this issue 2026-10-26 08:46:26 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#442
No description provided.