mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-17 23:52:24 +00:00
The MCP surface reached three data families that deliberately bypass the Coach snapshot and so inherited none of its module narrowing: the doctor-report aggregate behind healthlog://report/doctor-visit and the doctor_visit_summary prompt, the rollup-backed rich reads (compare_metric, get_metric_baseline, detect_changepoints), and the correlations reader. A disabled module — or one an operator switched off server-wide — still egressed to a third-party assistant. Gate at the read rather than per call site. The module-to-data ownership table moves out of the Coach snapshot builder into lib/modules/measurement-scope so every read gates off one map; the rich reads resolve metrics through a module-aware resolver; the correlations reader gates on insights itself, which also closes the same gap on the Coach chat tool and the metric-page read strip. Per-domain reads omit with an honest module_disabled reason; the whole-record aggregate refuses, mirroring /api/export/health-record. collectDoctorReportData gains a fail-closed backstop on its own module key. The clinician share link, found while tracing the aggregate's callers, had the same gap and now collapses to its documents-only state.