Parallel-worktree Playwright runs silently serve another worktree's source
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- git, javascript, playwright, typescript
調査の方向性
まず playwright.config.js と build/e2e-serve.mjs を調べ、次に tests/e2e/tile-open-workbench.spec.js について説明されている並列 worktree の失敗を確認します。複数の worktree が別の checkout の server を暗黙に再利用できないこと、および mismatch が specs の実行前に明確に失敗することを検証します。引き続き対象範囲に含まれる場合は、関連する Vitest の coverage の問題を docs/DEVELOPMENT.md に記録することを検討してください。
索引モデルが issue の本文から書いたものです。
説明
What
Parallel Playwright runs in different git worktrees of this repo silently serve each other's files, producing failures that have nothing to do with the branch under test.
playwright.config.js sets reuseExistingServer: !process.env.CI and the webServer binds a fixed default port. Every worktree uses the same config, so the second worktree to start a run finds the port already bound, skips launching its own build/e2e-serve.mjs, and attaches to the first worktree's server — which raw-serves that worktree's /src and tests/e2e. The specs then run against another branch's source with no warning.
How it showed up
During a multi-worktree /ship run (PRs #554–#558), three separate workers reported e2e failures in tests/e2e/tile-open-workbench.spec.js — one reported 4 failures, another 2, on branches that touch nothing related. One worker "confirmed" them as pre-existing by git stash-ing its own changes, which of course changed nothing, because its own files were never being served. CI was green on main and on all five branches the whole time.
Cost: a wrong conclusion that main had failing e2e specs, plus wasted diagnosis on all three workers.
Suggested fix
Make the harness worktree-safe rather than relying on discipline:
- derive the
webServerport per checkout (hash the repo root path, or read an env var the npm script sets) so concurrent worktrees cannot collide; and/or - set
reuseExistingServer: falseso a run always owns its own server; and/or - have
build/e2e-serve.mjsrefuse to be reused by a different checkout — e.g. serve a/__rootprobe returning its own absolute repo path, and let the config assert it matches before any spec runs. The assertion is the valuable part: it converts a silent wrong-source run into an immediate, legible failure.
A related smaller footgun in the same class: two vitest runs in one worktree clobber each other's coverage/.tmp and report phantom test failures with an unrelated ENOENT … coverage-*.json rejection. Worth at least a note in docs/DEVELOPMENT.md.
Why deferred
Test-infrastructure defect found while shipping unrelated bug/low issues; not in scope for any of them.
- 主要言語
- TypeScript
- スター
- 8
- フォーク
- 2
- 平均マージ
- 1時間 34分
- マージ済み PR(30日)
- 6
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Altinity/altinity-sql-browser のほかの issue
-
inbox
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Altinity/altinity-sql-browser#605 ·
-
inbox
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Altinity/altinity-sql-browser#509 ·
-
inbox
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Altinity/altinity-sql-browser#489 ·
-
flamegraph オープンenhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
Altinity/altinity-sql-browser#684 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
Altinity/altinity-sql-browser#680 · コメント 2 件 ·
Altinity/altinity-sql-browser の issue をすべて見る
似ている issue
-
Type/Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
OpenNSW/nsw-srilanka#497 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
0xMiden/bridge-portal#132 ·
-
react-doctor severity:warning tech-debt
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
digidem/comapeo-cloud-app#403 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100