From bcb7afb5c90cc16e3db9a5234f78ade3b2aac822 Mon Sep 17 00:00:00 2001 From: Garrett Fincke Date: Thu, 12 Nov 2026 18:18:48 -0500 Subject: [PATCH 1/3] ci: run web test shards on separate runners The four web shards ran back to back on one runner, and the last one kept losing the browser connection on main. Each shard now gets its own runner. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a9cf1a62f..5a1355fb5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -330,12 +330,18 @@ jobs: # The web suite is the largest outside the server. In the shared Test job it # started last and ran alone for about 40s after everything else finished. + # Each shard gets its own runner: sequential shards on one runner still lost the + # browser connection in the last shard. test_web: - name: Test Web + name: Test Web ${{ matrix.shard }} needs: changes if: ${{ !cancelled() && needs.changes.outputs.test_web != 'false' }} runs-on: ubuntu-24.04 timeout-minutes: 20 + strategy: + fail-fast: false + matrix: + shard: [1, 2, 3, 4] steps: - name: Checkout uses: actions/checkout@v6 @@ -375,11 +381,7 @@ jobs: fi - name: Test - # fresh processes avoid the connection loss in the full single-worker browser suite. - run: | - for shard in 1 2 3 4; do - vp run --filter @t3tools/web test --maxWorkers 1 --shard "$shard/4" - done + run: vp run --filter @t3tools/web test --maxWorkers 1 --shard ${{ matrix.shard }}/${{ strategy.job-total }} # apps/server sets `fileParallelism: false`, so its test files run strictly # one at a time. Sharding spreads them over separate runners instead of From 02b6bccabef6e006417dd5ce3e58a30361af6e14 Mon Sep 17 00:00:00 2001 From: Garrett Fincke Date: Thu, 12 Nov 2026 18:25:47 -0500 Subject: [PATCH 2/3] ci: temporary chromium diagnostics for web shard 4 Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a1355fb5c..778ae2696e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -381,8 +381,20 @@ jobs: fi - name: Test + # TEMP diagnostics: chromium stderr for the shard 4 crash. Remove before merge. + env: + DEBUG: pw:browser* run: vp run --filter @t3tools/web test --maxWorkers 1 --shard ${{ matrix.shard }}/${{ strategy.job-total }} + # TEMP diagnostics. Remove before merge. + - name: Dump runner state after a failure + if: failure() + run: | + free -m + df -h /dev/shm /tmp + ps -eo pid,rss,etime,args --sort=-rss | head -20 + sudo dmesg -T | tail -60 + # apps/server sets `fileParallelism: false`, so its test files run strictly # one at a time. Sharding spreads them over separate runners instead of # separate workers, so no two server test files ever share a machine and the From 8d67ae58d1ec77d796190c3f0b787d6c0e7fa0ab Mon Sep 17 00:00:00 2001 From: Garrett Fincke Date: Thu, 12 Nov 2026 18:40:35 -0500 Subject: [PATCH 3/3] ci: give each web shard two browser workers One worker ran every browser file in a shard through a single page, which lost its connection partway through shard 4 on a cold Vite cache. Drops the temporary diagnostics. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 778ae2696e..d71786cba8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -330,8 +330,9 @@ jobs: # The web suite is the largest outside the server. In the shared Test job it # started last and ran alone for about 40s after everything else finished. - # Each shard gets its own runner: sequential shards on one runner still lost the - # browser connection in the last shard. + # Each shard runs on its own runner. With one worker, a single browser page ran + # every browser file in a shard and lost its connection partway through on a + # cold Vite cache; two workers split the files over two pages. test_web: name: Test Web ${{ matrix.shard }} needs: changes @@ -381,19 +382,7 @@ jobs: fi - name: Test - # TEMP diagnostics: chromium stderr for the shard 4 crash. Remove before merge. - env: - DEBUG: pw:browser* - run: vp run --filter @t3tools/web test --maxWorkers 1 --shard ${{ matrix.shard }}/${{ strategy.job-total }} - - # TEMP diagnostics. Remove before merge. - - name: Dump runner state after a failure - if: failure() - run: | - free -m - df -h /dev/shm /tmp - ps -eo pid,rss,etime,args --sort=-rss | head -20 - sudo dmesg -T | tail -60 + run: vp run --filter @t3tools/web test --maxWorkers 2 --shard ${{ matrix.shard }}/${{ strategy.job-total }} # apps/server sets `fileParallelism: false`, so its test files run strictly # one at a time. Sharding spreads them over separate runners instead of