task-98: 移除 similar-asin/appearance-patent 模块 Coze,状态机与共享组件改名 LLM

- similarasin/appearancepatent 模块全部 Coze 工作流调用改走 direct-LLM(已确认唯一运行路径)
- 共享组件改名:CozeTaskQueueGate→TaskQueueGate、CozeGroupResultPropagator→GroupResultPropagator
- 状态机改名:biz_task_scope_state 的 coze_* 列→llm_*、stateJson coze 键→llm(V100 迁移已应用生产)
- 删除 biz_coze_credential 表、CozeCredential* 类、SimilarAsinCozeClient、AppearancePatentCozeClient→LlmClient
- 前端 brand 页 Coze 文案→LLM;Python 后端删除 cozepy 依赖与死配置
- 修复 TaskResultFileJobWorker 启动失败:TaskFileJobConfig 注册 ResultFileJobHandlerRegistry 与 13 个 handler bean(含 validateCoverage 启动校验)
This commit is contained in:
2026-09-01 02:19:45 +08:00
parent acdb1dd030
commit da0eaccf3b
109 changed files with 6903 additions and 4582 deletions
@@ -0,0 +1,121 @@
package com.nanri.aiimage.config;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
/**
* 架构文档 §6 现状描述核对(任务 56,验证型)。
* 断言 java-architecture-optimization-plan.md §6 已反映本轮实现现状:
* multipart 直通、1MB 阈值、过滤器日志不读 body、未做项标注、spec 引用、
* 与 00-overview 实施记录一致、无过时默认值/占位符残留。
*/
class ArchitecturePlanSection6DocTest {
private static final Path DOC = Paths.get("src", "main", "resources", "..", "..", "..",
"docs", "java-architecture-optimization-plan.md").normalize();
private static final Path OVERVIEW = Paths.get("src", "main", "resources", "..", "..", "..",
"docs", "plans", "00-plan-overview.md").normalize();
private static String read(Path path) throws IOException {
return new String(Files.readAllBytes(path), StandardCharsets.UTF_8);
}
private static String section6() throws IOException {
String doc = read(DOC);
int start = doc.indexOf("## 6. ");
int end = doc.indexOf("## 7. ", start);
assertTrue(start >= 0, "文档存在 §6 章节");
return end > start ? doc.substring(start, end) : doc.substring(start);
}
private static List<String> section6Lines() throws IOException {
return List.of(section6().split("\r?\n"));
}
private static int docLineNumberOf(String section, String needle) {
List<String> lines = List.of(section.split("\r?\n"));
for (int i = 0; i < lines.size(); i++) {
if (lines.get(i).contains(needle)) {
return i + 1;
}
}
return -1;
}
@Test
void noObsoleteDefaultRemains() throws IOException {
for (String line : section6Lines()) {
assertFalse(line.contains("104857600"), "§6 无过时默认值 104857600 残留:" + line);
}
}
@Test
void multipartPassthroughStated() throws IOException {
String section = section6();
assertTrue(section.contains("multipart"), "§6 记录 multipart 处理");
assertTrue(section.contains("直通") || section.contains("跳过缓存"),
"§6 记录 multipart 直通现状");
}
@Test
void threshold1MbStated() throws IOException {
String section = section6();
assertTrue(section.contains("1MB") || section.contains("1 MiB") || section.contains("1048576"),
"§6 记录 1MB 阈值现状");
assertTrue(section.contains("1048576"), "§6 记录阈值具体值 1048576");
}
@Test
void notReadingBodyStated() throws IOException {
String section = section6();
assertTrue(section.contains("不读 body") || (section.contains("日志") && section.contains("body")),
"§6 记录过滤器日志不读 body");
}
@Test
void deferredItemsListed() throws IOException {
String section = section6();
assertTrue(section.contains("未做") || section.contains("不做") || section.contains("后续批次"),
"§6 标注本轮未做项");
}
@Test
void spec03Referenced() throws IOException {
String section = section6();
assertTrue(section.contains("specs/03-request-trace-filter.md")
|| section.contains("03-request-trace-filter.md"),
"§6 引用 03 spec");
}
@Test
void consistentWithOverview() throws IOException {
String section = section6();
String overview = read(OVERVIEW);
for (String key : List.of("49", "50", "51", "52", "53", "54", "55", "56")) {
assertTrue(overview.contains("| " + key + " |"), "00-overview 实施记录含任务 " + key);
}
assertTrue(overview.contains("multipart 直通"), "00-overview 记录 multipart 直通");
assertEquals(1, overview.split("multipart 直通", -1).length - 1,
"00-overview 实施记录恰好一条 multipart 直通条目(与 §6 现状一致)");
}
@Test
void noTodoLeft() throws IOException {
String section = section6();
assertTrue(docLineNumberOf(section, "### 现状") > 0 || section.contains("已实现"),
"§6 有现状或已实现描述");
assertFalse(section.contains("TBD"), "§6 无 TBD 残留");
assertFalse(section.contains("TODO"), "§6 无 TODO 残留");
assertFalse(section.contains("待确认"), "§6 无待确认残留");
}
}