[vitest-pool-workers] Install wrapper prototype proxy once - #15106
Open
thinkter wants to merge 1 commit into
Open
[vitest-pool-workers] Install wrapper prototype proxy once#15106thinkter wants to merge 1 commit into
thinkter wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 7b9bf1a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
workers-devprod
requested review from
a team and
emily-shen
and removed request for
a team
August 9, 2026 17:40
Contributor
|
Codeowners approval required for this PR:
Show detailed file reviewers |
thinkter
force-pushed
the
fix/vitest-prototype-proxy-15092
branch
from
August 9, 2026 18:48
c1b0622 to
7b9bf1a
Compare
dario-piotrowicz
requested review from
dario-piotrowicz
and removed request for
emily-shen
August 11, 2026 11:11
@cloudflare/autoconfig
@cloudflare/build-output-utils
@cloudflare/config
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-functions
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
dario-piotrowicz
approved these changes
Aug 11, 2026
dario-piotrowicz
left a comment
Member
There was a problem hiding this comment.
Looks good to me! Thanks for the fix @thinkter 😄
workers-devprod
approved these changes
Aug 11, 2026
workers-devprod
left a comment
Contributor
There was a problem hiding this comment.
Codeowners reviews satisfied
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 #15092.
Summary
Preserve the delayed wrapper-prototype proxy installation required by workerd introspection, while guarding it so each wrapper class installs exactly one proxy. Later constructions now reuse that prototype instead of wrapping the previous proxy and accumulating
gettraps. The existing trap behavior for inherited, ignored, symbol, and unknown RPC properties is unchanged.Regression coverage
Added deterministic package-level tests that compare prototype identity before the first construction, after the first construction, and after a later construction. The tests also cover inherited properties, unknown RPC-property delegation, and the ignored
selfand symbol cases without relying on timing or source-text assertions.Validation:
pnpm --filter @cloudflare/vitest-pool-workers exec vitest run test/proxy-prototype.test.ts(2 tests passed)pnpm --filter @cloudflare/vitest-pool-workers check:typepnpm exec oxfmt --check packages/vitest-pool-workers/src/worker/entrypoints.ts packages/vitest-pool-workers/src/worker/proxy-prototype.ts packages/vitest-pool-workers/test/proxy-prototype.test.ts .changeset/lazy-prototype-proxy.mdNote
This is a contribution from an AI agent: OpenAI Codex, GPT-5.6.