Repository navigation
Description
Split from #3917.
Problem The knowledge base is in Qdrant two times: the tree ingest and the devops-cli-kb project. The tree copy is the one source after #3917. The devops-cli-kb project keeps a second copy that no reader updates. ## Why this part is deferred The purge is a live change on the cluster. It needs a reachable Qdrant and a person who runs it. #3917 changes the repository only. ## Acceptance criteria - The AI ingest status shows no project named devops-cli-kb. - The knowledge base is in Qdrant once, from the tree ingest. - A live search of the knowledge base returns no result from the devops-cli-kb project. - The purge is recorded in the comment of this issue.
Proposed design
Problem statement
Run the live purge after #3917 merges, with the Qdrant URL and API key. The live devops_docs collection still holds points for the project devops-cli-kb. No reader updates these points. This issue deletes them and records the result in a comment.
Acceptance criteria
Requirement: Purge the stale project points
After #3917 merges, a person SHALL delete every point whose payload project_name is devops-cli-kb from the live devops_docs collection.
Scenario: The filtered count is zero after the purge
- WHEN A person sends
POST $QDRANT_URL/collections/devops_docs/points/deletewith the body{"filter":{"must":[{"key":"project_name","match":{"value":"devops-cli-kb"}}]}}and theapi-keyheader, and then sends the same filter toPOST $QDRANT_URL/collections/devops_docs/points/count. - THEN The count endpoint returns
{"count":0}.
Requirement: The retrieval does not recreate the stale project
After the purge, the retrieval path MUST NOT write a point whose payload project_name is devops-cli-kb.
Scenario: A live retrieval leaves the filtered count at zero
- WHEN A person runs one live knowledge-base retrieval through the
devops ai ragcommand group, and then sends thedevops-cli-kbfilter toPOST $QDRANT_URL/collections/devops_docs/points/count. - THEN The count endpoint returns
{"count":0}.
Requirement: Pending a person after the merge
A person SHALL record the purge in a comment on this issue after the filtered count shows 0.
Scenario: The issue holds the purge record
- WHEN A person reads the comments of this issue after the purge.
- THEN One comment gives the date of the purge and the filtered count of 0.
Existing Tool Considered
No alternatives check has run. The open, maintained qdrant-client library covers the need. src/devops_cli/ai/rag/qdrant.py wraps it, and QdrantClient.delete_points_by_project sends a points delete with a project_name filter. It lacks a devops CLI subcommand for a one-off live delete. A person sends the documented POST /collections/devops_docs/points/delete request with the cluster URL and API key, or calls the existing wrapper once. The change builds no code, so it has no build cost in tokens or time.
Key questions
- Does the
devops-cli-kbproject live in its own collection or in a payload field?: It is a payload value in thedevops_docscollection.CONST_RAG_KB_PROJECTholds the stringdevops-cli-kb, and the indexer writes it topayload["project_name"]. The purge filters points byproject_name, not by a collection. [sources: src/devops_cli/config/constants.py:3146, src/devops_cli/ai/rag/indexer.py, src/devops_cli/ai/rag/qdrant.py] - Which command shows the projects of the knowledge base?: The cited modules do not show a command that lists the projects of the knowledge base. A project-level read is a points count with a
project_namefilter. This proposal uses that count. [sources: src/devops_cli/commands/rag.py, src/devops_cli/commands/ai.py, src/devops_cli/ai/rag/qdrant.py] - Does the purge alone remove the duplicate for good?: No. The retrieval path calls
ensure_knowledge_base_readybefore the search, and that function can write the knowledge base project again. refactor(ai): drop the knowledge base copies of project docs #3917 must remove that write path first. This issue then waits for refactor(ai): drop the knowledge base copies of project docs #3917 and purges the stale points. [sources: src/devops_cli/ai/rag/kb_sync.py:155, src/devops_cli/commands/rag.py, src/devops_cli/commands/ai.py, src/devops_cli/ai/tools/builtin_tools.py] - Which tool performs the purge?: The
qdrant-clientlibrary through the wrapper atsrc/devops_cli/ai/rag/qdrant.pycovers the delete with aproject_namefilter. A person runs one live call with the cluster URL and the API key. The change adds no dependency and no code. (best practice) [sources: src/devops_cli/ai/rag/qdrant.py, AGENTS.md]- Chosen: Qdrant points delete with a
project_namefilter.qdrant-clientis already a dependency, andQdrantClient.delete_points_by_projectsends the documented delete. It is one live call. - Rejected: A new
devops ai rag purgecommand. It adds a command and tests for a one-time live delete. AGENTS.md rule 3 puts an open tool before code that the project builds and keeps. - Rejected: Drop and rebuild the
devops_docscollection. It deletes the tree-ingest points too and needs a full re-embed, which costs time and tokens for no gain. - Rejected: Keep the
devops-cli-kbpoints and stop the readers. The duplicate stays, and a reader can return a stale result.
- Chosen: Qdrant points delete with a
- What is the scope of this issue?: Only the live purge and its record in a comment. refactor(ai): drop the knowledge base copies of project docs #3917 changes the repository so the tree ingest is the only writer. This issue then deletes the stale points and records the date and the count. This issue changes no repository code. (best practice) [sources: src/devops_cli/ai/rag/kb_sync.py:155, src/devops_cli/ai/rag/indexer.py]
- Chosen: Live purge only, after refactor(ai): drop the knowledge base copies of project docs #3917. The body defers the live purge, and refactor(ai): drop the knowledge base copies of project docs #3917 changes the repository only.
- Rejected: Remove the knowledge base write path in this issue. It duplicates refactor(ai): drop the knowledge base copies of project docs #3917 and adds repository code to a live operation.
Fit
Fits in one pull request.
Suspected block
A person must run the live purge with the Qdrant URL and API key after #3917 merges.
Activity
devops-cli-service commentedon Nov 21, 2026
Both remove the duplicate devops-cli-kb copy, but #3917 deletes repository files while the candidate purges the Qdrant collection.devops-cli-service commentedon Nov 22, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.
devops-cli-service commentedon Nov 25, 2026
Owner question: See Suspected block in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 27, 2026
Owner question: See Suspected block and Watched files in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 27, 2026
Owner question: See Suspected block and Watched files in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 29, 2026
Owner question: See Suspected block and Watched files in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Dec 1, 2026
Owner question: See Suspected block in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence