M25: expose provenance-aware knowledge statistics

This commit is contained in:
NuklearRabbit
2026-08-10 16:04:39 +02:00
parent 0935901f11
commit 90cc3cf378
22 changed files with 238 additions and 10 deletions
+18 -1
View File
@@ -14,7 +14,24 @@ These values are configurable.
## Source documents
The ten Markdown files under `knowledge/procedures/` are authoritative PoC sources. Keep their IDs, versions and effective dates as metadata.
The versioned Markdown files under `knowledge/procedures/` (currently eleven per supported
language) are the authoritative sources. Keep their IDs, versions and effective dates as
metadata.
## Index statistics and provenance
`GET /api/v1/knowledge/status` keeps three different measurements separate:
- `source_document_count`: authoritative procedure files available to Fleet Ops for the requested language;
- `reported_synced_document_count`, `reported_failed_document_count` and `last_sync_at`: the latest persisted result reported by the central n8n synchronization workflow;
- `document_count`: documents independently verified as indexed by the active provider.
The current RAGcore contract deliberately has no corpus-size or space-browse endpoint. For
the RAGcore provider, `document_count` therefore remains `null`; a successful upload report
is never relabelled as proof that indexing and publishing completed. The deterministic demo
provider can verify its in-memory corpus and reports `statistics_state=verified`. RAGcore
reports `sync_reported` only when a persisted workflow callback exists, otherwise
`not_reported`.
## Required adapter interface