Skip to content

Zero flakes: consolidate and burn down every known CI flake #409

Open
6 of 6 issues completed
Open

Description

@omridevk

Umbrella for all known CI flakiness. Nothing new ships until this board is clean. Policy: every flake gets a concrete fix (root cause or deterministic-by-construction test), never a tolerated rerun.

The set

Ticket Surface State Fix path
#389 vitest browser pool: session dies, next file's createTesters hits closed birpc — all-green run exits 1 ~12 occurrences 2026-08-10 alone; worst offender. RCA done: upstream vitest bug (vitest-dev/vitest#10791); sequencer mitigation on main covers end-of-queue deaths only; mid-queue deaths (pane-attachments, ui-kit-chat shard-2) still strand Upstream engagement + evaluate deeper mitigations: per-file session recycling, splitting @conciv/app's browser suite, or vitest bump when fixed upstream
#390 Testkit-wide: unbounded rpc awaits stall ITs to the vitest ceiling PR #393 open (names every await so hangs attribute); pre-dates stack merge, needs rebase + green Land #393, then bound the awaits
#346 panel-focus.it: composer focus lost when route boundary detaches under suspense PR #391 open (suspense islands); needs rebase + green Land #391
#408 concurrent-send T9: same-tick sends complete in flipped order under load PR #394 open (paces off expansion instead of HTTP arrival); needs verification Land #394
#404 rebind.it: frame-count snapshot race (case 1 FIXED on main via 3b58542); case 2: port-drift navigation.set 30s observer timeout Case 2 unfixed, 1 occurrence Deadline/readiness-signal shaped fix in the port-drift test
#361 recorder useRecorderTestApi afterAll dispose exceeds 30s hookTimeout, all tests pass Untriaged RCA: what blocks dispose; bound or fix

Adjacent (not flakes, aggravators)

Order of attack

  1. Rebase + green + land the three open PRs (fix(core): T9 concurrent-send test raced HTTP arrival order — pace off the expansion instead #394, fix(harness-testkit): bound unbounded testkit awaits with p-timeout, named per call site (#390) #393, fix(app): isolate pane query reads behind suspense islands so the route boundary never detaches the composer (#346) #391) — cheapest wins, two of them shrink the debugging surface for everything else.
  2. Flaky: recorder useRecorderTestApi afterAll dispose exceeds 30s hookTimeout, fails the file while all tests pass #361 RCA (small, isolated).
  3. Flaky: rebind.it.test.ts 'writes nothing more to the old core once rebind is called' — frame-count snapshot races background rpc traffic #404 case 2 (small, test-shaped).
  4. Flaky: grab-reference.browser.test.tsx dies with 'Browser connection was closed' + extension teardown unhandled (CI shard-4) #389 deep work last — biggest, partly upstream-bound, and the runway above reduces the noise floor for reproducing it.

Sub-issues

Sub-issues

6 of 6 Issues completed
Loading 6 sub-issues

Activity

  1. omridevk commented on Aug 10, 2026

    @omridevk
    ContributorAuthor

    Complete inventory of browser-touching test suites (prompted by the #389 strand appearing on shard-2, not just shard-4):

    Leak producers — hand-rolled chromium.launch() inside vitest beforeAll/afterAll:

    • packages/embed/test/* (14 launch sites) → covered: migrating to @playwright/test as runner (supersedes fix(embed): close every it() page in a try/finally (PR 2/2, #389) #411)
    • packages/extension-testkit (launch.ts, widget-suite.ts) → covered: PR fix(test-teardown): harden playwright suite teardown against CI leaks #412 (file-scoped test.extend fixtures + p-timeout bound on browser.close)
    • apps/conciv/test/transport-standalone.it.test.ts → already try/finally-clean
    • packages/ui-kit-system/test/reduced-motion.it.test.ts → uncovered, follow-up owed
    • packages/extensions/tanstack/test/connect-parity.it.test.ts → uncovered, follow-up owed
    • apps/site/test/live-connect.it.test.ts, apps/site/test/mobile-gating.it.test.ts → uncovered, follow-up owed

    Follow-up: once #412 lands its exported fixture test, migrate the four uncovered files onto it so no test file in the repo hand-manages a browser lifecycle.

    Strand victims — vitest browser-mode suites (browser session owned by vitest, killed when siblings starve the runner): apps/conciv (19 files), apps/storybook, packages/page (6), ui-kit-chat (8), ui-kit-chat-tools (4), ui-kit-system (6), ui-kit-terminal, extensions/{page,recorder,tanstack,terminal,test-runner,try-it,whiteboard}. No manual browser lifecycle to fix there; they recover as the producers above stop leaking. Render/dispose hygiene in those suites is the @solidjs/testing-library migration's scope.

    Note: packages/extensions/recorder/src/server/render.ts launches chromium in PRODUCT code (server-side render path) — not a test leak, flagging separately for a lifecycle review.

  2. omridevk commented on Aug 12, 2026

    @omridevk
    ContributorAuthor

    New flake reproduced locally on main (7b59af1), independent of any branch changes: packages/ui-kit-system/test/dialog.browser.test.tsx > "lets a click behind the dialog close a dismissable dialog" — fails ~50% (3 of 7 serial forced runs: TURBO_CONCURRENCY=1 VITEST_MAX_FORKS=1 turbo run test --concurrency=1 --filter=@conciv/ui-kit-system --force), each failure a ~29.9s timeout on the outside-click dismissal. First seen as an unexplained one-off inside the #428 affected gate, then reproduced in isolation. Not yet RCA'd — timeout shape suggests the dismiss click lands before zag's dismissable layer arms, or the 30s cap races vite warm-up on the first browser test.

  3. omridevk commented on Aug 12, 2026

    @omridevk
    ContributorAuthor

    Two more foreign-suite flakes surfaced during the #428 gate runs (each green on immediate serial rerun and in the final 105-task gate): ui-kit-system dialog.browser.test.tsx › lets a click behind the dialog close a dismissable dialog — second failure signature observed (getByText('asked to close, open false') timeout, in addition to the 30s dismissal timeout reported above) — and embed panel-focus.it / rebind.it. All three untouched by the branch.

  4. omridevk commented on Aug 12, 2026

    @omridevk
    ContributorAuthor

    Another foreign flake during #438's post-rebase gates: model-selector.stories.tsx combobox search-filter timing assertion — failed 2 of 3 forced serial storybook runs (a DIFFERENT single test each time, 284-286/286 otherwise), 3rd run fully green. File untouched by the branch (last modified cf49d70). Possibly aggravated by f6874a2 (per-icon lucide imports changed vite transform behavior — the failing runs were the first storybook runs after rebasing onto it); observed rate today ~2/3.

  5. omridevk commented on Aug 12, 2026

    @omridevk
    ContributorAuthor

    panel-focus flake reproduced in CI on PR #438 (run 31600768671, shard-1): panel-focus.it.test.ts:81 › paints the shell while the session list is still loading, then focuses the composer — 1 of 106, rerun issued. Same family as the local report above.

  6. added
    epic
    flake
    on Aug 13, 2026
  7. omridevk commented on Aug 13, 2026

    @omridevk
    ContributorAuthor

    Flake occurrence 2026-08-13, PR #468 run 31733679579 (e2e consumer apps shard-2): harnesses full app boots … failed with claude-code.chatStream fatal on both claude and codex variants (test asserts at conciv-e2e-harnesses line 55, errorAlert-vs-reply outcome). One-shot: identical code passed on the very next run (31733679570 successor, all green) and adjacent main runs were green. Diff touched only packages/publish + workflows + lockfile — no harness surface. Filing here per zero-flakes policy so it gets counted; no rerun-and-forget.

  8. omridevk commented on Aug 22, 2026

    @omridevk
    ContributorAuthor

    Two flakes root-caused and fixed today.

    Playwright install hangs (#560, merged). playwright install-deps hung in three jobs and burned the whole 15-minute step inside attempt 1, so the retry loop never fired. Each attempt is now bounded with timeout 300, and the step backstop moved to 17 minutes so three attempts plus their sleeps actually fit — at 15 minutes the third attempt was killed before the loop could report its own status. The underlying hang was apt lock contention: the runner boots with apt-daily/apt-daily-upgrade already running and they can hold the dpkg lock for 10+ minutes. The job now stops both timers first, then polls ActiveState until each service is inactive or failed. Polling ActiveState matters: apt-daily is Type=oneshot, so it reports activating for its entire run and systemctl is-active says "not active" the whole time it holds the lock.

    Widget boot race in the consumer e2e apps (#568, open). e2e/nextjs › the terminal builtin server extension loaded and can hand back a real connect command timed out at 90s, on main as well as on PR branches. The widget persists its navigation state on the engine and restores it on the next load; it painted a closed launcher first and reopened the panel a few hundred milliseconds later when the restore RPC returned. The launcher's accessible name flips from "Open conciv chat" to "Minimize conciv chat" at that moment, so a click aimed at the closed launcher missed. Three symptoms, one cause: launcher never found; launcher found then vanished; panel opened then closed. The tell is that the first run in any server always passed and later ones failed, because nothing was persisted yet on the first. Fixed by painting once the restored state is known, so the launcher appears already in its final state. Behaviour is unchanged — the panel still reopens after a reload and after a remount.

    Reproduction notes for whoever takes the next one: both were reproducible locally with --repeat-each, which is what made them tractable. The widget one went 3 failures in 6 repeats to 6 passes in 6. A Playwright trace plus the error-context.md page snapshot is what identified the cause — the snapshot showed the panel already open with the launcher relabelled, which no amount of reading the test would have revealed.

    #436 is a separate mechanism (setup action version check) and is untouched by either.

  9. omridevk commented on Oct 29, 2026

    @omridevk
    ContributorAuthor

    #597 (d07737b) removed the flake sources in the thread virtualizer (detached-row measurement caching 0, double scroll writes), the markdown fence re-tokenisation per chunk, the storage-history duplicate @tanstack/history copy, and the packed-fixture drift guard false positive. #612 (413bc87) single-sources every shared dependency through the pnpm catalog so duplicate copies cannot drift back in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    epicflake

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions