Compare commits

..

1 Commits

Author SHA1 Message Date
5448185d12 fix(#1427): disable ChromaDB telemetry for sovereignty
Some checks failed
CI / test (pull_request) Failing after 1m27s
CI / validate (pull_request) Failing after 1m0s
Review Approval Gate / verify-review (pull_request) Failing after 15s
ChromaDB enables anonymous telemetry by default, leaking usage
patterns to Chroma Inc. This violates local-first sovereignty.

Two layers of protection:
1. Set ANONYMIZED_TELEMETRY=false env var at import time
2. Pass Settings(anonymized_telemetry=False) to PersistentClient

Closes #1427
2026-04-15 04:12:03 +00:00
4 changed files with 9 additions and 10 deletions

View File

@@ -44,13 +44,11 @@ class MemPalaceResult:
def _get_client(palace_path: Path):
"""Return a ChromaDB persistent client, or raise MemPalaceUnavailable.
Telemetry is disabled for sovereignty — no data leaks to Chroma Inc.
"""
"""Return a ChromaDB persistent client, or raise MemPalaceUnavailable."""
try:
import chromadb # type: ignore
from chromadb.config import Settings
import os
os.environ["ANONYMIZED_TELEMETRY"] = "false"
import chromadb # type: ignore
except ImportError as exc:
raise MemPalaceUnavailable(
"ChromaDB is not installed. "
@@ -63,9 +61,10 @@ def _get_client(palace_path: Path):
"Run 'mempalace mine' to initialise the palace."
)
import chromadb.config
return chromadb.PersistentClient(
path=str(palace_path),
settings=Settings(anonymized_telemetry=False),
settings=chromadb.config.Settings(anonymized_telemetry=False),
)

View File

@@ -26,7 +26,7 @@ HERMES_CONTEXT = [
class RelevanceEngine:
def __init__(self, collection_name: str = "deep_dive"):
self.client = chromadb.PersistentClient(path="./chroma_db", settings=chromadb.config.Settings(anonymized_telemetry=False))
self.client = chromadb.PersistentClient(path="./chroma_db")
self.embedding_fn = embedding_functions.SentenceTransformerEmbeddingFunction(
model_name="all-MiniLM-L6-v2"
)

View File

@@ -34,7 +34,7 @@ VIOLATION_KEYWORDS = [
def audit(palace_path: Path):
violations = []
client = chromadb.PersistentClient(path=str(palace_path), settings=chromadb.config.Settings(anonymized_telemetry=False))
client = chromadb.PersistentClient(path=str(palace_path))
try:
col = client.get_collection("mempalace_drawers")
except Exception as e:

View File

@@ -18,7 +18,7 @@ DOCS_PER_ROOM = 5
def main():
client = chromadb.PersistentClient(path=PALACE_PATH, settings=chromadb.config.Settings(anonymized_telemetry=False))
client = chromadb.PersistentClient(path=PALACE_PATH)
col = client.get_collection("mempalace_drawers")
# Discover rooms in this wing