feat: localize quality report

This commit is contained in:
Codex
2026-06-21 23:43:02 +08:00
parent a457a4acf3
commit 936084465d
3 changed files with 78 additions and 35 deletions
@@ -133,6 +133,27 @@ describe("workflow nodes", () => {
]);
});
it("returns quality report details in Chinese", () => {
const report = inspectQuality({
article: {
title: "Example GEO Optimization Guide",
summary: "A factual guide for marketing teams.",
body_markdown:
"Example Technology Co., Ltd. has eight years of GEO optimization experience.",
image_suggestions: [],
changed_sections: [],
requires_user_confirmation: [],
},
factCard: confirmedFactCard,
platform: "official_site",
sourceImages: [],
});
expect(report.checks[0]?.reason).toContain("行业");
expect(report.checks[0]?.suggested_fix).toContain("行业");
expect(report.checks[0]?.evidence).not.toContain("Article");
});
it("hard-fails incomplete company names, hallucinated numbers, industry drift, and conflicting years", () => {
const report = inspectQuality({
article: {