feat(web): clear all browser fixture routes
- Add
browser.unrouteAll()for clearing test network mocks without retaining each string or RegExp pattern. This addresses the routing reset gap in#1020. - Remove only routes owned by the browser fixture, preserve configured site headers, and keep running handlers under the existing attempt cleanup budget. Repeated clears are safe and later route registration works.
Verified
Ran it locally: yes.
Ran the real browser fixture in native Chromium against a local counting HTTP server: mocked two different patterns, cleared them, observed real network responses and preserved site headers, cleared an empty registry, registered a new route, and removed it by pattern. Existing route contract tests, SDK type assertions and full pnpm check pass.
| main | this branch |
|---|---|
| Regression fails | Regression and adjacent tests pass |
RUN v5.0.1 packages/web
Test Files 2 passed (2)
Tests 36 passed (36)
Start at 10:00:48
Duration 2.47s (tests 82%, import 10%, transform 8%)
The full repository pnpm check, changed package build, typecheck, and changed TypeScript lint pass. The full repository pnpm check passes on the pinned unchanged base with the complete frozen-lockfile install. Browser and mobile benchmark suites were not run; no live model calls were made.
Also rebuilt the exact frozen commit and passed a real runner/worker/browser product fixture with no model calls. The candidate capability executed through the built SDK and real worker.