fix(memory): skip unhealthy query embeddings - #2128
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (14)
📝 WalkthroughWalkthroughWarm recall now uses a bounded per-Agent/provider/model query-embedding circuit breaker. Open circuits skip vector retrieval and use FTS. Half-open probes restore vector retrieval. Diagnostics, health contracts, lifecycle resets, tests, and documentation cover the behavior. ChangesMemory query-embedding circuit breaker
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant RetrievalService
participant ProviderGateway
participant MemoryDiagnosticsCollector
participant FTSRecall
RetrievalService->>ProviderGateway: Start query embedding with abort signal
ProviderGateway-->>RetrievalService: Return result or provider failure
RetrievalService->>MemoryDiagnosticsCollector: Record circuit event
RetrievalService->>FTSRecall: Use FTS candidates when circuit is open
RetrievalService->>ProviderGateway: Send one cooldown probe
ProviderGateway-->>RetrievalService: Return successful probe
RetrievalService->>MemoryDiagnosticsCollector: Record circuit closure
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 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 |
Summary
Fixes #2118 by adding bounded circuit-breaker behavior to Memory query embeddings.
When query embeddings repeatedly time out or fail, subsequent Memory recalls now skip the unhealthy vector path and immediately use the existing FTS fallback instead of paying the embedding deadline on every turn.
Changes
AbortError, and local capacity rejection from provider-health failures.embeddingCircuitOpenretrieval degradation cause.Validation
pnpm run test:memory— 888 tests passedpnpm run test:main— 6,622 tests passedpnpm run typecheckpnpm run lintpnpm run i18npnpm run format:checkSummary by CodeRabbit
New Features
Documentation
Tests