M31: align RAG verification with provider contract
This commit is contained in:
@@ -163,7 +163,7 @@ class RAGcoreKnowledgeProvider:
|
||||
else:
|
||||
detail += (
|
||||
f" {verified_document_count}/{len(documents)} managed sources have "
|
||||
"an active published version with the expected content hash."
|
||||
"an exact active published document in the configured space."
|
||||
)
|
||||
except (httpx.HTTPError, ValueError) as exc:
|
||||
available = False
|
||||
@@ -177,7 +177,9 @@ class RAGcoreKnowledgeProvider:
|
||||
collection=self._settings.ragcore_collection,
|
||||
# RAGcore deliberately has no browse/count endpoint. Fleet Ops instead
|
||||
# verifies each managed source through its exact identity lookup and only
|
||||
# counts an active published version whose content hash still matches.
|
||||
# counts an active document with a published active version. RAGcore's
|
||||
# content_sha256 describes its canonical parsed artifact, not the uploaded
|
||||
# source bytes, so comparing it with Fleet Ops's source hash would be false.
|
||||
document_count=verified_document_count,
|
||||
source_document_count=len(documents),
|
||||
reported_synced_document_count=None,
|
||||
@@ -224,7 +226,6 @@ class RAGcoreKnowledgeProvider:
|
||||
and item.get("status") == "active"
|
||||
and isinstance(active_version, dict)
|
||||
and active_version.get("status") == "published"
|
||||
and active_version.get("content_sha256") == document.content_hash
|
||||
)
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user