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 8 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

@@ -7,7 +7,6 @@ the body (Evennia/Morrowind), and the visualization surface.
import asyncio
import json
import logging
import os
import signal
import sys
from typing import Set
@@ -16,8 +15,8 @@ from typing import Set
import websockets
# Configuration
PORT = int(os.environ.get('NEXUS_WS_PORT', 8765))
HOST = os.environ.get('NEXUS_WS_HOST', '127.0.0.1') # Localhost by default. Set NEXUS_WS_HOST=0.0.0.0 for network access.
PORT = 8765
HOST = "0.0.0.0" # Allow external connections if needed
# Logging setup
logging.basicConfig(
@@ -82,9 +81,6 @@ async def broadcast_handler(websocket: websockets.WebSocketServerProtocol):
async def main():
"""Main server loop with graceful shutdown."""
if HOST == '0.0.0.0':
logger.warning(f"Gateway binding to ALL interfaces (NEXUS_WS_HOST=0.0.0.0). "
f"Accessible from network. Ensure firewall rules are in place.")
logger.info(f"Starting Nexus WS gateway on ws://{HOST}:{PORT}")
# Set up signal handlers for graceful shutdown