From 8b307ce36f147acdb76b05135810a9605022c659 Mon Sep 17 00:00:00 2001 From: ttbombadil Date: Sat, 3 Oct 2026 21:36:01 +0200 Subject: [PATCH] test(tutor-quality): keep only the coverage lower bound for strategy cases (R-AUT-1) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The corpus contract test capped the judge-enabled strategy cases per phase at three. EXPAND already has three, so any further valid EXPAND case would fail the test, although R-AUT-1 forbids hard-coding the case count and ยง1 lets new cases be corpus data only. The test keeps the lower bound of two per phase. Co-Authored-By: Claude Opus 5.5 --- tests/server/services/tutor/evaluation/anchor-corpus.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/server/services/tutor/evaluation/anchor-corpus.test.ts b/tests/server/services/tutor/evaluation/anchor-corpus.test.ts index a4a3bdffe..f397c2342 100644 --- a/tests/server/services/tutor/evaluation/anchor-corpus.test.ts +++ b/tests/server/services/tutor/evaluation/anchor-corpus.test.ts @@ -43,7 +43,7 @@ function validSource(): TutorQualityCorpusSource { } describe("Tutor Quality anchor corpus contract", () => { - it("contains two judge-enabled strategy cases for each learning phase", () => { + it("contains at least two judge-enabled strategy cases for each learning phase", () => { const source = parseYaml(readFileSync(fileURLToPath(new URL("../../../../../evals/tutor-quality/anchor-corpus.yaml", import.meta.url)), "utf8")) as TutorQualityCorpusSource; const strategyCases = source.scenarios.filter(({ id }) => id.startsWith("strategy-")); const counts = Object.fromEntries(["LEARN", "DEEPEN", "EXPAND"].map((phase) => [ @@ -51,7 +51,8 @@ describe("Tutor Quality anchor corpus contract", () => { strategyCases.filter(({ expected }) => expected?.learningPhase === phase).length, ])); - expect(Object.values(counts).every((count) => count >= 2 && count <= 3)).toBe(true); + // R-AUT-1: a lower bound for coverage, never a case count; new cases are corpus data only. + expect(Object.values(counts).every((count) => count >= 2)).toBe(true); expect(strategyCases.every(({ turns, judge, expected }) => ( turns.some(({ kind }) => kind === "dialog") && expected?.learningPhase !== undefined