mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
Every AI job now asks its capability for the user before it builds a snapshot, and skips with a `.skipped` annotation naming the reason: the nightly pregenerate (briefing and statusText, each half on its own), the status batch and the per-metric crons, the on-demand status worker, the narrative cron, Coach nudges and their AI composer, the Coach memory refresh, reaction lines, workout paragraphs, and the document summary, catch-up and index jobs. Seven of these read no assistant switch at all before, so the master switch now stops them too. The cron candidate queries drop people who switched AI analysis off in SQL, and no longer read `disableCoach` outside the Coach: hiding the Coach hides the Coach. Coach nudges use the one presence probe, so a central Codex account is no longer skipped; a missing consent still gets the deterministic template. The arrival spine asks only the provider-free half (switches and modules) before it enqueues, keeping its module graph free of provider code. Document reading needs an extraction receipt (ai_extraction or ai_full) for any external provider; the auto-read toggle is the trigger, no longer a consent shortcut, so a revoked receipt wins over a toggle left on. Lab report scans get the same rule for a whole chain. Two structural guards: every file that calls a provider is named with the reason its call is admitted, and the chokepoints re-check a capability; every AI job references its capability gate. An integration matrix runs each worker under the refusing states with a provider spy. Refs #975