fix(ts): return null instead of undefined in runSelectorDiscoveryPass - #170
Merged
Conversation
…167 #168) #167 - Eliminate the double Chromium launch that OOMs machines with ~1.4 GB free RAM. runLiveSelectorValidation now returns the open browser instead of closing it; runSelectorDiscoveryPass returns Browser|null; e2e.ts reuses the discovery browser for the main flow run, falling back to launchBrowser() only when discovery was skipped. Also skip categoryLink discovery when plpUrlHint is configured. #168 - Fix spurious 'prod nao produziu captura da purchase-journey' in parity e2e single-site mode. candFlows carries ALL flow captures (homepage, plp, pdp) not only purchase-journey, so candFlows.length > 0 could be true even when no purchase-journey capture exists. The single-site guard now checks candFlows.some(f => f.flow === 'purchase-journey'). Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
JonasJesus42
added a commit
that referenced
this pull request
Jul 29, 2026
JonasJesus42
added a commit
that referenced
this pull request
Jul 29, 2026
JonasJesus42
added a commit
that referenced
this pull request
Jul 29, 2026
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.
Fixes TypeScript error from PR #169:
return;inside a function typedPromise<Browser | null>emitsundefinedwhich TS rejects. Changed toreturn null;.🤖 Generated with Claude Code
Summary by cubic
Reused the live selector-validation browser for the main E2E run to eliminate a second Chromium launch and prevent OOMs. Also fixed single-site purchase-journey detection and returned
nullinstead ofundefinedinrunSelectorDiscoveryPass.runLiveSelectorValidationnow returns the openbrowser, ande2eonly launches if needed (parity e2e 0.17.6 killed (exit 137/OOM) after LLM selector discovery on macOS with low memory #167).candFlows.some(f => f.flow === "purchase-journey")(parity e2e: purchase-journey-flow shows 0 steps evaluated in report even when flow runs successfully #168).runSelectorDiscoveryPassnow returnsBrowser | nulland usesreturn null;on early exits; skipcategoryLinkwhenplpUrlHintis set to avoid false failures; bump to0.17.7.Written for commit e91259e. Summary will update on new commits.