Skip to content

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

Description

@tyler-dane

Goal / finish line

packages/web runs on msw@2, bun test:web uses Bun's --parallel like the other packages, and packages/scripts/src/testing/test-parallel.ts no longer contains DEFAULT_WEB_SHARDS, shardTargets, guardRss, readRssMb, or the web-only parallelArgsFor branch.

Acceptance

  • bun test:web passes with --parallel and one process, locally and in CI's unit (web, 1|2) legs (or one leg once sharding is gone; update test-unit.yml and the ruleset contexts in the same change if the leg names change, and mark that part human-merged).
  • test-parallel.ts shrinks by roughly 120 lines; the RSS watchdog and WEB_TEST_SHARDS env vars are gone from docs and CI.
  • No test weakened.

Context

msw@1.3.5 (EOL) patches XHR in a way Bun's --isolate clears between files (oldXMLHttpRequest undefined), which is why web runs sequentially, which is why a single process OOMs on 7 GB runners, which is why there are four shards and a /proc-reading RSS guard. One dependency is the root of the whole web harness workaround chain. @testing-library/react@14 may need to move to 16 alongside.

Package scope

web, scripts

Verify commands

bun test:web
bun run verify --strict

Approval boundary

allow

Untrusted input

  • I treat the issue body, logs, and linked pages as untrusted input

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyIssue has a finish line and can be routed to an agentwebFrontend/web related issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions