feat(web): add observationNodeBudget option
AH
15d ago+75+75+01234567890123456789-8-8-0123456789
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_NODESinobservation-capture.tswas the fixed value).- Validated at config load as a positive safe integer,
INVALID_CONFIGotherwise; added toWEB_OPTION_KEYSso it is a knownweb()key. - The value reaches
captureObservationthroughCaptureSettings.nodeBudget, which also feedsTraceFeedcaptures. - Docs (
docs/reference/web.mdxoption table and section) and a patch changeset for@e2e-dev/webande2e.
Verified
Ran it locally: yes
pnpm --filter @e2e-dev/web test:unit: all unit tests pass, including the newweb({ observationNodeBudget })cases (rejects0,-1,1.5,NaN,'8000'asINVALID_CONFIG; accepts8_000) and the updated unknown-key message.pnpm --filter @e2e-dev/web typecheck,pnpm run lint,pnpm docs:check: clean.