Skip to content

docs: make Workers RPC example reproducible - #32734

Open
ting-hong-shieh wants to merge 2 commits into
cloudflare:productionfrom
ting-hong-shieh:docs/rpc-typescript-setup
Open

ting-hong-shieh wants to merge 2 commits into
cloudflare:productionfrom
ting-hong-shieh:docs/rpc-typescript-setup

Conversation

@ting-hong-shieh

@ting-hong-shieh ting-hong-shieh commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Show a two-directory layout for the Worker A and Worker B projects.
  • Add compatibility dates and use TypeScript entrypoint paths in both Wrangler configurations.
  • Generate Worker A's binding types from both configurations, which exposes Worker B's add() RPC method without a handwritten Env interface.
  • Convert the numeric result to a string before constructing the response, remove Worker B's unused fetch() method, and include the multi-Worker local development command.

Closes #31154.

Validation

Validated after merging production in 893c84d7d:

  • Generated binding types with Wrangler 4.150.0 and checked both Workers in strict mode with TypeScript 6.0.3.
  • Ran the multi-config local development command: Worker A called Worker B and returned 3 with HTTP 200. The local fixture used compatibility date 2026-10-13, supported by the installed runtime.
  • pnpm run check passed: 566 Astro files with no errors, warnings, or hints; Worker type checking also passed.
  • The edited partial passed MDX compilation and Prettier checking.

Full-site pnpm run build was stopped after nearly four minutes without progress in Nimbus's astro:config:setup hook. Full build and the dependent lint:nimbus check remain unverified.

@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

AI Review

✅ Reviewed 893c84d · 2 findings · incremental

👉 Fix in your agent 👈
Fix the following review findings in PR #32734 (https://github.com/cloudflare/cloudflare-docs/pull/32734).

Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification.
- If you disagree, explain why.
- If you need clarification before deciding, ask those questions.
- Then share your plan for which issues to tackle and in what order.

After triaging, follow this order:
1. Post a comment on this PR for any findings you are skipping, with the finding ID and your reasoning.
2. Then commit the fixes for the legitimate findings.

The comment must come before the commit because the next review reads PR comments.

## Style Guide
- S-0f0d367e | src/content/partials/workers/service-binding-rpc-example.mdx:13 | Replace directional word `below`
  The style guide forbids directional words such as `below` in prose; they must be replaced with a direct reference. The sentence "The TypeScript example below uses a separate directory for each Worker:" points directionally to content further down the page.
- S-0ad4a999 | src/content/partials/workers/service-binding-rpc-example.mdx:101 | Break up semicolon joining independent clauses
  The style guide requires semicolons joining two independent clauses to be split into separate sentences. "Do not set `entrypoint` to `default`; omitting `entrypoint` selects the default export." joins two independent clauses with a semicolon.

Style Guide

  • src/content/partials/workers/service-binding-rpc-example.mdx:13 · Replace directional word below

    The style guide forbids directional words such as below in prose; they must be replaced with a direct reference. The sentence "The TypeScript example below uses a separate directory for each Worker:" points directionally to content further down the page.

  • src/content/partials/workers/service-binding-rpc-example.mdx:101 · Break up semicolon joining independent clauses

    The style guide requires semicolons joining two independent clauses to be split into separate sentences. "Do not set entrypoint to default; omitting entrypoint selects the default export." joins two independent clauses with a semicolon.

Commands
  • /review Run a review now.
  • /full-review Review the entire PR diff.
  • /disable-auto-review Stop automatic reviews.
  • /rebase Rebase against production.

@mvvmm mvvmm added the product:workers Related to Workers product label Sep 5, 2026
@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Review coverage

🟡 1 ownership area needs approval.

Suggested reviewers: @dinasaur404 @for-the-kidz @WalshyDev

Needs approval Eligible approvers Suggested
workers @GregBrimble, @irvinebroque, @MattieTK, @mikenomitch, @vy-ton, @WalshyDev, @cloudflare/deploy-config, @cloudflare/workers-runtime-1, @cloudflare/wrangler, @cloudflare/product-owners dinasaur404, for-the-kidz, WalshyDev
CODEOWNERS mappings for displayed areas (1)
Pattern Owners
/src/content/partials/workers/ @GregBrimble, @irvinebroque, @MattieTK, @mikenomitch, @vy-ton, @WalshyDev, @cloudflare/deploy-config, @cloudflare/workers-runtime-1, @cloudflare/wrangler, @cloudflare/product-owners

@ting-hong-shieh
ting-hong-shieh requested a review from a team as a code owner October 20, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:workers Related to Workers product size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Errors in Workers RPC docs

7 participants