fix(pipeline): add browser guards and retry coverage for intercept/tap#393
Open
Astro-Han wants to merge 1 commit intojackwener:mainfrom
Open
fix(pipeline): add browser guards and retry coverage for intercept/tap#393Astro-Han wants to merge 1 commit intojackwener:mainfrom
Astro-Han wants to merge 1 commit intojackwener:mainfrom
Conversation
- Add ConfigError guard to stepIntercept() and stepTap() when page is null - Fix timeout truncation bug: Math.min(timeout, 3) → timeout (default 3s → 8s) - Add intercept/tap to BROWSER_STEPS for transient disconnect retry - Remove all page! non-null assertions after guard narrows type
b89b3a0 to
aa914a1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Harden
interceptandtappipeline steps so that missing browser sessions produce a clearConfigErrorinstead of an opaqueTypeError, and transient browser disconnects are retried automatically.Three concrete fixes:
stepIntercept()andstepTap()now throwConfigErrorwith a hint whenpageis null, placed after existing early-returns so no-op paths (empty capture / missing params) are preservedintercepthadMath.min(timeout, 3)which silently capped the wait to 3s regardless of config; now passestimeoutthrough directly (default changes from 3s to 8s)interceptandtaptoBROWSER_STEPSinexecutor.ts, giving them 2 retries on transient browser errors (extension disconnect, CDP connection loss, etc.)downloadis intentionally excluded from retry expansion; its internal error handling swallows cookie failures, so adding it toBROWSER_STEPSwould be nominal coverage with no real retry effect. That needs its own design.Related issue: none found
Type of Change
Checklist
Screenshots / Output
npx tsc --noEmit # clean npx vitest run src/ Test Files 29 passed (29) Tests 297 passed (297)