feat: label llm workflow tasks
This commit is contained in:
@@ -67,6 +67,9 @@ describe("LLM workflow integration", () => {
|
||||
expect(card.company_full_name).toBe("DeepSeek Example Co., Ltd.");
|
||||
expect(card.experience_years).toBe(9);
|
||||
expect(llmMocks.generateValidatedJson).toHaveBeenCalledOnce();
|
||||
expect(llmMocks.generateValidatedJson).toHaveBeenCalledWith(
|
||||
expect.objectContaining({ task: "fact_extractor" }),
|
||||
);
|
||||
});
|
||||
|
||||
it("falls back to deterministic candidate extraction when LLM returns null", async () => {
|
||||
@@ -108,6 +111,9 @@ describe("LLM workflow integration", () => {
|
||||
expect(article.title).toBe("LLM Optimized GEO Article");
|
||||
expect(article.body_markdown).toContain("LLM Body");
|
||||
expect(llmMocks.generateValidatedJson).toHaveBeenCalledOnce();
|
||||
expect(llmMocks.generateValidatedJson).toHaveBeenCalledWith(
|
||||
expect.objectContaining({ task: "article_optimizer" }),
|
||||
);
|
||||
});
|
||||
|
||||
it("falls back to deterministic article optimization when LLM returns null", async () => {
|
||||
@@ -165,6 +171,9 @@ describe("LLM workflow integration", () => {
|
||||
|
||||
expect(rewritten.title).toBe("Rewritten By LLM");
|
||||
expect(llmMocks.generateValidatedJson).toHaveBeenCalledOnce();
|
||||
expect(llmMocks.generateValidatedJson).toHaveBeenCalledWith(
|
||||
expect.objectContaining({ task: "targeted_rewriter" }),
|
||||
);
|
||||
});
|
||||
|
||||
it("falls back to deterministic targeted rewrite when LLM returns null", async () => {
|
||||
@@ -231,6 +240,9 @@ describe("LLM workflow integration", () => {
|
||||
);
|
||||
expect(platformCheck?.status).toBe("warn");
|
||||
expect(platformCheck?.evidence).toContain("LLM noticed");
|
||||
expect(llmMocks.generateValidatedJson).toHaveBeenCalledWith(
|
||||
expect.objectContaining({ task: "quality_inspector" }),
|
||||
);
|
||||
});
|
||||
|
||||
it("does not let LLM downgrade deterministic hard failures", async () => {
|
||||
|
||||
Reference in New Issue
Block a user