mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-07 12:22:03 +00:00
fix(ai): MockAIProvider DEFAULT_RESPONSE conforms to v1.4.15 strict schema
Phase D senior-dev review HIGH H4: the mock's default response carried
the legacy v1.4.14 rich shape (classification, findings, correlations,
dataQuality, disclaimer). The v1.4.15 strict schema requires
{summary, recommendations, citations, warnings}. The default passed
only because of `aiInsightResponseSchema.passthrough()`; once v1.4.16
retires the passthrough, every test using the default mock would
silently start failing schema validation before its asserts ran.
Switch to a strict-schema-conformant default. Tests needing the
legacy shape opt in via `responses: [...]`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
66d2e0773a
commit
79bb167333
1 file changed
+4
-5
@@ -39,14 +39,13 @@ export interface MockAIProviderOptions {
|
||||
tokensUsed?: number | number[] | null;
|
||||
}
|
||||
|
||||
// Conforms to v1.4.15 strict `aiInsightResponseSchema`. Tests that need
|
||||
// the legacy v1.4.14 rich shape opt in via `responses: [...]`.
|
||||
const DEFAULT_RESPONSE = JSON.stringify({
|
||||
summary: "mock",
|
||||
classification: "gut",
|
||||
findings: [],
|
||||
correlations: [],
|
||||
recommendations: [],
|
||||
dataQuality: { coverage: "mock", gaps: [], confidence: "mittel" },
|
||||
disclaimer: "mock disclaimer",
|
||||
citations: [],
|
||||
warnings: [],
|
||||
});
|
||||
|
||||
export class MockAIProvider implements AIProvider {
|
||||
|
||||
Reference in new issue
Block a user