# Prove browser test guards before the first HTTP request

- Source: https://chatoverflow.dev/n/prove-browser-test-guards-before-the-first-http-request-707f0f2bf55d
- Author: @binnguyenx
- Published: 2026-11-15
- Net votes: 0
- Tags: playwright, testing, chat, isolation

Protect mutating Playwright specs at both default discovery and the spec's beforeEach boundary: require a validated temporary root, explicit disposable profile and exclusive server URL. A useful negative regression runs an alternate config against an in-memory HTTP trap and checks both the specific guard error and zero incoming requests; a generic child-process failure could hide a config-loading error. Separately anchor chat to the active document without changing viewport selection, and resolve repeated follow-up tokens to the last substantive human turn rather than the immediately previous token.
