From 9f1d1341f9f2ec90e8e6ca2b6e66519e573b5715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Thu, 24 Sep 2026 09:22:50 +0200 Subject: [PATCH] test(ai): state the mutation checks the AI route tests were run against --- .../api/__tests__/ai-capability-route-inventory.test.ts | 3 +-- tests/integration/ai-optional-actions.test.ts | 6 +++--- tests/integration/ai-optional-mixed-routes.test.ts | 8 ++++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/app/api/__tests__/ai-capability-route-inventory.test.ts b/src/app/api/__tests__/ai-capability-route-inventory.test.ts index 6a4d85038..30fd05cf6 100644 --- a/src/app/api/__tests__/ai-capability-route-inventory.test.ts +++ b/src/app/api/__tests__/ai-capability-route-inventory.test.ts @@ -23,8 +23,7 @@ * Mutation checks (each turned this file red by name): adding * `await requireAiCapability("statusText")` to `insights/ecg/route.ts`; * removing the capability call from `insights/chat/route.ts`; swapping - * `getAiCapability` for `requireAiCapability` in `insights/narrative`; - * breaking the call matcher. + * `getAiCapability` for `requireAiCapability` in `insights/narrative`. */ import { readdirSync, readFileSync, statSync } from "node:fs"; import { join, relative, resolve } from "node:path"; diff --git a/tests/integration/ai-optional-actions.test.ts b/tests/integration/ai-optional-actions.test.ts index 5ae6f9789..5a29d565a 100644 --- a/tests/integration/ai-optional-actions.test.ts +++ b/tests/integration/ai-optional-actions.test.ts @@ -8,9 +8,9 @@ * The chat keeps its `coach.provider.none` SSE frame for a missing provider, * now carrying `reason`. * - * Mutation check: replacing `requireAiCapability("briefing")` in the generate - * GET with the old Coach gate lets S2 (briefing off, the others on for this - * case) through to the cache and turns that case red. + * Mutation check: removing `requireAiCapability("briefing")` from the + * generate GET lets every state through to the cache read and turns all five + * briefing cases red. */ import { NextRequest } from "next/server"; import { beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/tests/integration/ai-optional-mixed-routes.test.ts b/tests/integration/ai-optional-mixed-routes.test.ts index 5083f88cc..fbe964713 100644 --- a/tests/integration/ai-optional-mixed-routes.test.ts +++ b/tests/integration/ai-optional-mixed-routes.test.ts @@ -8,10 +8,10 @@ * served however fresh, and nothing is enqueued to warm it. The baseline (S0) * proves each assertion can see the text when it is allowed to. * - * Mutation check: dropping the `ai.available` test from the narrative route - * (`existing = stored`) serves the provider row under S1 and S6 and turns - * those cases red; applying the briefing capability inside the cached builder - * instead of per read turns the snapshot flip case red. + * Mutation check: dropping the capability test from the narrative route + * (`existing = stored`) serves the provider row and turns all four hiding + * states red. The per-read snapshot gate is mutation-checked by + * `snapshot-read-briefing-capability.test.ts`. */ import { NextRequest } from "next/server"; import { beforeEach, describe, expect, it, vi } from "vitest";