Skip to content

fix(function): getTargetId#747

Merged
Kikobeats merged 1 commit intomasterfrom
next
May 6, 2026
Merged

fix(function): getTargetId#747
Kikobeats merged 1 commit intomasterfrom
next

Conversation

@Kikobeats
Copy link
Copy Markdown
Member

@Kikobeats Kikobeats commented May 6, 2026

Note

Medium Risk
Changes how page-based functions pick the Puppeteer page by adding CDP targetId plumbing, which can affect runtime behavior under load and across different Puppeteer/Chrome versions. Includes a new concurrency test that should catch regressions but still warrants review in real deployments.

Overview
Fixes a concurrency bug where page-based functions could run against the wrong Puppeteer page when multiple pages exist.

The wrapper now captures the current page’s CDP targetId and passes it into the isolated function; the generated template uses that targetId to find the matching page after puppeteer.connect, falling back to the last page if unavailable. Adds a test asserting concurrent requests each receive their own page, and tweaks nano-staged to run prettier-standard without npx -y.

Reviewed by Cursor Bugbot for commit 56abbf2. Bugbot is set up for automated code reviews on this repo. Configure here.

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 88.806% (+0.1%) from 88.699% — next into master

@Kikobeats Kikobeats merged commit 944e05a into master May 6, 2026
22 checks passed
@Kikobeats Kikobeats deleted the next branch May 6, 2026 16:34
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.

2 participants