feat(web): add observationNodeBudget option

AH
15d ago
+75-8

Issue

Fixes #1510

What changed

  • web({ observationNodeBudget }) sets the node budget one observation spends, shared across the main document and its frames, default 3,000 (MAX_OBSERVED_NODES in observation-capture.ts was the fixed value).
  • Validated at config load as a positive safe integer, INVALID_CONFIG otherwise; added to WEB_OPTION_KEYS so it is a known web() key.
  • The value reaches captureObservation through CaptureSettings.nodeBudget, which also feeds TraceFeed captures.
  • Docs (docs/reference/web.mdx option table and section) and a patch changeset for @e2e-dev/web and e2e.

Verified

Ran it locally: yes

  • pnpm --filter @e2e-dev/web test:unit: all unit tests pass, including the new web({ observationNodeBudget }) cases (rejects 0, -1, 1.5, NaN, '8000' as INVALID_CONFIG; accepts 8_000) and the updated unknown-key message.
  • pnpm --filter @e2e-dev/web typecheck, pnpm run lint, pnpm docs:check: clean.