fix(memory-core): emit one degraded sqlite-vec warning per manager#67898
Conversation
Greptile SummaryThis PR fixes repeated Confidence Score: 5/5Safe to merge — clean, well-scoped fix with no behavioral regressions and targeted test coverage for the changed warning policy. All changed logic is correct: the latch is initialised to false, set on first degraded write, preserved across no-op early exits, and reset in every DB-reopen path. The resetVectorState consolidation is behaviorally equivalent to the three inline blocks it replaces. No P0 or P1 issues found. No files require special attention. Reviews (2): Last reviewed commit: "fix(memory-core): reset degraded warning..." | Re-trigger Greptile |
|
@greptile-apps review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e8c2881a52
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
b659115 to
5f8e10a
Compare
obviyus
left a comment
There was a problem hiding this comment.
Verified the degraded sqlite-vec warning path in memory-core and confirmed the fix now dedupes repeated per-file warnings without reintroducing spam after safe reindex rollback.
Maintainer follow-up: reset the warning latch only on real vector-state resets, preserved it across safe-reindex rollback, and added the unreleased changelog entry for this user-facing logging fix.
Local gate: pnpm test extensions/memory-core/src/memory/manager-vector-warning.test.ts extensions/memory-core/src/memory/manager.readonly-recovery.test.ts. Rebased-head pnpm tsgo still fails in unrelated qa-lab aimock files inherited from origin/main, not in the touched memory-core surface.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5f8e10a8ee
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| state.vectorReady = null; | ||
| state.vector.available = null; | ||
| state.vector.loadError = undefined; | ||
| state.resetVectorState(); |
There was a problem hiding this comment.
Keep vector dims when readonly recovery lacks metadata
Switching readonly recovery to resetVectorState() clears vector.dims before readMeta() runs. If the reopened DB has a missing/corrupt meta row (so readMeta() returns undefined), we lose the last-known dimension and proceed with vector.dims unset; later ensureVectorTable only drops mismatched chunks_vec schemas when vector.dims is set, so an old-dimension table can survive and subsequent inserts fail after model/dimension changes. The previous code path preserved in-memory dims as a fallback in this exact recovery scenario.
Useful? React with 👍 / 👎.
…bencu) * Agents: dedupe bootstrap truncation warnings * Memory: dedupe sqlite-vec degradation warnings * Memory: align degraded vector warning * test(memory-core): remove stale vector warning arg * fix(memory-core): reset degraded warning on vector reset * fix(memory-core): preserve warning latch across reindex rollback * fix: dedupe degraded sqlite-vec warnings (openclaw#67898) (thanks @rubencu) --------- Co-authored-by: Ayaan Zaidi <hi@obviy.us>
…bencu) * Agents: dedupe bootstrap truncation warnings * Memory: dedupe sqlite-vec degradation warnings * Memory: align degraded vector warning * test(memory-core): remove stale vector warning arg * fix(memory-core): reset degraded warning on vector reset * fix(memory-core): preserve warning latch across reindex rollback * fix: dedupe degraded sqlite-vec warnings (openclaw#67898) (thanks @rubencu) --------- Co-authored-by: Ayaan Zaidi <hi@obviy.us>
…bencu) * Agents: dedupe bootstrap truncation warnings * Memory: dedupe sqlite-vec degradation warnings * Memory: align degraded vector warning * test(memory-core): remove stale vector warning arg * fix(memory-core): reset degraded warning on vector reset * fix(memory-core): preserve warning latch across reindex rollback * fix: dedupe degraded sqlite-vec warnings (openclaw#67898) (thanks @rubencu) --------- Co-authored-by: Ayaan Zaidi <hi@obviy.us>
…bencu) * Agents: dedupe bootstrap truncation warnings * Memory: dedupe sqlite-vec degradation warnings * Memory: align degraded vector warning * test(memory-core): remove stale vector warning arg * fix(memory-core): reset degraded warning on vector reset * fix(memory-core): preserve warning latch across reindex rollback * fix: dedupe degraded sqlite-vec warnings (openclaw#67898) (thanks @rubencu) --------- Co-authored-by: Ayaan Zaidi <hi@obviy.us>
…bencu) * Agents: dedupe bootstrap truncation warnings * Memory: dedupe sqlite-vec degradation warnings * Memory: align degraded vector warning * test(memory-core): remove stale vector warning arg * fix(memory-core): reset degraded warning on vector reset * fix(memory-core): preserve warning latch across reindex rollback * fix: dedupe degraded sqlite-vec warnings (openclaw#67898) (thanks @rubencu) --------- Co-authored-by: Ayaan Zaidi <hi@obviy.us>
…bencu) * Agents: dedupe bootstrap truncation warnings * Memory: dedupe sqlite-vec degradation warnings * Memory: align degraded vector warning * test(memory-core): remove stale vector warning arg * fix(memory-core): reset degraded warning on vector reset * fix(memory-core): preserve warning latch across reindex rollback * fix: dedupe degraded sqlite-vec warnings (openclaw#67898) (thanks @rubencu) --------- Co-authored-by: Ayaan Zaidi <hi@obviy.us>
…bencu) * Agents: dedupe bootstrap truncation warnings * Memory: dedupe sqlite-vec degradation warnings * Memory: align degraded vector warning * test(memory-core): remove stale vector warning arg * fix(memory-core): reset degraded warning on vector reset * fix(memory-core): preserve warning latch across reindex rollback * fix: dedupe degraded sqlite-vec warnings (openclaw#67898) (thanks @rubencu) --------- Co-authored-by: Ayaan Zaidi <hi@obviy.us>
Summary
sqlite-vecis unavailable, memory indexing can emit the same degraded-state warning repeatedly across many file writes in the same manager lifecycle.gateway:watchgets flooded with duplicate degraded-memory warnings, which makes it harder to spot the first failure and any unrelated follow-on errors.sqlite-vecis missing; it only fixes repeated warning emission.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause (if applicable)
Regression Test Plan (if applicable)
extensions/memory-core/src/memory/manager-vector-warning.test.tsUser-visible / Behavior Changes
When vector indexing is degraded because
sqlite-vecis unavailable, the gateway now logs that degraded state once per manager instead of repeating it for every file write.Diagram (if applicable)
Security Impact (required)
Yes, explain risk + mitigation:Repro + Verification
Environment
gateway:watchsqlite-vecunavailableSteps
sqlite-vecunavailable.Expected
Actual
Evidence
Human Verification (required)
gateway:watchverification with the same degraded sqlite-vec condition.Review Conversations
Compatibility / Migration
Risks and Mitigations