diff --git a/test/helpers/llm-judge.ts b/test/helpers/llm-judge.ts index 5647cb31..af19cd34 100644 --- a/test/helpers/llm-judge.ts +++ b/test/helpers/llm-judge.ts @@ -236,16 +236,22 @@ export async function judgeRecommendation(askUserText: string): Promise because `, where is the bare // option label. judgeRecommendation.present covers the canonical shape. -const COMPLETENESS_RE = /Completeness:\s*\d{1,2}\/10/; +// COMPLETENESS regex matches both legacy bare form (`Completeness: 10/10`) and +// the canonical option-prefixed form (`Completeness: A=10/10, B=7/10`) per +// scripts/resolvers/preamble/generate-ask-user-format.ts. The optional +// `[A-Z]=` prefix tolerates either shape; both are acceptable spec output. +const COMPLETENESS_RE = /Completeness:\s*(?:[A-Z]=)?\d{1,2}\/10/; const KIND_NOTE_RE = /options differ in kind/i; // v1.7.0.0 Pros/Cons format tokens. Tests are additive: existing