Skip to content

Fix router deploy: drop unresolvable WEBHOOK_WORKER service binding - #3

Merged
willwashburn merged 2 commits into
mainfrom
fix-router-webhook-binding
Jun 23, 2026
Merged

willwashburn merged 2 commits into
mainfrom
fix-router-webhook-binding

Conversation

@willwashburn

@willwashburn willwashburn commented Jun 23, 2026 •

Copy link
Copy Markdown
Member

The merged router deploy failed with Service binding 'WEBHOOK_WORKER' references Worker 'webhook-worker' which was not found (code 10143). That binding was an addition in #2 — cloud's router configures webhook offload via the WEBHOOK_WORKER_ORIGIN URL, not a service binding, and the webhook Worker isn't resolvable under that script name. Everything else (incl. cloud-web-worker) validated fine.

Drop the binding so router-next.agentrelay.com deploys. Webhook offload only matters when the ROUTER_CONFIG WEBHOOK_ORIGIN flag is worker; it'll be wired back (via the URL) before the apex cutover. Also corrects a missed @agentworkforce/cloud label in the README diagram.


Summary by cubic

Fix router deploy by removing the unresolvable WEBHOOK_WORKER binding and wiring WEBHOOK_WORKER_ORIGIN to the prod webhook Worker URL. The router now deploys cleanly and offloads /api/v1/webhooks/* via the URL when ROUTER_CONFIG.WEBHOOK_ORIGIN is worker.

  • Bug Fixes
    • Updated router/wrangler.jsonc: dropped WEBHOOK_WORKER; set WEBHOOK_WORKER_ORIGIN to the live workers.dev URL to resolve 10143 and keep webhook offload working.
    • Corrected README diagram label to @agentworkforce/agentrelay.com.

Written for commit f88099a. Summary will update on new commits.

Review in cubic

The deploy failed: a service binding to script `webhook-worker` returns
"Worker not found" (code 10143) — cloud names/exposes that worker differently
and configures webhook offload via the WEBHOOK_WORKER_ORIGIN *.workers.dev URL,
not a service binding. Drop the binding so the router deploys; webhook offload
(only active when the ROUTER_CONFIG WEBHOOK_ORIGIN flag is "worker") is wired
back before the apex cutover. Also fix a missed @agentworkforce/cloud label in
the README diagram.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f3e80da9-de53-4936-8846-4a8270a1389f

📥 Commits

Reviewing files that changed from the base of the PR and between f3a74fa and f88099a.

📒 Files selected for processing (2)
  • router/README.md
  • router/wrangler.jsonc

📝 Walkthrough

Walkthrough

The router's wrangler.jsonc removes the WEBHOOK_WORKER service binding (unstable due to a random hash suffix in the script name) from services, retaining only CLOUD_WEB_WORKER. A new WEBHOOK_WORKER_ORIGIN URL variable is added to vars for forwarding /api/v1/webhooks/* requests. The README.md routing diagram updates the non-observer fallback label from @agentworkforce/cloud to @agentworkforce/agentrelay.com.

Changes

Router webhook routing config and docs

Layer / File(s) Summary
Remove WEBHOOK_WORKER binding; add WEBHOOK_WORKER_ORIGIN var and update diagram
router/wrangler.jsonc, router/README.md
services drops the WEBHOOK_WORKER binding, keeping only CLOUD_WEB_WORKER; vars gains WEBHOOK_WORKER_ORIGIN with comments describing URL-based webhook forwarding for /api/v1/webhooks/*. The README diagram renames the catch-all fallback from @agentworkforce/cloud to @agentworkforce/agentrelay.com.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • AgentWorkforce/agentrelay.com#2: Implements the router logic in router/index.ts that reads WEBHOOK_WORKER_ORIGIN to forward webhook requests, which this PR's config change directly wires up.

Poem

🐇 A binding once wobbly with hashes galore,
Now swapped for a URL — stable, secure!
The diagram updated, the config made clear,
No random-named worker to cause us to fear.
Hop hop, little webhook, your path is now sure! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: removing the unresolvable WEBHOOK_WORKER service binding that was causing router deployment failures.
Description check ✅ Passed The description thoroughly explains the deployment error, the fix applied, and the rationale behind using URL-based webhook routing instead of service binding.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-router-webhook-binding

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployed!

Environment URL
Web https://37614280-agentrelay-web.agent-workforce.workers.dev

This is a Cloudflare Workers preview version of this PR's build.

The ROUTER_CONFIG WEBHOOK_ORIGIN flag is 'worker', so the router forwards
/api/v1/webhooks/* to the dedicated webhook Worker. Set the URL (read from the
live router) since the worker's SST-hashed script name isn't service-bindable.
@willwashburn
willwashburn merged commit e90a439 into main Jun 23, 2026
3 checks passed
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