fix(e2e): keep test server ports unique per runner (from #937) #1136

Open
kayg wants to merge 1 commit from fix/e2e-unique-ports into dev
Owner

The only part of #937 still missing from dev: the unique-port harness fix (cherry-pick of 79918a056, 2 files: apps/web/e2e/harness.ts, apps/web/src/lib/harness.test.ts). The RAM data-dir half is already on dev. Not rebased-tested here; gates are the same as #937's housekeeping run (frontend check/lint/unit passed there; browser specs never ran). Not merged.

🤖 Generated with Claude Code

The only part of #937 still missing from dev: the unique-port harness fix (cherry-pick of `79918a056`, 2 files: `apps/web/e2e/harness.ts`, `apps/web/src/lib/harness.test.ts`). The RAM data-dir half is already on dev. Not rebased-tested here; gates are the same as #937's housekeeping run (frontend check/lint/unit passed there; browser specs never ran). Not merged. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(e2e): keep test server ports unique per runner
Some checks failed
CI / server (pull_request) Has been cancelled
CI / rust (pull_request) Has been cancelled
CI / web (pull_request) Has been cancelled
Markdown extraction contract / markdown-native-contract (pull_request) Has been cancelled
Markdown extraction contract / markdown-editor-contract (pull_request) Has been cancelled
641d9ff059
Author
Owner

Gates for fix/e2e-unique-ports at e792927d8 (pushed; = dev 42c219afd merged + the harness commit 641d9ff05). Not merged.

Setup. Worktree at e792927d8 on dev-01 and dev-02. Server binary target/debug/calternal built on each VM with ~/bin/slot nix develop -c cargo build -j4 --bin calternal. git diff 42c219afd e792927d8 -- crates Cargo.toml Cargo.lock is empty, so the dev-tip repeats reuse the same binary.

Lint / check / unit (dev-01, under slot):

  • bun run --cwd apps/web lint: exit 0
  • bun run --cwd apps/web check (svelte-check): exit 0
  • bun run --cwd apps/web test: 35 files, 320 tests passed, including src/lib/harness.test.ts (1 test)

Full project runs (bunx playwright test --project=<p> --workers=N):

run host workers result
chromium-1440 dev-01 2 3 failed, 704 passed, 668 skipped
chromium-390 dev-01 2 (second runner on the same host at the same time) 5 failed, 1115 passed, 255 skipped
webkit-1440 dev-02 2 3 failed, 699 passed, 673 skipped
chromium-1440 (control) dev-01 1 2 failed, 705 passed, 668 skipped

Branch failures:

  • chromium-1440 w2: tasks-card.spec.ts:68, tasks-swipe.spec.ts:74, tasks-tick.spec.ts:72
  • chromium-390 w2: journal-trash.spec.ts:25, search-palette.spec.ts:47, swipe-rows.spec.ts:293, task-check.spec.ts:29, tasks-tick.spec.ts:72
  • webkit-1440 w2: tasks-board.spec.ts:56, tasks-board.spec.ts:95, window-layout.spec.ts:112
  • chromium-1440 w1 control: refusal-performance.spec.ts:29, smart-note.spec.ts:19

Ports. No EADDRINUSE, address already in use or ERR_UNSAFE_PORT in any log on either VM. The two chromium runners on dev-01 finished with no port errors.

Discarded run. The first chromium-1440 and chromium-390 pair shared one apps/web/test-results directory in one worktree. Their artifact cleanup raced: 5 of the 6 chromium-1440 failures were ENOENT on .playwright-artifacts-* traces. I stopped that pair and reran both with separate --output directories. Only the reruns are reported above.

--repeat-each=10 on dev tip 42c219afd (same specs, no harness commit):

  • webkit-1440, tasks-board.spec.ts + window-layout.spec.ts: 9 of 140 failed (tasks-board:42, :56; window-layout:89, :112).
  • chromium-1440, tasks-card, tasks-swipe, tasks-tick: 43 of 180 failed.
  • chromium-390, journal-trash, search-palette, swipe-rows, task-check, tasks-tick: 32 of 540 failed (journal-trash:25, swipe-rows:169/226/365/627, task-check:29, tasks-tick).
  • Did not reproduce on dev in 10 repeats: tasks-board:95, search-palette:47, swipe-rows:293, refusal-performance:29, smart-note:19. These five are flaky under the rule, not blockers.

Verdict. The harness change does not cause any of the failures above; the families that fail (tasks, swipe, journal-trash, window-layout) fail on dev tip too. Those are pre-existing dev failures and need an owner, since they repeat at dev tip. Not covered by this run: webkit-390 and the other projects.

🤖 Generated with Claude Code

Gates for `fix/e2e-unique-ports` at `e792927d8` (pushed; = dev `42c219afd` merged + the harness commit `641d9ff05`). Not merged. **Setup.** Worktree at `e792927d8` on dev-01 and dev-02. Server binary `target/debug/calternal` built on each VM with `~/bin/slot nix develop -c cargo build -j4 --bin calternal`. `git diff 42c219afd e792927d8 -- crates Cargo.toml Cargo.lock` is empty, so the dev-tip repeats reuse the same binary. **Lint / check / unit (dev-01, under slot):** - `bun run --cwd apps/web lint`: exit 0 - `bun run --cwd apps/web check` (svelte-check): exit 0 - `bun run --cwd apps/web test`: 35 files, 320 tests passed, including `src/lib/harness.test.ts` (1 test) **Full project runs (`bunx playwright test --project=<p> --workers=N`):** | run | host | workers | result | |---|---|---|---| | chromium-1440 | dev-01 | 2 | 3 failed, 704 passed, 668 skipped | | chromium-390 | dev-01 | 2 (second runner on the same host at the same time) | 5 failed, 1115 passed, 255 skipped | | webkit-1440 | dev-02 | 2 | 3 failed, 699 passed, 673 skipped | | chromium-1440 (control) | dev-01 | 1 | 2 failed, 705 passed, 668 skipped | Branch failures: - chromium-1440 w2: `tasks-card.spec.ts:68`, `tasks-swipe.spec.ts:74`, `tasks-tick.spec.ts:72` - chromium-390 w2: `journal-trash.spec.ts:25`, `search-palette.spec.ts:47`, `swipe-rows.spec.ts:293`, `task-check.spec.ts:29`, `tasks-tick.spec.ts:72` - webkit-1440 w2: `tasks-board.spec.ts:56`, `tasks-board.spec.ts:95`, `window-layout.spec.ts:112` - chromium-1440 w1 control: `refusal-performance.spec.ts:29`, `smart-note.spec.ts:19` **Ports.** No `EADDRINUSE`, `address already in use` or `ERR_UNSAFE_PORT` in any log on either VM. The two chromium runners on dev-01 finished with no port errors. **Discarded run.** The first chromium-1440 and chromium-390 pair shared one `apps/web/test-results` directory in one worktree. Their artifact cleanup raced: 5 of the 6 chromium-1440 failures were `ENOENT` on `.playwright-artifacts-*` traces. I stopped that pair and reran both with separate `--output` directories. Only the reruns are reported above. **`--repeat-each=10` on dev tip `42c219afd` (same specs, no harness commit):** - webkit-1440, `tasks-board.spec.ts` + `window-layout.spec.ts`: 9 of 140 failed (`tasks-board:42`, `:56`; `window-layout:89`, `:112`). - chromium-1440, `tasks-card`, `tasks-swipe`, `tasks-tick`: 43 of 180 failed. - chromium-390, `journal-trash`, `search-palette`, `swipe-rows`, `task-check`, `tasks-tick`: 32 of 540 failed (`journal-trash:25`, `swipe-rows:169/226/365/627`, `task-check:29`, `tasks-tick`). - Did not reproduce on dev in 10 repeats: `tasks-board:95`, `search-palette:47`, `swipe-rows:293`, `refusal-performance:29`, `smart-note:19`. These five are flaky under the rule, not blockers. **Verdict.** The harness change does not cause any of the failures above; the families that fail (tasks, swipe, journal-trash, window-layout) fail on dev tip too. Those are pre-existing dev failures and need an owner, since they repeat at dev tip. Not covered by this run: webkit-390 and the other projects. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Some checks failed
CI / server (pull_request) Has been cancelled
CI / rust (pull_request) Has been cancelled
CI / web (pull_request) Has been cancelled
Markdown extraction contract / markdown-native-contract (pull_request) Has been cancelled
Markdown extraction contract / markdown-editor-contract (pull_request) Has been cancelled
This pull request is broken due to missing fork information.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'fix/e2e-unique-ports:fix/e2e-unique-ports'
git switch 'fix/e2e-unique-ports'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'dev'
git merge --no-ff 'fix/e2e-unique-ports'
git switch 'fix/e2e-unique-ports'
git rebase 'dev'
git switch 'dev'
git merge --ff-only 'fix/e2e-unique-ports'
git switch 'fix/e2e-unique-ports'
git rebase 'dev'
git switch 'dev'
git merge --no-ff 'fix/e2e-unique-ports'
git switch 'dev'
git merge --squash 'fix/e2e-unique-ports'
git switch 'dev'
git merge --ff-only 'fix/e2e-unique-ports'
git switch 'dev'
git merge 'fix/e2e-unique-ports'
git push origin 'dev'
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
kayg/calternal!1136
No description provided.