mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 13:01:00 +00:00
Ten scenarios, each in German and English, describe what a turn must do with a question: which tool it calls and with which arguments, whether it may read anything new, whether it asks back, declines a dose, offers chips only for what the record holds, answers a chip without a provider, offers to keep looking after a forced answer, and keeps an earlier table's title out of the model's context. evaluateScenario grades a run against them. The deterministic suite drives POST /api/insights/chat with a scripted provider; the tool loop, executor, table tool, chips, clarification filter, method line, reply guards and stream run for real. Every check also runs against a misbehaving model or a broken record and must fail there. route-followups.test.ts pins the front door for chips and answered questions: validation, the rate limit and capability gate on a reuse turn, the stored chip winning over anything the request adds, stale chips and answers degrading to a plain message, and the continue line.