You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(kb): the stats endpoint reports one collection as total_documents — 359 of 18,341 vectors, 2% of the store #17626
359 is autobot_memory alone. The endpoint names its fields total_documents, total_chunks and total_vectors and answers for one of at least three populated
collections. The store holds 18,341 vectors; the endpoint reports 2% of them.
categories: ["round-trip-17527"] is the same shape one level down: that is the only
category among the facts, and it was created minutes earlier by a test probe. An
operator reading it concludes the knowledge base contains one test category.
Why it matters more than a wrong number
It is the instrument an operator and an agent both reach for first. I read it, and
reported to my user that the knowledge base held no AutoBot documentation — while
6,741 documentation chunks sat in autobot_docs. The conclusion was wrong, it was
confidently stated, and the endpoint's field names are why: total_documents does not
say "documents in one of the collections".
That is the recurring defect family in this repository: a plausible number answering a
narrower question than its name implies, with nothing signalling the narrowing.
Acceptance criteria
The endpoint reports the whole store, or names what it is reporting on. A field
called total_documents that covers one collection is the defect; the same
number under memory_collection_documents is not.
Per-collection counts are available, so a collection that exists and is empty is
distinguishable from one that is not reported.
categories states its scope — facts, or the whole store.
A test asserts the reported total against the sum of the collections it claims to
cover, so the two cannot drift.
Related
#17625 (the retrieval path queries only the collection this endpoint reports, which is
why one defect hid the other). #12733 (facts and vectors disagreeing, from the other
direction).
Related sighting, from read-only host evidence on a local install at maind8cbd91925 (2026-11-21). GET /api/knowledge_base/stats reports total_facts511, while GET /api/knowledge_base/facts/by_category pages through 978 facts (total_count 978). This is a facts count, not a vector count, so it may be a second counter with the same kind of fault. It is recorded here rather than as a new issue until someone confirms whether it shares the root.
Activity
github-actions commentedon Nov 2, 2026
needs-structure: this issue is missing:M<n> - ...:v0.9.6 - knowledge baseis not a goal milestonephase:M<n>.<k>label whose<n>matches the goal milestone: found noneThe label clears on the next issue event once all three are present (#19522).
mrveiss commentedon Nov 21, 2026
Related sighting, from read-only host evidence on a local install at
maind8cbd91925(2026-11-21).GET /api/knowledge_base/statsreportstotal_facts511, whileGET /api/knowledge_base/facts/by_categorypages through 978 facts (total_count 978). This is a facts count, not a vector count, so it may be a second counter with the same kind of fault. It is recorded here rather than as a new issue until someone confirms whether it shares the root.