mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 04:50:59 +00:00
The summary is model prose about the document and is contractually descriptive-only, but it was returned to the browser verbatim with no guard. Screen it against the insights contracts and let each caller apply its own policy: the on-demand route replaces the text with a short honest statement because a user is waiting on it, while the background job persists nothing -- its updateMany is guarded on a null summary, so a stored refusal would stamp the document permanently with no path to regenerate. Transcription stays unscreened by construction. It reproduces the user's own document verbatim; a discharge letter that says to increase a dose is the prescriber's instruction, and censoring it would delete the user's own record from their own view. Locale is required on the summary input type and absent from the transcription input so a caller cannot silently fall back to the English banks.