Skip to content

WOR-1263: migrate workflow wrapped binding into jsrpc#6819

Open
Caio-Nogueira wants to merge 1 commit into
mainfrom
feat/workflows-binding-jsrpc
Open

WOR-1263: migrate workflow wrapped binding into jsrpc#6819
Caio-Nogueira wants to merge 1 commit into
mainfrom
feat/workflows-binding-jsrpc

Conversation

@Caio-Nogueira

Copy link
Copy Markdown
Contributor

Gates the JSRPC transport for the env.WORKFLOW binding while the RPC callee is rolled out. Experimental opt-in only (no enable date); the legacy HTTP transport remains the default.

When workflows_bindings_rpc is enabled, WorkflowImpl and InstanceImpl dispatch their methods as JSRPC calls directly on the inner fetcher instead of issuing HTTP requests. The wrapper classes are preserved on both transports (results are always wrapped in InstanceImpl), so prototypes and instanceof stability are unchanged. The Fetcher interface now declares the RPC method surface the callee must implement. The legacy callFetcher HTTP path is retained for un-flagged workers.

Gates the JSRPC transport for the env.WORKFLOW binding while the RPC
callee is rolled out. Experimental opt-in only (no enable date); the
legacy HTTP transport remains the default.

feat(workflows): route binding through JSRPC behind compat flag

When workflows_bindings_rpc is enabled, WorkflowImpl and InstanceImpl
dispatch their methods as JSRPC calls directly on the inner fetcher
instead of issuing HTTP requests. The wrapper classes are preserved on
both transports (results are always wrapped in InstanceImpl), so
prototypes and instanceof stability are unchanged. The Fetcher interface
now declares the RPC method surface the callee must implement. The
legacy callFetcher HTTP path is retained for un-flagged workers.

test(workflows): cover both binding transports end-to-end

Upgrade the mock to a dual-transport WorkerEntrypoint (RPC methods +
fetch handler) sharing one set of business-logic helpers so both
transports behave identically, including an error-trigger id. The
wd-test now runs the same suite against a flag-off (HTTP) service and a
flag-on (RPC) service pointed at the WorkflowsMock entrypoint. Tests add
instance-method, prototype-preservation, and error-propagation coverage.
@Caio-Nogueira Caio-Nogueira requested review from a team as code owners June 16, 2026 12:36
@ask-bonk

ask-bonk Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

LGTM

github run

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