mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 04:50:59 +00:00
The retry suffix still described the strict insight wrapper that was removed long ago: it demanded citations[] and warnings[] — fields insightResultSchema does not have — required metricSource, rationale, id and severity on every recommendation when all four are optional, and named none of the five fields the live schema actually requires (classification, findings, correlations, dataQuality, disclaimer). So the one corrective pass steered the model away from the contract it was being corrected towards. A reply that obeyed the correction could not validate, fell through parseComprehensiveResult's raw-object escape hatch, and the downstream surfaces read an unvalidated payload. Describe insightResultSchema and nothing else, and carry the contract as data in RETRY_CONTRACT_EXAMPLE so a test can assert prompt and validator agree.