feat: Urteilsregeln für den Judge (PASS gegen TASK/SPEC, Abschnitt Hinweise)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Dieter Schlüter 2026-10-15 06:02:38 +02:00
commit 75ad2be498

View file

@ -117,3 +117,26 @@ test("parseShipVerdict: SHIP, NO-SHIP, Markdown, unklar", () => {
assert.equal(parseShipVerdict("**Urteil:** ship"), "SHIP");
assert.equal(parseShipVerdict("kein Urteil"), "");
});
// Judge-Prompts rufen judgeVerdictSection() auf; extractFn wertet jede Funktion einzeln aus, freie Namen landen
// im globalen Scope.
globalThis.judgeVerdictSection = extractFn("judgeVerdictSection");
const judgePrompt = extractFn("judgePrompt");
const judgeWithTestsPrompt = extractFn("judgeWithTestsPrompt");
const fixPrompt = extractFn("fixPrompt");
test("Judge-Prompts: Urteilsregeln und Hinweise in beiden Varianten (Strata-Judge 15.10.)", () => {
for (const p of [judgePrompt(""), judgeWithTestsPrompt("1 passed", "")]) {
assert.match(p, /Urteilsregeln \(verbindlich/);
assert.match(p, /- PASS: alle Anforderungen erfüllt, Tests grün, kein Blocker und kein Major/);
assert.match(p, /„Hinweise“\. Sie ändern das Urteil nicht/);
assert.match(p, /- Hinweise \(ändern das Urteil nicht\)/);
assert.match(p, /- Urteil: PASS \| PASS WITH CONCERNS \| FAIL/);
assert.doesNotMatch(p, /Produktionsrisiken/);
}
assert.match(judgeWithTestsPrompt("3 passed", ""), /3 passed/);
});
test("fixPrompt: Hinweise sind kein Auftrag", () => {
assert.match(fixPrompt(""), /„Hinweise“ ist kein Auftrag/);
});