Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.

ci(e2e): exclude @perf tests from PR-time job#242

Merged
Jocs merged 2 commits into
masterfrom
fix/perf-skip-non-chromium
May 21, 2026
Merged

ci(e2e): exclude @perf tests from PR-time job#242
Jocs merged 2 commits into
masterfrom
fix/perf-skip-non-chromium

Conversation

@Jocs
Copy link
Copy Markdown
Member

@Jocs Jocs commented May 21, 2026

Summary

Exclude @perf-tagged tests from PR-time e2e CI via Playwright's --grep-invert "@perf". This unblocks PR CI without touching the regression-guard code in e2e/tests/stability/perf.spec.ts.

Root cause

e2e/tests/stability/perf.spec.ts:60 asserts setContent(10_000) < 60s. That budget was set when the matrix was chromium-only and the baseline was the local M-class macOS dev box (~20s). After #239 added firefox + webkit to the matrix, every browser on GHA ubuntu-latest running against the Vite dev server overshoots:

Browser Observed Budget Result
Chromium ~70s 60s hard fail
Firefox 62-68s 60s borderline / flaky
WebKit 108-120s 60s hard fail

With Playwright's 3-attempt retry cycle in CI, webkit perf alone burns ~6 min, which pushed PR #240's job past the 15 min GHA cap (The operation was canceled).

Why grep-invert over test.skip

The earlier draft of this PR skipped non-chromium browsers via test.skip(browserName !== 'chromium', ...). It turned out chromium also overshoots on GHA (~70s) — a per-browser skip in the test body would need to skip all three, leaving inert skip logic in the file.

Using --grep-invert "@perf" in the workflow:

  • Matches the project's own stated plan — the file header for perf.spec.ts already foreshadows moving @perf to a nightly schedule.
  • Future @perf tests automatically inherit the same treatment.
  • Keeps the test file free of skip logic.
  • Local pnpm e2e still runs the perf regression guard on all three browsers; only the GHA PR job skips it.

Follow-up (out of scope)

Move @perf-tagged tests into a nightly workflow that runs against a production bundle (pnpm build + serve). At that point per-browser budgets can be calibrated against bundled-output timings and the grep-invert can be removed from the PR-time job.

Test plan

  • CI e2e on this PR: job completes under the 15 min cap, no @perf failures, all other tests still run and pass.
  • Local pnpm e2e:chromium still runs the perf spec (no skip in code).

Generated with Claude Code

The 60s budget added in #238 was calibrated against chromium (~20s
observed locally) before the cross-browser matrix landed in #239.
WebKit on ubuntu-latest against the Vite dev server consistently runs
108-120s; firefox 62-68s. Both blow the budget on every run, and the
3-attempt retry cycle has been pushing the e2e job past its 15min cap
(#240 was cancelled by the GHA timeout for this reason).

Skip the perf assertion on non-chromium browsers as a short-term fix
so PR CI can stay green. The longer-term plan, already documented in
the file header, is to move @Perf tests to a nightly schedule against
a production bundle.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 21, 2026 11:21
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the E2E perf smoke spec to skip the 10k-paragraph setContent budget assertion on Firefox and WebKit while keeping it enforced on Chromium, reducing CI runtime and avoiding job timeouts after the cross-browser matrix was introduced.

Changes:

  • Inject browserName into the perf test and add a conditional test.skip(...) for non-Chromium browsers.
  • Add inline rationale documenting the current CI/runtime constraints and the planned move of @perf to a nightly job.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread e2e/tests/stability/perf.spec.ts Outdated
Comment on lines +40 to +50
test('setContent with 10k paragraphs finishes within the budget and scroll is reachable', async ({ page, browserName }) => {
// Short-term skip on webkit + firefox: the 60s budget was calibrated
// against chromium (~20s observed) before the cross-browser matrix
// landed. WebKit on ubuntu-latest against the Vite dev server
// consistently runs 108-120s; firefox 62-68s. Both blow the budget
// every run, with retries pushing the suite past the 15min job cap.
// Until the @perf job moves to a nightly schedule against a
// production bundle (see file header), keep the regression guard
// on chromium only.
test.skip(browserName !== 'chromium', 'perf budget calibrated against chromium only');

The per-browser skip added in the first iteration of this PR turned
out to be incomplete: chromium on GHA ubuntu-latest also overshoots
the 60s budget (~70s observed) once running against the Vite dev
server, not just the webkit ~115s and firefox ~65s seen in the prior
runs. All three browsers blow the budget; only the local M-class
macOS Chromium baseline (~20s) actually fits.

Switch to the project's already-documented plan (see file header):
exclude @perf-tagged tests from PR-time CI via --grep-invert. Future
@Perf tests automatically pick up the same treatment, and the test
file stays free of skip logic. The follow-up to move @Perf onto a
nightly schedule against a production bundle becomes a small
workflow addition rather than a rewrite.

Revert the per-browser test.skip in perf.spec.ts so the local
`pnpm e2e` invocation still runs the regression guard on all three
browsers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Jocs Jocs changed the title test(e2e): skip 10k-paragraph perf budget on webkit and firefox ci(e2e): exclude @perf tests from PR-time job May 21, 2026
@Jocs Jocs merged commit 4e920e0 into master May 21, 2026
6 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants