fix(insights): keep the briefing blocks of a reply that validates

The briefing prompt asks for dailyBriefing, trendAnnotations and
storyboardAnnotations beside the insight fields, and the briefing card,
the dashboard snapshot and the today read consume them. insightResultSchema
was a strict object, so it dropped exactly those blocks from a reply that
validated, while a reply that failed validation kept them. It is a loose
object now: the named fields are checked and the rest of the reply stays.
This commit is contained in:
Marc-André Bombeck committed 2026-10-23 16:44:50 +02:00
1 parent b02caed221
commit cf37f833e8
5 files changed
+77 -5

No files matched your search

@@ -14,6 +14,19 @@
"confidence": "hoch"
},
"disclaimer": "Consult your doctor.",
"dailyBriefing": {
"paragraph": "Your readings held steady this week, with no surprises.",
"signalsOfDay": [
{
"sourceMetric": "weight",
"tone": "info",
"headline": "Weight is steady",
"nudge": "Keep weighing in at the same time each morning.",
"delta": null
}
],
"keyFindings": []
},
"briefingGeneratedAt": "anchor+0d+12:00:00"
},
"cached": false,
@@ -222,6 +235,19 @@
"confidence": "hoch"
},
"disclaimer": "Consult your doctor.",
"dailyBriefing": {
"paragraph": "Your readings held steady this week, with no surprises.",
"signalsOfDay": [
{
"sourceMetric": "weight",
"tone": "info",
"headline": "Weight is steady",
"nudge": "Keep weighing in at the same time each morning.",
"delta": null
}
],
"keyFindings": []
},
"briefingGeneratedAt": "anchor+0d+12:00:00"
},
"snapshotHash": "4ac15bc271309c63b3b5d1e43a3367f7abdf952d3f4351bb1b22aa364bcb630a",