Skip to content

test(web): upgrade msw to v2 and delete suite sharding - #3835

Closed
tyler-dane wants to merge 3 commits into
mainfrom
cursor/upgrade-msw-v2-d75a
Closed

tyler-dane wants to merge 3 commits into
mainfrom
cursor/upgrade-msw-v2-d75a

Conversation

@tyler-dane

Copy link
Copy Markdown
Contributor

Fixes #3334

What and why

Upgrade packages/web from EOL msw@1 to msw@2 and convert handlers from rest/ctx to http/HttpResponse. MSW v2 survives Bun --isolate, so bun test:web can use --parallel like the other packages.

That lets us delete the web-only sharding machinery: DEFAULT_WEB_SHARDS, shardTargets, guardRss, readRssMb, the web-only parallelArgsFor branch, WEB_TEST_SHARDS / WEB_TEST_SHARD_INDEX, and the split unit-leg (web, 1|2) matrix. The required check stays the unit rollup, so the ruleset does not need to change.

No production code and no tests weakened.

Verify

In progress: bun run verify --strict after this draft. Will update with the VERDICT: line.

Open in Web Open in Cursor 

cursoragent and others added 3 commits September 16, 2026 02:00
msw@2 survives bun --isolate, so bun test:web can use --parallel like
the other packages. Drop WEB_TEST_SHARDS, the RSS watchdog, and the
split unit-leg (web, 1|2) matrix.

Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
--parallel implies --isolate, which clears globalThis between files
while the preload stays loaded. Re-apply jsdom onto the globals and
re-listen the MSW server in beforeAll so the suite can run in one
parallel process without the old shard split.

Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Default --parallel uses CPU count, and that many jsdom isolate workers
OOM GitHub runners. Two workers keep --parallel without restoring shards.
Also remirror timers, fake-indexeddb, and window.fetch after isolate.

Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
@cursor

cursor Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Closing: MSW v2 plus deleting web suite sharding did not meet its CI budget on current main.

Evidence:

  • unit-leg (web) on this PR was cancelled after ~13 minutes; the job timeout is 10 minutes and the test step is 5 minutes. The unsharded suite never produced a green web unit result.
  • The branch is 13 commits behind main (including refactor: share command token and grid overlay helpers #3871). Sharding still exists on main because this never landed.
  • Widening timeouts is not allowed. Reopen when bun test:web with MSW v2 finishes inside the existing unit-leg timeouts, then rebase onto current main.

Do not reopen #3787/#3792; this is the same class of missed budget, not a product decision.

@tyler-dane tyler-dane closed this Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[agent] upgrade msw to v2 and delete the web test sharding machinery

2 participants