feat(generate): confirm product status scope

This commit is contained in:
chengma
2026-07-18 16:57:57 +08:00
parent 4658a1ca61
commit 3a92119187
9 changed files with 569 additions and 19 deletions
+6 -2
View File
@@ -1,7 +1,7 @@
---
id: T-662c
title: AI生成范围确认与异常商品点数保护
status: TODO
status: DONE
phase: 7
deps: [T-662a]
created: 2026-07-18
@@ -60,4 +60,8 @@ git diff --check
## 执行记录
- 待实现。
- 已新增共享纯逻辑 `product_status.build_generation_plan()`:按任务 ID 去重、汇总四类状态、生成 `normal_only/all` 精确执行清单,并冻结候选指纹。
- ②「开始生成」在真实候选存在时弹出中文范围确认,默认只生成状态正常商品;“生成所有状态的商品”为红色危险选项,无异常候选时禁用。取消或候选在确认期间变化不会创建 Worker。
- `GenerateWorker` 接收范围、状态汇总和计划指纹;默认范围下再次防御性过滤非正常商品,`ai.generate_batch()` 只接收最终执行清单,运行日志记录范围和排除数量。
- 已更新 `docs/routes.md`、`docs/04-architecture.md`、`docs/api.md`。
- 验证通过:`py -3.10 -m unittest tests.test_product_status tests.test_gui`(203 项)、`py -3.10 -m unittest discover -s tests`(612 项)、`py -3.10 -m ruff check app tests main.py`、`py -3.10 -m compileall app main.py`、`git diff --check`。