Skip to content

fix(ai): the rag index keeps each project's chunks apart, deletes a removed file's points before forgetting it, and refills a project its collection lost - #2283

Merged
dan-petty merged 1 commit into
mainfrom
implement_issue_1388
Oct 26, 2026
Merged

dan-petty merged 1 commit into
mainfrom
implement_issue_1388

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Summary

Fix RAG indexing multi-project isolation, waited deletes, and point refill.

Closes #1388

Changes

  • Chunk IDs use deterministic uuid.uuid5 over project name, file path, and line range so chunk IDs do not collide across projects.
  • Vector deletes wait for completion and raise QdrantClientError before cache updates.
  • Added delete_points_by_project on QdrantClient for scoped project deletion.
  • Stored exact project point counts in index_counts.json to detect wiped points.
  • Refilled project index when collection points are lost.
  • Ensured collections define payload indexes for project_name (is_tenant=True) and file_path upfront.

Fail-to-Pass Verification

Verified with devops ci fail-to-pass --base origin/main:

14 failed on base (14 failed and 29 passed in tests/test_rag_indexer_retriever.py, tests/test_rag_kb_sync.py, tests/test_rag_multi_project_indexer.py, tests/test_rag_qdrant.py; 0 errored).

…emoved file's points before forgetting it, and refills a project its collection lost

The rag index previously mixed points across projects because chunk IDs
hashed only file path and line numbers without project scope. It also
executed deletes without waiting and removed cache entries prematurely,
leaving orphan vectors in Qdrant collections. Empty collections went
undetected on subsequent runs when local cache entries were present.

Isolate vectors across projects and guarantee index consistency:
- Generate chunk IDs using uuid.uuid5 over project name, file path, and lines.
- Wait for delete operations in Qdrant and propagate errors before cache updates.
- Track exact project point counts in index_counts.json to detect missing points.
- Refill project points and clear project cache when collection points are lost.
- Ensure collections define payload indexes for project_name and file_path.

Closes #1388
@dan-petty
dan-petty marked this pull request as ready for review October 26, 2026 03:48
@dan-petty
dan-petty merged commit ad7c38b into main Oct 26, 2026
17 checks passed
@dan-petty
dan-petty deleted the implement_issue_1388 branch October 26, 2026 03:50
dan-petty pushed a commit that referenced this pull request Oct 26, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.6.1](v0.6.0...v0.6.1)
(2026-10-26)


### Bug Fixes

* **ai:** the rag index keeps each project's chunks apart, deletes a
removed file's points before forgetting it, and refills a project its
collection lost
([#2283](#2283))
([ad7c38b](ad7c38b))
* **cli:** repos sync and branches sync report a failed fetch or pull
instead of printing success
([#2276](#2276))
([bf72be1](bf72be1))
* **github:** pace GraphQL porcelain commands against graphql quota
([#2280](#2280))
([7f1145a](7f1145a)),
closes [#1415](#1415)
* **roadmap:** intake keeps the fields a person set on a card added
during its planning
([#2278](#2278))
([21654c6](21654c6))
* **roadmap:** intake leaves the sub-issues of a candidate's source out
of the duplicate check
([#2275](#2275))
([214028c](214028c))
* **telemetry:** wait for abandoned dispatch workers before a test ends
([#2282](#2282))
([51e8e61](51e8e61))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
dan-petty added a commit that referenced this pull request Oct 26, 2026
…k on main (#2284)

`uv check` took the newest `ty` in its default range each time it ran.
When `ty` v0.0.92 came out, it flagged a `redundant-cast` warning and
failed `main` with no change in the repository.

This change pins `ty==0.0.92` in the `dev` dependency group and locks it
in `uv.lock`. `uv check` then uses the exact version in `uv.lock`, as
`ruff`, `mypy`, `bandit` and `zizmor` already do. A new `ty` release now
reaches `main` only in a pull request that raises the pin and shows its
diagnostics.

It also adds:

- a test that the `dev` group pins `ty` and that `uv.lock` holds the
same version;
- a `ty` row in the knowledge-base table of pinned tools.

The redundant `cast` needs no edit here, because #2283 already replaced
it.

Closes #2281

Change: `openspec/changes/archive/2026-10-26-2281-pin-ty-for-uv-check/`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant