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:
Marc-André BombeckandClaude Opus 4.7 committed 2026-05-09 22:16:33 +02:00
1 parent 66d2e0773a
commit 79bb167333
1 file changed
+4 -5
+4 -5
View File
@@ -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 {