WIP Phase 4 ingestion: platform guides, exclusion gate, gitea/vault/graph harvest, payload provenance

This commit is contained in:
Paperclip Builder
2026-10-26 22:26:45 +11:00
parent 5c0622c1b1
commit 1e46ec009a
19 changed files with 2952 additions and 70 deletions

View File

@@ -198,6 +198,8 @@ class Qdrant:
limit: int = 5,
area: str = None,
confidence: str = None,
platform: str = None,
tier: int = None,
with_payload: bool = True,
) -> list:
"""Nearest neighbours, optionally filtered *before* the search."""
@@ -206,7 +208,7 @@ class Qdrant:
"limit": int(limit),
"with_payload": bool(with_payload),
}
filters = _filter_conditions(area, confidence)
filters = _filter_conditions(area, confidence, platform, tier)
if filters:
body["filter"] = {"must": filters}
try:
@@ -260,10 +262,16 @@ class QdrantNotFound(QdrantError):
"""A 404 from Qdrant: the collection or route does not exist."""
def _filter_conditions(area: str = None, confidence: str = None) -> list:
def _filter_conditions(
area: str = None, confidence: str = None, platform: str = None, tier: int = None
) -> list:
conditions = []
if area:
conditions.append({"key": "area", "match": {"value": area}})
if confidence:
conditions.append({"key": "confidence", "match": {"value": confidence}})
if platform:
conditions.append({"key": "platform", "match": {"value": platform}})
if tier is not None:
conditions.append({"key": "tier", "match": {"value": int(tier)}})
return conditions