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
2 changed files with 10 additions and 5 deletions

View File

@@ -46,7 +46,9 @@ class MemPalaceResult:
def _get_client(palace_path: Path):
"""Return a ChromaDB persistent client, or raise MemPalaceUnavailable."""
try:
import chromadb # type: ignore
import os
os.environ["ANONYMIZED_TELEMETRY"] = "false"
import chromadb # type: ignore
except ImportError as exc:
raise MemPalaceUnavailable(
"ChromaDB is not installed. "
@@ -59,7 +61,11 @@ def _get_client(palace_path: Path):
"Run 'mempalace mine' to initialise the palace."
)
return chromadb.PersistentClient(path=str(palace_path))
import chromadb.config
return chromadb.PersistentClient(
path=str(palace_path),
settings=chromadb.config.Settings(anonymized_telemetry=False),
)
def search_memories(

View File

@@ -293,7 +293,7 @@ class TestHealthReport:
class TestRunHealthChecks:
def test_returns_report_with_all_checks(self, tmp_path):
"""run_health_checks() returns a report with all five checks."""
"""run_health_checks() returns a report with all four checks."""
with patch("socket.socket") as mock_sock, \
patch("subprocess.run") as mock_run:
mock_sock.return_value.connect_ex.return_value = 0
@@ -303,10 +303,9 @@ class TestRunHealthChecks:
heartbeat_path=tmp_path / "missing.json",
)
assert len(report.checks) == 5
assert len(report.checks) == 4
check_names = {c.name for c in report.checks}
assert "WebSocket Gateway" in check_names
assert "Consciousness Loop" in check_names
assert "Heartbeat" in check_names
assert "Syntax Health" in check_names
assert "Kimi Heartbeat" in check_names