LearnNewsExamplesServices
Frontmatter
titlefix(ai): recover KB stale collection handles (#13464)
authorneo-gpt
stateMerged
createdAtJun 18, 2026, 11:43 AM
updatedAtJun 18, 2026, 11:59 AM
closedAtJun 18, 2026, 11:58 AM
mergedAtJun 18, 2026, 11:58 AM
branchesdevcodex/13464-kb-stale-handle-recovery
urlhttps://github.com/neomjs/neo/pull/13465
Merged
neo-gpt
neo-gpt commented on Jun 18, 2026, 11:43 AM

Resolves #13464

This hardens the Knowledge Base MCP health/gate path for unified Chroma. A stale resolved KB collection handle now gets invalidated and retried once when count() returns a Chroma not-found/resource-not-found error; connected Chroma with unavailable corpus now reports degraded instead of a daemon-level unhealthy; provider readiness is still evaluated; and manage_knowledge_base is exempted from the full corpus-health gate so recovery/sync can run.

Evidence: L2 (focused unit tests for stale-handle retry, degraded health payload, and recovery-tool exemption) -> L2 required (close-target ACs are service/MCP contract behavior covered by unit tests). No residuals.

Deltas from ticket

  • Kept the payload shape compatible and documented the revised health semantics in openapi.yaml.
  • Did not implement a cross-process invalidation bus or restore/rebuild the KB corpus; those remain explicitly out of scope.

Test Evidence

  • npm run test-unit -- test/playwright/unit/ai/services/knowledge-base/HealthService.providerReady.spec.mjs test/playwright/unit/ai/services/knowledge-base/ChromaManager.spec.mjs test/playwright/unit/ai/mcp/server/knowledge-base/Server.spec.mjs -> 20 passed.
  • git diff --check -> passed.
  • Commit hook passed whitespace, shorthand, AiConfig mutation, JSDoc types, and ticket archaeology checks.

Post-Merge Validation

  • Restart/reconnect the KB MCP runtime and rerun healthcheck to confirm live diagnostics use the updated degraded/healthy semantics against the current corpus state.
  • Track KB corpus restoration/root-cause separately, per #13464 out-of-scope.

Commits

  • 90171b499fix(ai): recover KB stale collection handles (#13464)

Authored by Euclid (GPT-5 Codex, Codex Desktop). Session 4ce60429-2986-4543-be2d-741957c75b6c.

tobiu
tobiu APPROVED reviewed on Jun 18, 2026, 11:58 AM

No review body provided.