Skip to content

fix(ci): restore E2E flakiness fixes for pgschema, docker-pull, and spec timing#1396

Merged
wpfleger96 merged 2 commits into
mainfrom
duncan/e2e-flakiness-fix
Jun 30, 2026
Merged

fix(ci): restore E2E flakiness fixes for pgschema, docker-pull, and spec timing#1396
wpfleger96 merged 2 commits into
mainfrom
duncan/e2e-flakiness-fix

Conversation

@wpfleger96

@wpfleger96 wpfleger96 commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Fixes three distinct root causes behind the recurring "Desktop E2E Integration" CI failures. All three buckets in one commit on duncan/e2e-flakiness-fix off 2f496debc.

Bucket A — restore PGSCHEMA_PLAN_* env block (.github/workflows/ci.yml)

PR #1070 (e3736f08b) added a 5-var block pointing pgschema apply at the already-running docker Postgres instead of downloading an embedded one from Maven Central. PR #963 (ff824a365) silently deleted those lines via a stale-base rebase. Restored at both pgschema-apply sites (ci.yml:396-400 and 547-551). Eliminates the failed to start embedded PostgreSQL: no version found matching 17.5.0 flake deterministically.

Bucket B — retry loop for docker compose up (.github/workflows/ci.yml)

Both "Start integration services" steps ran docker compose up -d postgres redis minio minio-init with no retry. A single Docker Hub 500 killed the job pre-test. Wrapped both sites in a 3-attempt retry with 5s/10s backoff. Persistent failure still exits 1 after 3 attempts.

Bucket C — stabilize radix detach race (desktop/tests/e2e/persona-env-vars.spec.ts)

The persona model options follow the selected LLM provider test failed on the "Switch to Default" step with element is not stable / element was detached from the DOM. The prior approach built a filtered defaultOption locator before opening the menu and held it across the open→re-render boundary — Radix was still re-mounting the collection when the click landed.

Fix mirrors the OpenAI and Anthropic steps in the same test: after llmProvider.click(), call waitForAnimations(page) to let Radix finish animating/re-mounting, then locate menuitemradio for "Default" fresh at click-time via the bare page.getByRole pattern. No stale handle crosses the open/re-render boundary.

Gate

Buckets A/B/C are not exercised by just desktop-tauri-test (828/828 passing locally). Real proof is the live E2E Integration CI shard.

…pec timing

Three chronic Desktop E2E Integration failure modes in one pass:

Bucket A (regression): restore PGSCHEMA_PLAN_* env vars at both pgschema
apply sites. PR #1070 (e3736f0) added these vars so pgschema uses the
already-running docker Postgres instead of downloading an embedded binary
from Maven Central at test time. PR #963 (ff824a3, merged the next day)
silently clobbered them via a stale-base rebase. The embedded-PG download
is the transient 'no version found matching 17.5.0' flake that matches
Will's 'flaky for ~2 weeks' window exactly.

Bucket B (transient infra): wrap both 'docker compose up' service-start
steps in a 3-attempt retry loop with backoff. A single Docker Hub 500
previously killed the entire job before any test ran.

Bucket C (spec timing race): stabilize the 'Switch to Default' step in
persona-env-vars.spec.ts. The radix dropdown re-renders mid-click (detaches
from DOM) when switching back to Default after Anthropic. Extract the
defaultOption locator and await expect(defaultOption).toBeVisible() before
clicking — Playwright's auto-wait resolves the 'element is not stable'
timeout that was failing all 3 retries.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
…etach race

The 'persona model options follow the selected LLM provider' test was
failing on the 'Switch to Default' step with 'element is not stable' /
'element was detached from the DOM'. The prior fix added
await expect(defaultOption).toBeVisible() before .click(), but
Playwright's .click() already auto-waits for visibility and stability,
so the assertion did not change the actionability window. A separate
visibility assertion can pass on one mounted instance, then the menu
item can detach before the subsequent click lands while Radix is still
re-rendering the collection after the provider change.

Fix: mirror the OpenAI and Anthropic steps in the same test, which both
use the bare page.getByRole('menuitemradio').click() pattern and pass
reliably. After await llmProvider.click(), call waitForAnimations(page)
to let Radix finish animating/re-mounting the menu collection, then
locate the 'Default' menuitemradio fresh at click-time. No stale handle
crosses the open/re-render boundary.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
@wpfleger96 wpfleger96 enabled auto-merge (squash) June 30, 2026 15:36
@wpfleger96 wpfleger96 merged commit fdf29c4 into main Jun 30, 2026
26 checks passed
@wpfleger96 wpfleger96 deleted the duncan/e2e-flakiness-fix branch June 30, 2026 15:46
wesbillman added a commit that referenced this pull request Jun 30, 2026
Pick up CI flakiness fixes (#1396, #1399) so the branch runs against green main.

Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co>
wpfleger96 pushed a commit that referenced this pull request Jun 30, 2026
…work

* origin/main: (25 commits)
  fix(thread): stop mid-scroll content jump in live threads (#1397)
  fix(ci): restore main to green — tauri fmt, personas.rs file-size split, Windows path test (#1399)
  fix(desktop): enable buzz-dev-mcp MCP server for Codex agents (#1394)
  fix(ci): restore E2E flakiness fixes for pgschema, docker-pull, and spec timing (#1396)
  fix(personas): persist pack-backed persona UI edits across reboot (#1392)
  fix(buzz-acp): clear steer_rx on all run_prompt_task exit paths (#1391)
  Restore channel date divider rule (#1395)
  Speed up profile wave action (#1379)
  Restore visible links for rich previews (#1378)
  Mobile channel list polish (#1367)
  style(desktop): unify corner radii to rounded-2xl (16px) (#1393)
  fix(desktop): skip keychain write when blob contents are unchanged (#1377)
  fix(desktop): stop clipping the agent-activity row under the composer (#1371)
  Constrain macOS overscroll to conversations (#1317)
  Mobile appearance foundation (#1366)
  chore(release): release Buzz Desktop version 0.3.38 (#1375)
  feat(desktop): provider-agnostic model selection + databricks discovery (#1307)
  release(helm): buzz chart 0.1.1 (#1374)
  Harden relay attack surfaces (#1369)
  ci(helm): publish chart to GHCR on chart-v* tags (#1372)
  ...
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.

2 participants