fix(memory): prevent vector store corruption hangs - #1962
Conversation
…e-corruption-hang
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (25)
📝 WalkthroughWalkthroughThe PR bounds memory injection and vector-store operations, adds health-aware lease and quarantine handling, propagates retrieval degradation causes, and introduces watchdogs for pre-stream steps and provider-boundary transitions. Tests and the issue specification are updated for the new timeout, cancellation, teardown, and observability behavior. ChangesMemory reliability and streaming control
Sequence Diagram(s)sequenceDiagram
participant AgentRuntimePresenter
participant MemoryRuntimeCoordinator
participant RetrievalService
participant VectorStoreManager
participant VectorStore
participant Provider
AgentRuntimePresenter->>MemoryRuntimeCoordinator: build bounded memory injection
MemoryRuntimeCoordinator->>RetrievalService: retrieve with signal and degradation collector
RetrievalService->>VectorStoreManager: query vector store
VectorStoreManager->>VectorStore: execute query under deadline
VectorStoreManager-->>RetrievalService: results or typed timeout
RetrievalService-->>MemoryRuntimeCoordinator: injection and degradation metadata
MemoryRuntimeCoordinator-->>AgentRuntimePresenter: prompt or timeout fallback
AgentRuntimePresenter->>Provider: cross pre-stream boundary
Provider-->>AgentRuntimePresenter: begin streaming
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
Prevent corrupted, wedged, or slow DuckDB vector stores from blocking message delivery, memory injection, cleanup, or application shutdown. Vector failures now degrade safely to FTS while preserving data unless corruption is confirmed.
Summary by CodeRabbit
New Features
Bug Fixes
Tests