Add workers_dev route opt-out support#8
Conversation
Map Wrangler workers_dev to the WDL manifest and require deploy and promote acknowledgement. Render control-reported platform and route-pattern URL hints without normalizing operator patterns. Clarify workers_dev and preview_urls behavior across user and agent docs, with focused tests. Synchronize the Apache-2.0 license boilerplate with the upstream WDL repository. Signed-off-by: Lu Zhang <lu@wdl.dev>
There was a problem hiding this comment.
Pull request overview
This PR updates the WDL CLI deploy pipeline to support WDL’s new “platform-domain route opt-out” contract by mapping Wrangler’s workers_dev = false into the deploy manifest, enforcing safe opt-out validation, and improving deploy output to reflect control-reported URL hints. It also synchronizes user/agent documentation to explain the semantic differences vs Cloudflare, and updates legal/trademark boilerplate.
Changes:
- Add
workers_devparsing/mapping: require an explicit boolean, and require at least oneroute/routespattern when opting out (workers_dev = false), then emitworkersDev: falsein the manifest. - Require both deploy and promote acknowledgements from control before treating the opt-out as preserved; enhance deploy summary output to print control-reported platform + route URL hints while preserving operator patterns and local
CONTROL_URLscheme/port behavior. - Update docs (English + Chinese), agent references, and legal/trademark notices to match the new behavior and clarify
preview_urlsdifferences.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/cli-deploy.test.js | Adds unit coverage for parseWorkersDev, env override inheritance, deploy/promote acknowledgement behavior, and URL hint rendering/validation. |
| lib/wrangler-pack.js | Implements parseWorkersDev, enforces opt-out requires routes, and maps workersDev: false into the manifest. |
| lib/wrangler/config.js | Treats workers_dev as supported (no longer rejected) and documents it in the supported summary. |
| commands/deploy.js | Enforces deploy+promote opt-out acknowledgements and prints validated control-reported URL hints with local scheme/port preservation. |
| GUIDE.md | Documents workers_dev opt-out semantics vs Cloudflare and notes preview_urls remains unsupported. |
| GUIDE-zh.md | Chinese-language sync of the workers_dev/preview_urls semantics and deploy summary behavior. |
| docs/deploy.md | Documents route opt-out, URL hint printing, and local control URL scheme/port behavior for all printed URLs. |
| docs/deploy-zh.md | Chinese-language sync of deploy behavior and workers_dev/preview_urls semantics. |
| docs/env-overrides.md | Notes workers_dev as inheritable across env overrides. |
| docs/env-overrides-zh.md | Chinese-language sync of the env inheritance documentation including workers_dev. |
| templates/AGENTS.md | Updates generated-project agent guidance to describe workers_dev = false requirements and deploy URL outputs. |
| .claude/skills/wdl-deploy/SKILL.md | Updates the deploy skill reference to align with new workers_dev behavior and preview_urls rejection. |
| README.md | Adds trademark/disclaimer notice and documents platform URL default + workers_dev = false opt-out for routed workers. |
| README-zh.md | Chinese-language sync of trademark/disclaimer and platform URL + opt-out behavior. |
| CHANGELOG.md | Notes the new routed-worker opt-out behavior and deploy summary URL output changes. |
| LICENSE | Appends the Apache-2.0 boilerplate appendix per legal guidance referenced in the PR description. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5edf22bfaf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Validate control-reported URL hints before displaying them. Warn and omit invalid hints without failing an already promoted deploy. Fall back to the derived platform URL when its reported hint is absent or invalid. Cover canonical authorities, ambiguous host rewrites, and mixed valid and invalid responses. Signed-off-by: Lu Zhang <lu@wdl.dev>
Summary
workers_dev = falseinto the WDL deploy manifest and require both deploy and promote acknowledgements before treating the opt-out as preservedCONTROL_URLscheme/port behaviorworkers_devandpreview_urlssemantic differences across the user and agent-facing referencesContext
This adapts the CLI to the route opt-out contract released in
wdl.20260724.1. WDL keeps the platform-domain route enabled by default; an explicit opt-out requires at least one custom route pattern.Validation
git diff --check main...HEADnpm run lintnpm run typechecknpm test(525 tests)npm audit --audit-level=moderatenpm pack --dry-run