Skip to content

fix(ai): show the newest index time in rag status - #6801

Merged
dan-petty merged 4 commits into
mainfrom
fix/6774-rag-status-newest-index
Nov 22, 2026
Merged

dan-petty merged 4 commits into
mainfrom
fix/6774-rag-status-newest-index

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The "Last Indexed" column of devops ai rag status now shows the
indexed_at time of the newest point of each collection. Before, it
showed the time of the first point of a scroll with no order. Qdrant
returns those points in the order of their IDs, and an index run writes
only the chunks that changed, so the first point could come from any
older run.

Status reads the time from a scroll of one point that Qdrant orders by
indexed_at, the newest first. scroll_points of QdrantProtocol,
QdrantClient and the test fake takes order_by and descending.
Qdrant refuses an order on a field with no range index, so
CONST_RAG_PAYLOAD_INDEXES gets a datetime index of indexed_at, and
_ensure_payload_indexes creates each index with the field_schema of
its entry. Each devops ai rag index run creates the new index on a
collection that does not have it, and embeds no file again for it. Until
that run, "Last Indexed" shows —. Status writes nothing to the store.

Closes #6774

Change: openspec/changes/archive/2026-11-22-6774-rag-status-newest-index/

@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/ai AI review pipeline, personas, prompts, LLM client, or RAG labels Nov 22, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Build notes for #6774 (not part of the squash message).

Evidence of the cause (read-only, 2026-11-22, Qdrant server 1.20.2, qdrant-client 1.20.0):

  • devops ai rag status showed Last Indexed 2026-11-22 04:26:15 (devops_code) and 04:43:12 (devops_docs).
  • The payload schema of both collections holds only file_path, project_name and visibility.
  • A scroll with order_by=OrderBy(key="indexed_at", direction="desc") got HTTP 400: "No range index for order_by key: indexed_at. Please create one to use order_by."
  • No reindex and no index creation ran against the store.

Fail-to-pass: uv run devops ci fail-to-pass --base origin/main gives 5 changed tests that fail on base: the two status tests in tests/ai/rag/test_knowledge_base_sync.py, the two index setup tests in tests/ai/rag/test_qdrant_collection_setup.py, and the native case of test_a_scroll_ordered_by_indexed_at_gives_the_newest_point_first.

Owner review points:

  • After the merge, Last Indexed shows — until the next devops ai rag index run creates the datetime index of indexed_at on devops_code and devops_docs. That run builds the index over the stored points and embeds no file again for it.
  • Status catches DevOpsCLIError from the ordered scroll, logs it at debug and shows —. It does not fall back to the first point, because that is the wrong time of the issue.
  • Pending a person: review the diff in tuicr (tuicr -r origin/main..HEAD).

Last Indexed of devops ai rag status comes from a scroll of one point
that Qdrant orders by indexed_at, the newest first. Each collection gets
a datetime payload index of indexed_at, the range index that the order
needs.
@dan-petty
dan-petty force-pushed the fix/6774-rag-status-newest-index branch from ecc843b to a1fe58b Compare November 22, 2026 22:39
@dan-petty
dan-petty marked this pull request as ready for review November 22, 2026 22:53
@dan-petty
dan-petty merged commit 1193d4c into main Nov 22, 2026
28 checks passed
@dan-petty
dan-petty deleted the fix/6774-rag-status-newest-index branch November 22, 2026 22:53
dan-petty pushed a commit that referenced this pull request Nov 22, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.195.4](v0.195.3...v0.195.4)
(2026-11-22)


### Bug Fixes

* **ai:** show the newest index time in rag status
([#6801](#6801))
([1193d4c](1193d4c))
* **pr:** judge the branch and path filters of pull request workflows
([#6803](#6803))
([24cc5fe](24cc5fe)),
closes [#5408](#5408)

---
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/ai AI review pipeline, personas, prompts, LLM client, or RAG type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ai): show the newest index time in rag status

1 participant