Make the quote bar and the e2e suite survive a loaded runner #351

Merged
robbertbos merged 1 commit from ci-flakes-quotebar-and-e2e-timeout into main 2026-09-05 11:25:44 +00:00
Owner

Every open PR is red, and none of them is at fault: PR #346's entire diff is a postgres digest in compose.dev.yaml, and it fails frontend-test and e2e like the rest. Two causes, both in the tests.

quoteBar.test.ts (frontend-test, 6 PRs). quoteLineStarts read syntaxTree(state) straight. LanguageState.init parses under a 20ms budget capped at the first 3000 characters and then calls takeTree(), so a state hands out whatever was finished. In an EditorView the parse worker catches up; a bare state in a test has no worker, so on a loaded runner the first EditorState.create in the file - the one that also pays the lezer grammar warm-up - came back with an empty tree and the assertion saw []. That is why only the first test in the file went red. ensureSyntaxTree now covers the range actually asked about, which fixes the app too: a quote past character 3000 got no bar until the next edit. The added case reproduces it deterministically with a document longer than the initial viewport.

e2e (all 10 PRs). Tests that run in one or two seconds locally were timing out at 33-35s, and Chromium died mid-test with Protocol error (Runtime.callFunctionOn): Internal server error, session closed. One push fans out to thirteen jobs onto a runner of capacity two; in the same run backend-test took 21m23s against its usual ~90s. So: two Playwright workers on CI instead of three, and a 60s test timeout there. Local runs keep three workers and 30s.

Verified locally: 1421 vitest tests green, 122 e2e green (59.6s), pre-commit --all-files green.

Still open, not fixed here: thirteen jobs per push is the underlying pressure. Worth a look at whether test-build and security-scan need to run on every PR push.

Every open PR is red, and none of them is at fault: PR #346's entire diff is a postgres digest in `compose.dev.yaml`, and it fails `frontend-test` and `e2e` like the rest. Two causes, both in the tests. **`quoteBar.test.ts` (frontend-test, 6 PRs).** `quoteLineStarts` read `syntaxTree(state)` straight. `LanguageState.init` parses under a 20ms budget capped at the first 3000 characters and then calls `takeTree()`, so a state hands out whatever was finished. In an `EditorView` the parse worker catches up; a bare state in a test has no worker, so on a loaded runner the *first* `EditorState.create` in the file - the one that also pays the lezer grammar warm-up - came back with an empty tree and the assertion saw `[]`. That is why only the first test in the file went red. `ensureSyntaxTree` now covers the range actually asked about, which fixes the app too: a quote past character 3000 got no bar until the next edit. The added case reproduces it deterministically with a document longer than the initial viewport. **e2e (all 10 PRs).** Tests that run in one or two seconds locally were timing out at 33-35s, and Chromium died mid-test with `Protocol error (Runtime.callFunctionOn): Internal server error, session closed`. One push fans out to thirteen jobs onto a runner of capacity two; in the same run `backend-test` took 21m23s against its usual ~90s. So: two Playwright workers on CI instead of three, and a 60s test timeout there. Local runs keep three workers and 30s. Verified locally: 1421 vitest tests green, 122 e2e green (59.6s), `pre-commit --all-files` green. Still open, not fixed here: thirteen jobs per push is the underlying pressure. Worth a look at whether `test-build` and `security-scan` need to run on every PR push.
robbertbos force-pushed ci-flakes-quotebar-and-e2e-timeout from be51b72b49
Some checks failed
CI / release-scripts (pull_request) Successful in 7s
security-scan / SBOM (trivy) (pull_request) Successful in 12s
security-scan / Filesystem scan (trivy fs) (pull_request) Successful in 13s
security-scan / JS SCA (npm audit) (pull_request) Successful in 16s
security-scan / Python SAST (bandit) (pull_request) Successful in 18s
security-scan / Python SCA (pip-audit) (pull_request) Successful in 36s
test-build / build (frontend) (pull_request) Successful in 59s
test-build / build (backend) (pull_request) Successful in 1m15s
test-build / build (pull_request) Successful in 0s
CI / pre-commit (pull_request) Successful in 1m58s
CI / backend-test (pull_request) Has been cancelled
CI / frontend-test (pull_request) Has been cancelled
CI / e2e (pull_request) Has been cancelled
to 49a632c19e
All checks were successful
CI / release-scripts (pull_request) Successful in 7s
security-scan / SBOM (trivy) (pull_request) Successful in 11s
security-scan / JS SCA (npm audit) (pull_request) Successful in 17s
security-scan / Filesystem scan (trivy fs) (pull_request) Successful in 18s
security-scan / Python SAST (bandit) (pull_request) Successful in 19s
security-scan / Python SCA (pip-audit) (pull_request) Successful in 38s
test-build / build (frontend) (pull_request) Successful in 1m2s
CI / pre-commit (pull_request) Successful in 1m8s
CI / frontend-test (pull_request) Successful in 1m9s
test-build / build (backend) (pull_request) Successful in 1m14s
test-build / build (pull_request) Successful in 0s
CI / backend-test (pull_request) Successful in 2m40s
CI / e2e (pull_request) Successful in 4m44s
2026-09-05 11:17:24 +00:00
Compare
robbertbos deleted branch ci-flakes-quotebar-and-e2e-timeout 2026-09-05 11:25:44 +00:00
Sign in to join this conversation.
No reviewers
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
robbertbos/waggle!351
No description provided.