fix(doctrine): advertise real /api/intelligence/memory/* paths#214
Conversation
After #212 landed, production deploy still failed: Service binding 'SVC_SCORE' references environment 'production' on Worker 'chittyscore' which was not found. [code: 10144] Same class of drift as the SVC_EVIDENCE fix: the deployed worker is `chittyscore-worker` (default environment), not `chittyscore`. Verified via Cloudflare API. Drop the `environment` qualifier and rebind to the actual deployed worker name across dev/staging/production blocks. Deploy unblocked — produced version 21072dbb-1633-40b8-9f4a-f03bdb00ac75. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Doctrine seed at GET /api/v1/doctrine/seed previously advertised
POST /api/v1/memory/persist and /api/v1/memory/recall, but those
routes do not exist. The real handlers are mounted at
/api/intelligence/memory/{persist,recall} (see src/mcp/tool-dispatcher.js).
Grep confirms no caller used the v1/memory/* paths — only the doctrine
seed strings and the signal/bootstrap narrative advertised them. Fix
the seed + bootstrap text rather than alias a path nothing calls.
Verified:
curl https://connect.chitty.cc/api/v1/doctrine/seed | jq .api_endpoints
→ persist_memory + recall_memory now point to /api/intelligence/memory/*
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 17 minutes and 33 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 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 |
chittyconnect | be1f99b | Jun 03 2026, 05:20 AM |
There was a problem hiding this comment.
Pull request overview
Updates ChittyConnect’s public doctrine/bootstrap messaging to advertise the actual intelligence memory endpoints used by the MCP tool dispatcher, so clients don’t attempt to call non-existent /api/v1/memory/* routes.
Changes:
- Update
doctrine/seedapi_endpointsto pointpersist_memory/recall_memoryat/api/intelligence/memory/{persist,recall}. - Update
signal/bootstrapnarrative text to reference/api/intelligence/memory/persist. - Adjust
SVC_SCOREservice binding target inwrangler.jsonc(note: this is an infra change and should be explicitly reflected in PR scope/description).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
wrangler.jsonc |
Updates the SVC_SCORE service binding target (dev/staging/prod blocks). |
src/index.js |
Fixes advertised memory endpoint paths in doctrine/seed and signal/bootstrap. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| { "binding": "SVC_CHRONICLE", "service": "chittychronicle", "environment": "production" }, | ||
| // { "binding": "SVC_DISPUTE", "service": "chittydispute" }, // TODO: uncomment to use service-binding instead of HTTPS fetch to dispute.chitty.cc | ||
| { "binding": "SVC_SCORE", "service": "chittyscore", "environment": "production" }, | ||
| { "binding": "SVC_SCORE", "service": "chittyscore-worker" }, | ||
| { "binding": "SVC_STORAGE", "service": "chittystorage" } |
Summary
POST /api/v1/memory/{persist,recall}but no such routes exist./api/intelligence/memory/{persist,recall}(src/mcp/tool-dispatcher.js).Related: binding drift root cause (already fixed live, no code change here)
Deployed worker version
39c4427c(2026-06-03T04:58Z) had only Secrets Store secrets — no KV (API_KEYS), D1, R2, Vectorize, DO, AI, orSVC_*bindings. Cause: someone ranwrangler deploywithout--env production, deploying the top-level config (Secrets Store only) and clobbering prod. Same drift pattern as #207/#212.Why it keeps happening: GHA
Deploy ChittyConnecthas been failing since 2026-05-01 withSecrets store binding authorization failed [code: 10021]—CLOUDFLARE_API_TOKENlacks Secrets Store scope. Every deploy since has been manual, and manualwrangler deploywithout--env productionstrips prod silently.Redeployed
--env productionfromfix/all-svc-binding-drift(version0a0c3f84). All bindings restored. Authenticated routes return 401 (real auth) instead of 503 (binding missing).Follow-ups (separate issues recommended)
CLOUDFLARE_API_TOKENGH secret with Secrets Store scope so GHA deploy succeeds.wrangler deploywithout--envcannot clobber prod.Test plan
curl https://connect.chitty.cc/api/v1/doctrine/seed | jq .api_endpointsshows/api/intelligence/memory/*curl -H 'X-ChittyOS-API-Key: probe' https://connect.chitty.cc/api/intelligence/memory/recall→ 401 (not 503)status 503🤖 Generated with Claude Code