Files
CatoandClaude Opus 5 4efbb6429b fix(ai): report the model that ANSWERED, and correct an overstated comment I wrote (#99)
Two corrections, both mine.

1. THE PROBE NAMED THE CONFIGURATION, NOT THE RESPONDER. It reported
   `process.env.AI_MODEL` as `servedBy`, so with the comma-separated list
   this repo now supports it printed
   "openai/gpt-oss-120b,openai/gpt-oss-20b" — the setting, not the model
   that answered. That is a claim about something never observed, in the
   one route whose whole job is to observe.

   aiChat now returns `model` (from complete()'s resolved link) and the
   probe reports that. It matters beyond tidiness: when the first id rots
   the chain falls to the second, and "which one served" is exactly the
   fact you want at that moment.

2. THE DOC COMMENT OVERSTATED THE LAW. It said pointing patient data at
   the fleet's freeChain() "would be a data protection breach".
   lib/config/regulation.ts is the authority and it says otherwise: the
   `cloud-ai-processing` block is GATED, not blocked. Health data is GDPR
   Art. 9 and Swiss Criminal Code Art. 321 — the strictest rules this
   product touches — and the lawful path through them is the one this app
   already implements: explicit, timestamped, withdrawable per-patient
   consent (the Art. 49(1)(a) derogation) plus a warning on every output
   naming the line the data crossed.

   So the endpoint is a DEPLOYMENT decision, taken by whoever runs the
   clinic and answers for it. freeChain() is still not used here — not
   because it is unlawful, but because it would silently override that
   decision with a fleet-wide default the operator never made.

The distinction is not academic: stated as a breach, the feature stays
dark forever waiting for a provider nobody is procuring. Stated
correctly, it is a choice the operator can make today with consent and a
warning — which is what the ledger's house rule ("build it anyway,
disable it at the exact moment it would run, and say which law did it")
was written for.

verify green — lint, typecheck, 1340 tests.


Claude-Session: https://claude.ai/code/session_01NHDLTKGirKU7He8q2YR2y4

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-10 12:17:35 -07:00
..