fix(urls): repair workers.dev URLs broken by mothership rename#22
Conversation
The mothership->chittyid rename incorrectly transformed account-subdomain segments of workers.dev URLs. Cloudflare workers.dev URL shape is <worker_name>.<account_subdomain>.workers.dev, so notion-sync.chittyid-mothership.workers.dev had "chittyid-mothership" as the *account subdomain*, not the worker name. Renaming that segment to "chittyid" produced URLs that don't resolve. Also, this worker has workers_dev: false, so neither URL was ever live. - src/services/registry-client.js: read endpoint from env.CHITTYID_SERVICE_URL (matches src/client/index.js convention) / SERVICE_PUBLIC_URL, fallback to canonical route https://id.chitty.cc. - scripts/monitor-notion-sync.js: require NOTION_SYNC_WORKER_URL to be set explicitly; fail with a clear error otherwise. No notion-sync wrangler config deploys src/workers/notion-sync-worker.js in this repo, so guessing a canonical URL would be wrong. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR moves service endpoint URL configuration from hardcoded defaults to environment variables with explicit validation. The Notion Sync monitor now requires ChangesService endpoint configuration
Possibly Related PRs
🎯 2 (Simple) | ⏱️ ~10 minutes ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
chittyid | 8236bb6 | Jun 03 2026, 10:48 PM |
These files are leftovers from an older notion-sync architecture: - src/workers/notion-sync-worker.js is not bound by any wrangler config (wrangler.jsonc, wrangler.hybrid.toml, wrangler-pages.toml all have zero Notion references) and is only referenced by itself. - scripts/monitor-notion-sync.js reads NOTION_SYNC_WORKER_URL which is not set anywhere in the repo or ecosystem and targets a worker that is not deployed. - No cross-repo references exist in CHITTYFOUNDATION/* or CHITTYOS/*. - Current Notion integration flows through src/services/notion-sync.js and src/api/notion-bridge.js, which are unaffected. Surfaced during chittyid PR #22 cleanup (orphan task 4b35b6e3-51a4-4c44-a8e4-ac43b9b17e68). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
These files are leftovers from an older notion-sync architecture: - src/workers/notion-sync-worker.js is not bound by any wrangler config (wrangler.jsonc, wrangler.hybrid.toml, wrangler-pages.toml all have zero Notion references) and is only referenced by itself. - scripts/monitor-notion-sync.js reads NOTION_SYNC_WORKER_URL which is not set anywhere in the repo or ecosystem and targets a worker that is not deployed. - No cross-repo references exist in CHITTYFOUNDATION/* or CHITTYOS/*. - Current Notion integration flows through src/services/notion-sync.js and src/api/notion-bridge.js, which are unaffected. Surfaced during chittyid PR #22 cleanup (orphan task 4b35b6e3-51a4-4c44-a8e4-ac43b9b17e68). Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Summary
Follow-up to #21. Addresses two Codex review comments where the mothership->chittyid rename mechanically replaced
chittyid-mothershipwithchittyidinside workers.dev URLs, breaking URL structure semantics (the renamed segment was the account subdomain, not the worker name). Compounded byworkers_dev: falseinwrangler.jsonc, meaning these URLs never resolved either before or after the rename.src/services/registry-client.js:26: registered endpoint now reads fromenv.CHITTYID_SERVICE_URL(matches the convention insrc/client/index.js) orSERVICE_PUBLIC_URL, falling back to canonical routehttps://id.chitty.cc. No hardcoded workers.dev URL.scripts/monitor-notion-sync.js:8:NOTION_SYNC_WORKER_URLis now required; the script fails fast with a clear error if unset. No wrangler config in this repo deployssrc/workers/notion-sync-worker.js, so picking any canonical URL would be guessing.Notes
src/workers/notion-sync-worker.jsmay be dead code: nowrangler.toml/wrangler.jsoncdeploys it. Worth a separate cleanup PR if confirmed.Test plan
node --check src/services/registry-client.jsnode --check scripts/monitor-notion-sync.jsSummary by CodeRabbit