Repository navigation
Description
Context
Hosted browser proof timed out on one case of the ui-kit focus-frame visual suite. The case is continuous focused corners and contained control rings: light 1280 (for (const width of [320, 1280]), packages/ui-kit/tests/visual/focus-frames.visual.tsx:39-40). It took 16077 ms against the suite's 15000 ms test timeout (Error: Test timed out in 15000ms).
- Run: https://github.com/schlessera/brain-kit/actions/runs/41462842821, job
browser (3): https://github.com/schlessera/brain-kit/actions/runs/41462842821/job/125336796810 - Candidate: PR CONTRACT: feat(core): count media awaiting review from one inventory with a kept disposition #3288, head
6ad1d901b5ebc4092d418d13cd421b23e458fac5, basea62db8f27a22fd2df744308e9b1ee12bc50f3da2; checkout0ee2d133fbc2b16de632455e11e599c9f3d06930. - In the same job, the other three cases of that test passed (dark 320 in 6159 ms, dark 1280 in 8451 ms, light 320 in 6461 ms), as did 2895 other tests. The candidate changes no
ui-kitorui-reactfile. - CI on
mainat the same base passed: https://github.com/schlessera/brain-kit/actions/runs/41460456659.
The case resizes the outer form viewport to 1600 px tall and renders a long control inventory. Its durations range from 6 to 16 seconds across cases on one runner, close to the 15 s budget. That fits the shared-runner variance #1257 classifies. This was the first observed occurrence. A second followed (see the readiness review below).
Scope
Make this case deterministic within its budget. Find where the time goes (viewport resize, consumer styles, render or screenshot) from the job's timing and a reproduction under the pinned browser image with CPU constrained as in #1257. Then either remove the slow wait or give the case an explicit, justified timeout. Do not weaken what it asserts.
Out of scope
- The other browser categories ci: classify remaining browser failures under two-CPU stress #1257 classifies.
- Changing the focus-frame visuals or their goldens.
Readiness review (2026-11-02)
- Second occurrence: PR test(ui-react): pair the remaining Cartesian theme cells in answer and journal runtime #3345, run https://github.com/schlessera/brain-kit/actions/runs/41507059001, job
browser (3): the dark 1280 case of the same test timed out at 15650 ms. In that job the other three cases took 7565, 9831 and 10990 ms. So the problem is not specific to light 1280: all four cases sit within 1.5-2.5x of the budget on hosted runners, and whichever case meets a load spike fails. - No sibling pattern: neither failure is a cold lazy chunk (tests: ArtifactTheme Layout Phone story can stay on Storybook's preparing loader #3267/test(ui-kit): wait for the cold file viewer chunk in the artifact theme stories #3286), because the failing case is never first in the file. Neither is a detached node between query and check (test(ui-kit): the artifact static-loading check still races with the file tree's loading placeholder #3340), because both are whole-case timeouts with no assertion failure.
- Measured phases (temporary per-call timing, pinned image
eff16c30…): unloaded, each case takes 2.07-2.27 s, and 22 serialfocusCapturePlaywright element screenshots account for about 90% of that. Ten of them are whole-inventory review captures. At 1280 px each is 1280x1433 px, but the grid is capped at 560 px, so about 55% of each capture is empty canvas. There is no outlier capture and no slow wait. Viewport resize, consumer styles, render anddocument.fonts.readyeach take 0-12 ms. With six browser projects running concurrently under the ci: classify remaining browser failures under two-CPU stress #1257 two-CPU quota, the cases took 9.7-11.8 s and screenshots were 87-92% of that.
Chosen approach (no timeout change): split each theme/width case into three: the query, filter and slash menu, then each half of the review inventory. Size the inventory host to the grid it holds. Keep every capture, file name and assertion.
Acceptance criteria
- The slow phase is named from measured evidence (per-phase timings or a trace), not inferred.
- No case carries the full 22-capture inventory, and every original capture, review file name and assertion is retained.
- Every case in the file passes 20 consecutive runs under the pinned browser image with the ci: classify remaining browser failures under two-CPU stress #1257 two-CPU constraint, with durations recorded in the PR.
- Under the same concurrent load, the base is shown failing (or measured at its margin) and the fix passing, with receipts in the PR.
- No timeout is added or raised; the suite default is unchanged.
Verification
bun run test:browser scoped to packages/ui-kit/tests/visual/focus-frames.visual.tsx under the pinned offline browser image, plus the hosted browser category on the PR.
Contract impact
None. Test only.
Activity
schlessera commentedon Nov 2, 2026
Second occurrence: PR #3345 (#3329), ready-candidate run 41507059001,
browser (3),focus-frames.visual.tsx, on baseepic/1849-test-cost. This now blocks #3329, which is p2, so this issue stays at p2 or higher under the blocker-priority rule.schlessera commentedon Nov 2, 2026
Claiming (token
fff-3291-a7). Intended branch:fix/focus-frames-visual-flakefromorigin/main. Doing the readiness review from both failing runs first.schlessera commentedon Nov 2, 2026
Third occurrence: PR #3342 (#3153), ready-candidate run 41529671844,
browser (3):continuous focused corners and contained control rings: light 1280took 16209 ms. #3153 (p2) is now blocked by this as well.schlessera commentedon Nov 2, 2026
Readiness review, 2026-11-02: the body now records the second occurrence (run 41507059001, dark 1280, 15650 ms), per-phase measurements naming 22 serial Playwright screenshots as about 90% of each case, and the chosen approach: split the case, size the host to its grid, and change no timeout. I made the acceptance criteria specific to that approach and added
agent-ready. Implementation is on branchfix/focus-frames-visual-flake.