fix: Vector namespaces must not contain slashes (Fixes BATTLE-MAGE-4) - #142
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 35 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
✨ 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 |
PR Summary by QodoFix Upstash Vector namespaces to be slash-free via shared {owner}_{repo} prefix
AI Description
Diagram
High-Level Assessment
Files changed (6)
|
Per PR #142 review: Upstash creds without GITHUB_OWNER/GITHUB_REPO would derive a shared undefined_undefined:* namespace and silently contaminate retrieval. Missing identity now degrades through the existing vector_unavailable path like missing creds. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The Upstash Vector REST client inserts the namespace into the URL path
verbatim, so the {owner}/{repo} prefix in kbNamespace/docsNamespace/
srcNamespace split the route and 404'd every vector operation in
production (first surfaced by the code-index tick's upsert; KB and doc
embedding were silently degrading the same way). Reproduced against the
live index: slash → 'Endpoint not found', underscore → ok.
Prefix is now {owner}_{repo} via a shared helper; a regression test
pins that no namespace builder can ever emit a slash. Nothing was
successfully written under the slashed namespaces, so there is no
migration — the fixed namespaces populate fresh on the next ticks.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Per PR #142 review: Upstash creds without GITHUB_OWNER/GITHUB_REPO would derive a shared undefined_undefined:* namespace and silently contaminate retrieval. Missing identity now degrades through the existing vector_unavailable path like missing creds. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
97cb35e to
0077a8e
Compare
Summary
Production bug caught by Sentry on the first live code-index cron tick (BATTLE-MAGE-4): every Upstash Vector operation was 404ing because our namespaces embed
{owner}/{repo}and the SDK inserts the namespace into the REST path verbatim —POST /upsert-data/wealthbot-io/webo:srcroutes as endpoint/upsert-data/wealthbot-io+ stray segment →Endpoint not found.Blast radius: all three semantic arms — KB entry embedding, doc-chunk embedding, and the new code index — have been silently degrading to lexical-only in production since #134 deployed (each path is non-throwing by design, which is why only the cron tick surfaced it via Sentry). The provisioning-time round-trip verification passed because its scratch namespace had no slash.
Reproduced against the live index before fixing: slash namespace → the exact 404; underscore → works.
Fix
namespacePrefix()={owner}_{repo}; all three builders use it./.TDD: namespace pins flipped + regression test confirmed RED against the old builders, then the fix. Full suite 943 passing, typecheck clean.
Fixes BATTLE-MAGE-4 (Sentry)
🤖 Generated with Claude Code