fix(status): ignore promotion edit warnings

This commit is contained in:
chengma
2026-07-20 10:52:32 +08:00
parent b3d9857b3e
commit 9c4224286a
10 changed files with 253 additions and 14 deletions
+6 -2
View File
@@ -1,7 +1,7 @@
---
id: T-673
title: 促销编辑提示商品状态误判修复
status: TODO
status: DONE
phase: 7
deps: [T-667, T-672]
created: 2026-07-20
@@ -56,4 +56,8 @@ git diff --check
## 执行记录
- 待实现。
- 在 `product_status.classify_alerts()` 增加繁简促销编辑提示识别:该提示单独出现时按 `normal`,同页出现「审核中」或「您的商品未上架」仍优先返回真实异常状态;其他未识别横幅、DOM 异常和非法返回仍为 `unknown`。
- 在 `db.init_db()` 增加幂等精确修复:仅处理商品状态功能上线前、未软删除批次中由该促销提示误写的 `unknown`,修正为 `normal`、保留原检测时间并写入历史修正备注;其他未知、已确认异常、上线后批次和软删除数据均不改写。
- ③状态拦截提示改为中文安全说明,不再引导用户使用已移除的「重新确认商品状态」入口;同步更新架构、路由和 API 文档。
- 已对本机运行时数据库执行初始化迁移核验:批次 `20260710_105614_09b176d6` 的 13 条促销误判记录均已修正为 `normal`;只更新封面预检结果为候选 13 条、可执行 13 条、状态排除 0 条、缺少封面 0 条。未打开 Chrome、未调用 AI、未提交线上更新。
- 验证通过:`py -3.10 -m unittest discover -s tests -p "test_product_status.py"`(7 项)、`py -3.10 -m unittest discover -s tests -p "test_db.py"`(21 项)、`py -3.10 -m unittest discover -s tests -p "test_gui.py"`(206 项)、`py -3.10 -m unittest discover -s tests`(625 项)、`py -3.10 -m ruff check app tests main.py`、`py -3.10 -m compileall app main.py`、`git diff --check`。