docs: 补强 V1 数据与测试设计

- 扩展 SQLite schema:新增 batches、Excel 行定位、stage/status、时间戳和重试字段

- 明确 SQLite worker 并发规则:独立 connection、WAL、busy_timeout、短事务

- 调整 AI 接入顺序:先做模型清单后端,再接真实 ai.py,设置页复用后端

- 补充 unittest 测试基座要求和分层验证策略

- 敏感信息改为本地明文保存,配合 gitignore、UI 打码和日志脱敏
This commit is contained in:
chengma
2026-06-26 16:27:33 +08:00
parent 92735ae7a4
commit 3832697fc4
15 changed files with 152 additions and 62 deletions
+5 -1
View File
@@ -52,7 +52,10 @@
完成前至少检查:
- [ ] `python -m py_compile` 通过。
- [ ] 纯逻辑改动有对应 `unittest`,至少覆盖正常路径和一个失败路径。
- [ ] 涉及 CDP 的改动,在测试商品(ITEM_ID 51100639510)上实跑验证。
- [ ] 涉及 DB 的改动,覆盖 schema 初始化、重复初始化、短事务写入、失败状态写入。
- [ ] 涉及 Excel 的改动,覆盖 source_file_abs/source_sheet/source_row 回写定位。
- [ ] 对得上需求验收标准(如标题 `value`+`modelvalue` 双等于、封面在第一位)。
- [ ] 没有夹带无关改动。
- [ ] 涉及选择器/流程/配置 schema 变化时,文档已同步。
@@ -60,13 +63,14 @@
```bash
python -m py_compile *.py
python -m unittest discover -s tests
python prototypes/demo.py # 单账号闭环验证(不提交)
```
## 7. 绝不
- 绝不把真实账号、密码、Cookie、token 写进代码、文档或日志。
- 绝不明文存密码;DB 里密码必须加密,且加密密钥不与密文同存。
- 绝不把密码/API Key 写进代码、文档、日志或导出文件;本地配置/DB 可明文保存,必须 gitignore,UI 打码。
- 绝不把 `config.json`、`cmshopee.db`、`chrome_user_data_dir/` 提交版本库。
- 绝不自动登录 / 自动填账号密码;登录由人工完成,程序只检测登录态。
- 绝不在缺少 ③ 批量确认弹窗确认的情况下点击「更新」提交线上。