Repository navigation
Conversation
OrKoN
requested changes
Oct 1, 2026
OrKoN
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the PR:
- Revert the manual
## Unreleasedaddition inCHANGELOG.md.CHANGELOG.mdis managed automatically by Release Please and should not be edited manually in pull requests. - Rebase
tests/mocks.tsontomainand importCDPSessionfrom../src/third_party/index.jsinstead ofpuppeteer-core.mainreplacedparserfromsrc/config/mcp-options.tswithConfigParserfromsrc/config/ConfigParser.js, and runtime Puppeteer classes intests/mocks.tsare re-exported throughsrc/third_party/index.js. - Make
nodesByFrameoptional in theTextSnapshotconstructor insrc/TextSnapshot.ts(defaulting tonew Map()). This avoids forcing existingnew TextSnapshot(...)callers intests/McpPage.test.tsto pass an emptynodesByFramemap. - Convert the two
--site-per-processbrowser tests intests/TextSnapshot.test.ts(rejects old UIDs when a replacement renderer reuses backend IDsandkeeps extra iframe nodes separate from colliding main-frame backend IDs) into mock-based unit tests. PerAGENTS.md, unit tests with mocked frames and handles should be preferred over launching real browsers, especially when the browser tests rely on non-deterministicbackendNodeIdcollisions across 32–64 DOM elements.
Collaborator
|
Closing as stale |
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.
Snapshot UIDs can collide across renderer documents or be reused after a renderer replacement. A later input, evaluation, or screenshot request can then resolve the wrong element. Extra DOM nodes can also disappear when their backend ID matches an accessibility node in another frame.
This repair keeps identity in the snapshot owner:
The repaired consumers are reference-based input,
evaluate_script,take_screenshot, and third-party DOM-result conversion. No tool schema, dependency, or package version changes are included.Validation:
--site-per-processand assert that backend IDs really collide. They verify stale-reference rejection, fresh-snapshot recovery, correct iframe handle routing and descendants, and successive actions using the retained extra node.npm run testandnpm run check-formatpassed on Linux.npm run bundleandnpm run test:notices:no-buildpassed as well. A locally packed tarball was extracted into a clean directory and its CLI startup was verified.