Opus finding
Telemetry singleton constructs DB synchronously in module import path with side effects
lowmaintainabilityhigh
- src/providers/telemetry.ts:60-73
Calling getInstance() creates a real ~/.mythos-router directory, opens a SQLite handle, and registers process.on('exit'/'beforeExit') listeners. Repeated process.on listeners in long-running test suites or REPLs can leak; the constructor also assumes a writable home directory (will throw on read-only environments like serverless / certain Docker images). No try/catch around fs.mkdirSync or DB construction means import-time crash propagates as opaque error.
Recommendation
Wrap initialization in try/catch with fallback to in-memory DB or no-op store; document HOME requirement.