Skip to content

Conversation

@whoiskatrin
Copy link
Contributor

Added a new utility function, createStubProxy, to create a proxy for RPC method calls. This function prevents internal JavaScript methods from triggering RPC calls during serialisation

@changeset-bot
Copy link

changeset-bot bot commented Dec 29, 2025

🦋 Changeset detected

Latest commit: 06a3d25

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
agents Patch

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

@claude
Copy link

claude bot commented Dec 29, 2025

Claude Code Review

Summary: Clean fix for issue #753. The createStubProxy function correctly prevents RPC calls for internal JS methods during serialization.

Issues Found:

  1. Missing Symbol.toStringTag check (react.tsx:103)
    • Line 103 checks for the string '@@toStringTag' but should check the actual symbol
    • Change:
      method === '@@toStringTag' ||
    • To:
      method === Symbol.toStringTag ||
    • The current check won't catch Symbol.toStringTag access since symbols don't equal strings

Tests: Comprehensive coverage of the fix including edge cases and the original issue scenario.

Architecture: Proper separation of concerns by extracting proxy creation into a testable utility function.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 29, 2025

Open in StackBlitz

npm i https://pkg.pr.new/cloudflare/agents@758

commit: 06a3d25

@whoiskatrin whoiskatrin merged commit f12553f into main Dec 29, 2025
5 checks passed
@whoiskatrin whoiskatrin deleted the fix-logging branch December 29, 2025 16:39
@github-actions github-actions bot mentioned this pull request Dec 29, 2025
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