Skip to content

fix(ai): reindex knowledge base on drift and inspect qdrant store (#1139) - #1554

Merged
dan-petty merged 1 commit into
release/v0.2.34from
fix/1139-reindex-knowledge-base-on-drift
Oct 11, 2026
Merged

dan-petty merged 1 commit into
release/v0.2.34from
fix/1139-reindex-knowledge-base-on-drift

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Summary

Fixes #1139.

Reindexes the bundled knowledge base whenever the installed knowledge base differs from what its collection holds, and updates RAG status and drift to inspect Qdrant directly rather than relying only on the local filesystem cache.

Key Changes

  • Collection Self-Description: Points in Qdrant store `embedding_model`, `kb_digest`, and `indexed_at` in chunk payload.
  • Knowledge Base Sync on Use: Added `ensure_knowledge_base_ready` to rebuild missing or outdated KB collections on first RAG use (chat context lookup, CLI `rag query`, MCP `rag_search`) with progress messaging and 30-minute failure cooldown.
  • Drift Inspection: Updated `rag drift` to query Qdrant collection point counts and verify stored `kb_digest` against the active installation, catching wiped or drifted collections.
  • RAG Status: Updated `rag status` to display points, embedding model, dimension, KB digest, and last index time from Qdrant metadata.
  • Telemetry: Registered and emitted `devops_cli_rag_points` gauge on collection access.
  • Testing: Added unit test suite in `tests/test_rag_kb_sync.py` running offline with fakes under 1s each.

Quality Gate Verification

  • Passed `uv run devops ci` locally with 100% passing status across all checks.
  • Passed pre-commit and pre-push hooks.

)

- Record installed knowledge base digest, embedding model, and timestamp on Qdrant points
- Rebuild knowledge base on first RAG use if points missing or digest differs, with 30m failure cooldown
- Update rag drift to inspect per-project Qdrant points and KB digest drift
- Update rag status to display points, embedding model, dimension, KB digest, and last index time
- Register and emit devops_cli_rag_points telemetry gauge
- Add test suite in tests/test_rag_kb_sync.py
@dan-petty dan-petty added this to the v0.2.34 milestone Oct 11, 2026
@dan-petty
dan-petty merged commit 345ea02 into release/v0.2.34 Oct 11, 2026
11 checks passed
@dan-petty
dan-petty deleted the fix/1139-reindex-knowledge-base-on-drift branch October 11, 2026 01:28
dan-petty added a commit that referenced this pull request Oct 11, 2026
* feat(ai): clean unread syntopical and cognitive research settings (#273) (#1551)

* chore(ai): remove the code, config and policies left over from the removed vLLM deployments (#820) (#1552)

* feat(ai): agentic information foraging & scent trails (#274) (#1553)

* fix(ai): reindex knowledge base on drift and inspect qdrant store (#1139) (#1554)

- Record installed knowledge base digest, embedding model, and timestamp on Qdrant points
- Rebuild knowledge base on first RAG use if points missing or digest differs, with 30m failure cooldown
- Update rag drift to inspect per-project Qdrant points and KB digest drift
- Update rag status to display points, embedding model, dimension, KB digest, and last index time
- Register and emit devops_cli_rag_points telemetry gauge
- Add test suite in tests/test_rag_kb_sync.py

* feat(docker): container commands find Podman engine and rootless sandboxes write workspace (#1117) (#1555)

- Resolve engine endpoints in precedence order: CONTAINER_HOST, DOCKER_HOST, DOCKER_CONTEXT, currentContext, rootless Podman, rootful Podman (with R/W check), Docker default
- Raise configuration error naming CONTAINER_HOST if CONTAINER_CONNECTION is set
- Guide user to set CONTAINER_HOST/DOCKER_HOST or run systemctl --user enable --now podman.socket on default dial failure
- Introspect engine facts (kind, is_rootless, security_options) with memoization
- Map sandbox container user to 0:0 on rootless engines so workloads can write mounted workspaces
- Drop uncalculated first stats frame and compute CPU deltas from second frame
- Inform user and exit 1 on devops docker cache for Podman without calling prune_builds or df
- Poll get_engine().ping() in _wait_for_docker_daemon without subprocess
- Propagate DOCKER_HOST to Dive and allow XDG_RUNTIME_DIR in Cosign
- Remove DEFAULT_CONTAINER_ENGINE and BIN_DOCKER constants
- Add documentation in cheatsheets and knowledge base, and changelog fragment

* fix(k8s): remove monitoring Service aliases and direct consumers to Helm chart Services (#1104) (#1556)

* fix(ai): a rag collection records its embedding model, a mismatch fails instead of wiping the collection, and ranking keeps the cosine score (#1066) (#1557)

* fix(ai): a rag collection records its embedding model, a mismatch fails instead of wiping the collection, and ranking keeps the cosine score (#1066)

* fix(ai): isolate search verified model cache per instance and test run

* feat(cli): worktree inventory & safe orphan reclamation (devops repos worktrees) (#700) (#1558)

* fix(k8s): tunnel sync and url setup preserve existing routes, catch-all, and remote URLs (#794) (#1559)

* fix(ai): a partial pricing snapshot replaces the whole catalog and never expires (#793) (#1560)

* feat(github): defect prs carry their hardening readiness blocker and post-merge audit (#697) (#1561)

* refactor(review): delete the legacy segment engine and the whole-file reviewer (#995) (#1564)

* chore(service): hold the roadmap service at 0 replicas while its machine account is suspended (#1562) (#1563)

GitHub suspended the Service's machine account. The deployment asks for
0 replicas so an Argo CD sync or deploy-stack cannot start it again, and
AGENTS.md and k8s/README.md tell people and agents not to scale, restart
or re-push secrets for it, and to leave its blocked items alone.

Closes #1562


Claude-Session: https://claude.ai/code/session_01S4n2mumzbvufbjZbXcX5JV

Co-authored-by: Claude <[email protected]>

* docs(agents): AGENTS.md fits a context budget and Claude Code loads it (#841) (#1565)

* feat(release): v0.2.34

---------

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant