Repository navigation
Closed
Labels
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/aiAI review pipeline, personas, prompts, LLM client, or RAGtype/bugType bug: the code does not do what it must
Milestone
Description
Problem
- Nothing runs KB ingestion.
devops ai rag index-kbexists [code: commands/rag.py:218], but no command, schedule or hook runs it (R2). - The collections have been empty since 2026-09-30. A search wiped them that day, nothing has been upserted since, and 2,084/2,084 searches in the loop returned nothing [measured: loop §3; u-reference].
- Drift cannot see the wipe.
rag drift --auto-synccompares workspace files against the local index cache, not Qdrant [code: ai/rag/drift.py:205-213], so a wiped collection under an intact cache reads as no drift. rag statusshows vector size 0 [code: commands/rag.py:453-455].- No collection records which KB it holds, so an upgraded KB is never re-indexed.
Acceptance criteria
- The collection records what it holds. KB points carry the installed KB's digest (sha256 over sorted relative paths and contents), alongside fix(ai): a rag collection records its embedding model, a mismatch fails instead of wiping the collection, and ranking keeps the cosine score #1066's
embedding_model. - The KB is rebuilt on use.
- On the first RAG use in a process (chat lookup,
rag query, the MCP RAG tools), the KB is re-indexed before the lookup, with one progress line, when either:- the collection holds no KB points; or
- its recorded digest differs from the installed one.
- After a failure it is tried again at most once per 30 minutes, and the failure is printed once.
- On the first RAG use in a process (chat lookup,
- Drift reads Qdrant.
rag driftcompares per-project Qdrant point counts and the KB digest, not only the cache. A fake-client test of a wiped collection under an intact cache reports drift. - Status says what is indexed.
rag statusshows, per collection: points, embedding model, dimension, KB digest and last index time. - A
devops_cli_rag_pointsgauge is emitted on use (fix(telemetry): the project velocity dashboard reads the latest snapshot of each gauge, and the project gauges drop the _total suffix #974). - (person-run) After an upgrade:
rag statusshows KB points at the installed digest;- a
devops ai chatquestion about PEP 758 cites the KB topic manual.
- Tests run offline with fakes and recorded tool output: no network, no real scanner, no model; each test under 1 s.
-
changelog.d/<n>.mdrecords the change;CHANGELOG.mdanddocs/ROADMAP.mdare not edited. -
uv run devops cipasses.
Key questions
- Why on use, not a schedule? (proposed) It is the project's pattern for side effects (fix(telemetry): the project velocity dashboard reads the latest snapshot of each gauge, and the project gauges drop the _total suffix #974), and there is no scheduler to maintain.
- Embedding failures mid-index? (proposed) fix(ai): a failing embedding model pauses rag lookups instead of ending rag for the run, and each embedding model gets its own prompts, cache keys, dimension and bounded chunks #1065's breaker pauses the index, and the next use resumes it (fix(ai): a failing embedding model pauses rag lookups instead of ending rag for the run, and each embedding model gets its own prompts, cache keys, dimension and bounded chunks #1065's resumable batches).
- Does the review use this index? (proposed) No. feat(ai): knowledge-base manuals state the tool, language and dependency versions they apply to, and reviews ground explanations in the manuals that match the reviewed project #1149 gives reviews the KB's manuals by key and version, and Q15 in feat(review): evidence-first code review — tools find, version-pinned facts ground, models explain and plan, fixes are re-checked #1137 decides.
Strategic alignment
- Milestone: none; the roadmap tooling places it. Depends on: fix(ai): a rag collection records its embedding model, a mismatch fails instead of wiping the collection, and ranking keeps the cosine score #1066. Related: fix(ai): a failing embedding model pauses rag lookups instead of ending rag for the run, and each embedding model gets its own prompts, cache keys, dimension and bounded chunks #1065, feat(ai): embeddings through the llm gateway, with embedding model evaluation #481, fix(ai): the knowledge base names only commands, options and components that exist #920.
- Parent: feat(review): evidence-first code review — tools find, version-pinned facts ground, models explain and plan, fixes are re-checked #1137 (phase P0).
- Evidence tags ([measured: …], [code: path:line], [sourced: …], [estimate], [inference]; "S11" is the single review run of 2026-10-03 and "the loop" the ten runs S12–S21; c-feasibility and c-fidelity are the two design critiques) are explained in feat(review): evidence-first code review — tools find, version-pinned facts ground, models explain and plan, fixes are re-checked #1137.
Update 2026-10-08: refinement
rag index already indexes the KB as devops-cli-kb (commands/rag.py:115-121); the missing part is the trigger and comparison. The collections are no longer empty (#1388), but drift reads only the local cache (ai/rag/drift.py:213). Whichever of #1388 and this item lands second reuses the other's count read.
Metadata
Metadata
Assignees
Labels
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/aiAI review pipeline, personas, prompts, LLM client, or RAGtype/bugType bug: the code does not do what it must
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty-bot commentedon Oct 10, 2026
Moved to v0.2.34: v0.2.34 started with fewer than its 16 items and was topped up to 16 from Ready items, critical fixes and P0 features first. (devops roadmap reprioritize)
fix(ai): reindex knowledge base on drift and inspect qdrant store (#1139
dan-petty commentedon Oct 11, 2026
Merged
feat(release): v0.2.34 (#1566)