Skip to content

fix(ts): return null instead of undefined in runSelectorDiscoveryPass - #170

Merged
JonasJesus42 merged 3 commits into
mainfrom
issue-163-v2
Jul 29, 2026
Merged

fix(ts): return null instead of undefined in runSelectorDiscoveryPass#170
JonasJesus42 merged 3 commits into
mainfrom
issue-163-v2

Conversation

@JonasJesus42

@JonasJesus42 JonasJesus42 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Fixes TypeScript error from PR #169: return; inside a function typed Promise<Browser | null> emits undefined which TS rejects. Changed to return 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 null instead of undefined in runSelectorDiscoveryPass.

Written for commit e91259e. Summary will update on new commits.

Review in cubic

JonasJesus42 and others added 3 commits July 29, 2026 01:13
…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
JonasJesus42 merged commit ea80c29 into main Jul 29, 2026
1 check passed
JonasJesus42 added a commit that referenced this pull request Jul 29, 2026
JonasJesus42 added a commit that referenced this pull request Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant