Repository navigation
ci: webviews dev server files run at once, each on its own warm Vite cache (no bead) - #19831
Conversation
…e cache #19812 ran every file that starts a dev server one at a time after the rest, so they never optimize into one node_modules/.vite at once; the web test phase went from 7m18s to 9m44s. Pin the faster contract: several at once, never on one cache, each but one per config starting from a warmed copy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cache The dev configs read CMUX_VITE_CACHE_DIR (dev-server/viteCacheDir.mjs). The runner runs one file per config first, alone, to warm that config's cache, then the rest CMUX_WEB_TEST_DEV_JOBS at once (default half the jobs), each on its own copy: no two share node_modules/.vite and none starts the cold first bundle beside another. A config whose warming file fails keeps its files one at a time on cold caches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Passes: CI passes on CI passes on Written by |
|
|
At four at a time on the 8-core runner, per-file time barely moved and instructions-notice's frame budget and agent-pane-seen's attach timing failed under the load. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Red: vite.config.ts resolves to node_modules/.vite-dev-deps-0 (the dev server plugin's per-port cache) with CMUX_VITE_CACHE_DIR set, and new-tab-typing (createServer with vite.config.ts) gets no cache of its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ache cmuxDevServer's config hook set a per-port cacheDir over vite.config.ts's, so the seven default-config files ignored CMUX_VITE_CACHE_DIR, copied an empty seed and started cold together (the #19746 stall). The plugin now prefers CMUX_VITE_CACHE_DIR. new-tab-typing and diff-toolbar-narrow call createServer and were not matched as dev server files at all. Cache upkeep in the worker no longer aborts the lane under set -e. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Test webviews phase on 070cc36 (run 38243510224): 7m56s for 197 files, 0 failed. That is 45 dev-server files, 2 at a time, each on its own warm Vite cache. With them serial after #19812 it was 9m44s. At 4 at a time (first push) it took 5m38s, but the 8-core runner ran out of CPU and instructions-notice (frame budget) and agent-pane-seen (attach timing) failed, so the default is now a quarter of the jobs ( |
Gallery182 states changed: pages.settings/general-group-2, pages.settings/browser-group-2, pages.settings/invalid-host, pages.settings/invalid-search-template, pages.settings/general-group-4, ... · 1 new state · 43 broken states · 89 play checks failed Diff page and renders (the run's 176 more on the diff page. Live preview (follows this branch; start it with
Play checks failed (0 px anchor movement, 0 layout shift, no frame over 33 ms unless the entry gives a reason):
472 nondeterministic states differed from a second render of the same head (a clock or fixture leak) and are not counted as changes. |
…9897) * test: agent-pane-seen's first pane connects slowly, as on a busy runner Red: the stand-in answers the first initialize after 11 s, as a cold dev server page on a busy runner reaches its attach (dev server files run side by side since #19831). The test gives the attach 10 s, so it fails, and its open page then takes the next test's held attach. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: agent-pane-seen waits for a slow first attach and closes its pages The first attach gets 60 s (its cold modules load slowly on a busy runner); later waits keep 10 s. Each case closes its page even on a failure, so a late attach cannot take the next case's held attach. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…9962) * test: text-field-focus gives its first stage 120 s to load (cx-c332z) Since #19831 dev server files run two at a time on a copied Vite cache, so the first stage pays a cold dependency optimize under load and its page.goto passed the default 30 s on every PR. The stage already gets 120 s to mount; goto now gets the same. Red (base): CMUX_VITE_CACHE_DIR=<empty dir> taskset -c 0 bun test test/text-field-focus.test.ts -> goto: Timeout 30000ms exceeded on agent-pane.composer / new-chat (light), 21 pass 1 fail. Green (this commit, same command, fresh empty cache): 22 pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: the dev server scans the gallery pages for dependencies (cx-c332z) Replaces the goto timeout. The dev server's optimizeDeps entries left out the gallery, so a file whose first page is a gallery stage (text-field-focus) found the agent pane's dependencies late and waited on a re-optimize past goto's 30 s. With the gallery pages scanned, the unchanged test passes cold on one core, 22 pass, and the file takes 103 s instead of 139 s, inside run-webviews-tests.sh's 120 s per-file cap that a longer goto would have hit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>






Summary
#19812 fixed a race: files that start a Vite dev server shared one
node_modules/.vite, and two running at once lost each other's optimized files. To fix it, #19812 ran all 41 of those files one at a time after the rest, and the web test phase went from 7m18s to 9m44s. This PR keeps them off any shared cache but runs them in parallel again:vite.config.tsand therefore gallery-dev,vite.config.acpmux-pane.mjs,vite.config.settings-page.mjs) takecacheDirfromCMUX_VITE_CACHE_DIR(dev-server/viteCacheDir.mjs). When it's unset, they keep Vite's default.run-webviews-tests.shfirst runs one file per Vite config (pane, gallery, settings, default), alone. Each warms its config's own cache.CMUX_WEB_TEST_DEV_JOBSat once (default: half the jobs, 4 on react-apps-check).Testing
python3 tests/test_webviews_tests_per_file.py. The fakebunrecords each dev server file's cache, whether it found its config's warm marker, and how many ran at once.test_dev_server_files_run_at_once_each_on_its_own_warm_vite_cachefailed. All 9 files shared one cache (1 != 9).Changelog
none
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Restores parallel execution for webviews test files that start a Vite dev server, which #19812 had serialized to fix a race on the shared
node_modules/.vitecache at the cost of 2.5 extra minutes on the web test phase.CMUX_VITE_CACHE_DIRnames viadev-server/viteCacheDir.mjs, and the dev server plugin prefers it over its per-port cache, which had been overridingvite.config.tsand leaving default-config files to start cold. A new test resolves each config and asserts itscacheDir.run-webviews-tests.shruns one warming file per config alone, then the remaining dev-server files runCMUX_WEB_TEST_DEV_JOBSat once (default a quarter of the jobs; half was CPU bound on the 8-core runner and broke frame-budget and attach-timing tests), each on its own copy of that config's warm cache, deleted when the file finishes. Files that callcreateServernow count as dev server files, and failed cache copies or cleanups no longer stop the lane.Written for commit 070cc36. Summary will update on new commits.