Enhance Beryl Agent detail and report views

This commit is contained in:
Beryl
2026-09-11 11:13:24 +08:00
parent 336bf88466
commit 15f067fff9
57 changed files with 1833 additions and 95 deletions
@@ -0,0 +1,9 @@
import { it, expect } from "vitest";
import { parseReviewResult } from "../src/content-review.js";
it("fails closed for malformed or contradictory review output", () => {
for (const output of ["完成", "{}", '{"passed":"true","reasons":[]}', '{"passed":true,"reasons":["第2页仍是糖果"]}', '{"passed":false,"reasons":[]}'])
expect(parseReviewResult(output).passed).toBe(false);
});
it("accepts only an explicit positive review without failures", () => {
expect(parseReviewResult('{"passed":true,"reasons":[]}')).toEqual({ passed: true, reasons: [] });
});