Document connect() TCP inbound handler - #32443
Open
ask-bonk[bot] wants to merge 1 commit into
Open
Conversation
Co-authored-by: irvinebroque <irvinebroque@users.noreply.github.com>
ask-bonk
Bot
requested review from
a team,
MattieTK,
WalshyDev,
korinne and
vy-ton
as code owners
July 31, 2026 00:40
Contributor
Review
👉 Fix in your agent 👈Fix the following review findings in PR #32443 (https://github.com/cloudflare/cloudflare-docs/pull/32443).
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 (e.g. the fix requires disproportionate effort for minimal benefit,
or the finding is factually incorrect), 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 — the bot reads PR comments when a new
push triggers a review, so skip comments posted after the push will be missed.
---
## Code Review
### Warnings (1)
#### CR-909804465008 · Documentation contradicts existing reserved-methods page
- **File:** `src/content/docs/workers/runtime-apis/handlers/connect.mdx` line 208
- **Issue:** This page documents `connect()` as a supported handler on `WorkerEntrypoint`, but `/workers/runtime-apis/rpc/reserved-methods/` currently states that `WorkerEntrypoint.connect()` 'is currently not implemented or supported'.
- **Fix:** Update the reserved-methods page to reflect that `connect()` is now supported behind the `experimental` compatibility flag.
### Suggestions (1)
#### CR-913046e61f95 · Misleading context method documentation
- **File:** `src/content/docs/workers/runtime-apis/handlers/connect.mdx` line 90
- **Issue:** The `ctx` parameter is described as containing `waitUntil` and `passThroughOnException`, but `passThroughOnException` is only meaningful for HTTP `fetch()` handlers (it passes requests to an origin server). For a TCP `connect()` handler there is no origin request to pass through.
- **Fix:** Follow the `scheduled()` handler convention and describe `ctx` as containing `waitUntil`; omit `passThroughOnException` or explicitly note it is only relevant for `fetch()`.
Code ReviewThis code review is in beta and may not always be helpful — use your judgment. Warnings (1)
Suggestions (1)
ConventionsNo convention issues found. Style Guide ReviewNo style-guide issues found. CommandsOnly codeowners can run commands. Post a comment with the command to trigger it.
|
Contributor
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
Contributor
5 tasks
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.
This PR documents the
connect()handler for inbound TCP sockets in Cloudflare Workers. Here's a summary of the changes:New page
src/content/docs/workers/runtime-apis/handlers/connect.mdx— A new dedicated documentation page for theconnect()handler, including:experimentalcompat flag)socket,env,ctx)readable,writable,opened,closed,close())WorkerEntrypointusage with service bindingsUpdated pages
src/content/docs/workers/runtime-apis/tcp-sockets.mdx— Replaced the "coming soon" language about inbound TCP connections with a reference to the newconnect()handler page.src/content/docs/workers/reference/protocols.mdx— Updated the Direct TCP sockets inbound cell from "coming soon" to link to theconnect()handler.src/content/docs/workers/runtime-apis/rpc/reserved-methods.mdx— Updated theconnect()section to reflect that it is now implemented as the connect handler, replacing the previous "not implemented or supported" language.src/content/docs/workers/runtime-apis/handlers/index.mdx— Will automatically include the new Connect Handler in theDirectoryListingsince the newconnect.mdxfile exists in the same directory.Validation
pnpm run checkpassed with 0 errorspnpm run formatapplied successfullyCloses #32442
github run