Bugfix/legacy facade dual state and v0.3.0 - #175
Conversation
…etup context
Add facadeSupersededBy tracking and installExplicitServerContext so mixing
legacy facades with setupCoreServer({ context }) throws instead of silent
dual-state. Keep client migration in resolveSetupContext.
Co-authored-by: Cursor <cursoragent@cursor.com>
…ings Update deprecation policy and MIGRATION anchors, bump to 0.3.0, move CHANGELOG Unreleased content, and add PINECONE_DEPRECATION_WARNINGS-gated warn helper. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Warning Review limit reached
More reviews will be available in 34 minutes and 8 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?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 credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. 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, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. 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 (17)
📝 WalkthroughWalkthroughThe PR implements the 0.3.0 release, introducing a ChangesLegacy Facade Supersession and 0.3.0 Release
Sequence Diagram(s)sequenceDiagram
participant Consumer
participant setupCoreServer
participant installExplicitServerContext
participant resolveDefaultServerContext
participant LegacyFacade as getPineconeClient
rect rgba(173, 216, 230, 0.5)
note over Consumer,LegacyFacade: Legacy-then-explicit-context path (new fail-fast behavior)
Consumer->>LegacyFacade: setPineconeClient(client)
LegacyFacade->>resolveDefaultServerContext: resolveDefaultServerContext()
resolveDefaultServerContext-->>LegacyFacade: default ctx (ok, facadeSupersededBy=null)
Consumer->>setupCoreServer: setupCoreServer({ context: isolatedCtx })
setupCoreServer->>installExplicitServerContext: installExplicitServerContext(isolatedCtx)
installExplicitServerContext->>installExplicitServerContext: set facadeSupersededBy = isolatedCtx
Consumer->>LegacyFacade: getPineconeClient()
LegacyFacade->>resolveDefaultServerContext: resolveDefaultServerContext()
resolveDefaultServerContext-->>LegacyFacade: throws LEGACY_FACADE_SUPERSEDED_MESSAGE
LegacyFacade-->>Consumer: Error (migration guidance)
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #175 +/- ##
=======================================
Coverage ? 87.77%
=======================================
Files ? 41
Lines ? 1710
Branches ? 552
=======================================
Hits ? 1501
Misses ? 209
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@coderabbitai full review |
✅ Action performedFull review finished. |
|
@coderabbitai, full review again. Don't skip |
|
✅ Action performedFull review finished. |
Summary
Fixes silent dual-state between legacy module facades and explicit
ServerContextsetup, and starts the legacy facade deprecation window on v0.3.0.#Issue 170: Dual-state fix
facadeSupersededBytracking andinstallExplicitServerContext()sosetupCoreServer({ context })/setupAllianceServer({ context })on a non-default context invalidates legacy facades.getDefaultServerContext()throws with migration guidance when facades are superseded (no silent divergence betweengetPineconeClient()andctx.getClient()).{ config }setup path stays inresolveSetupContext().resolveDefaultServerContext()for internal/setup paths so deprecation warnings are not duplicated.Issue 171: v0.3.0 deprecation publish
docs/deprecation-policy.md,docs/MIGRATION.md, and@deprecatedJSDoc across all 17 facade symbols.[Unreleased]CHANGELOG content into## [0.3.0].PINECONE_DEPRECATION_WARNINGS=1orDEBUGlog level (once per symbol).package.jsonto 0.3.0.Test plan
setPineconeClient()→setupCoreServer(config)→getPineconeClient()returns same client as default contextsetPineconeClient()→setupCoreServer({ context: isolatedCtx })→getPineconeClient()throws with migration guidancesetupAllianceServer({ context: isolatedCtx })→ legacy facade call throwscreateServer+setupCoreServer({ context })registers tools on passed contextteardownServer()after supersede restores legacy facade pathPINECONE_DEPRECATION_WARNINGS=1warns once per symbol; default env produces no warnnpm run cigreennpm run release:checkgreennpm run docs:link-checkgreenRelease (post-merge)
After merge to
main, create GitHub Releasev0.3.0to trigger npm publish via CI (seedocs/RELEASING.md).Related
Summary by CodeRabbit
Documentation
Bug Fixes
PINECONE_DEPRECATION_WARNINGSenvironment variable or debug logging).