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:
parent
65555b25f1
commit
75ad2be498
1 changed files with 67 additions and 27 deletions
|
|
@ -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/);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue