fix: support Qdrant backend on non-AVX CPUs

- doctor: skip LanceDB check when qdrant_storage/ dir detected
- topology: use daemon socket instead of local store (avoids lancedb crash)
- qdrant_store: add records_as_dataframe() + wire into _TableShim
  so build_runtime_graph() works with Qdrant (was returning empty)
This commit is contained in:
Apunkt 2026-05-12 18:14:03 +02:00
parent 01e5903035
commit 8492719735
No known key found for this signature in database
3 changed files with 110 additions and 8 deletions

View file

@ -1289,6 +1289,52 @@ class QdrantStore:
except Exception:
return pd.DataFrame(columns=["src", "dst", "edge_type", "weight", "updated_at"])
def records_as_dataframe(self) -> "pd.DataFrame":
"""Return all records from the records collection as a pandas DataFrame."""
try:
records = self.all_records()
if not records:
return pd.DataFrame(columns=[
"id", "tier", "literal_surface", "embedding",
"community_id", "centrality", "pinned",
"tags_json", "language", "aaak_index",
"stability", "difficulty", "last_reviewed",
"never_decay", "never_merge", "detail_level",
"s5_trust_score", "structure_hv",
])
rows = []
for r in records:
rows.append({
"id": str(r.id),
"tier": r.tier,
"literal_surface": r.literal_surface,
"embedding": r.embedding,
"community_id": str(r.community_id) if r.community_id else None,
"centrality": r.centrality,
"pinned": r.pinned,
"tags_json": r.tags_json if hasattr(r, "tags_json") else "[]",
"language": r.language,
"aaak_index": r.aaak_index,
"stability": r.stability,
"difficulty": r.difficulty,
"last_reviewed": str(r.last_reviewed) if r.last_reviewed else None,
"never_decay": r.never_decay,
"never_merge": r.never_merge,
"detail_level": r.detail_level,
"s5_trust_score": r.s5_trust_score,
"structure_hv": r.structure_hv.hex() if r.structure_hv else "",
})
return pd.DataFrame(rows)
except Exception:
return pd.DataFrame(columns=[
"id", "tier", "literal_surface", "embedding",
"community_id", "centrality", "pinned",
"tags_json", "language", "aaak_index",
"stability", "difficulty", "last_reviewed",
"never_decay", "never_merge", "detail_level",
"s5_trust_score", "structure_hv",
])
# ------------------------------------------------------------------ db shim
class _DbShim:
@ -1311,6 +1357,8 @@ class QdrantStore:
def to_pandas(self) -> pd.DataFrame:
if self._name == EDGES_TABLE:
return self._store.edges_as_dataframe()
elif self._name == RECORDS_TABLE:
return self._store.records_as_dataframe()
elif self._name == EVENTS_TABLE:
return pd.DataFrame()
return pd.DataFrame()