docs: 明确任务领取与导入安全规则

统一任务领取规则,current-state 只能展示按 06-tasks 顺序计算出的当前任务,当前下一个任务固定为 T-001。

明确 tests/ 与 unittest discover 的启用时机:T-006 前不因 tests 缺失判失败,T-006 后纯逻辑改动必须补测并运行。

补齐敏感文件和目录清单:config.json、config/ai_models.json、cmshopee.db、chrome_user_data_dir/、images/ 均须 gitignore 且不得提交。

定稿 Excel 导入容错策略:缺必需列拒绝整文件并记录 file_errors,单行脏数据逐行跳过并计入 invalid。
This commit is contained in:
chengma
2026-06-26 16:37:58 +08:00
parent 3832697fc4
commit 5c6fd0ff98
11 changed files with 59 additions and 24 deletions
+8 -3
View File
@@ -52,7 +52,7 @@
完成前至少检查:
- [ ] `python -m py_compile` 通过。
- [ ] 纯逻辑改动有对应 `unittest`,至少覆盖正常路径和一个失败路径。
- [ ] T-006 完成后,纯逻辑改动有对应 `unittest`,至少覆盖正常路径和一个失败路径。
- [ ] 涉及 CDP 的改动,在测试商品(ITEM_ID 51100639510)上实跑验证。
- [ ] 涉及 DB 的改动,覆盖 schema 初始化、重复初始化、短事务写入、失败状态写入。
- [ ] 涉及 Excel 的改动,覆盖 source_file_abs/source_sheet/source_row 回写定位。
@@ -63,15 +63,20 @@
```bash
python -m py_compile *.py
python -m unittest discover -s tests
python -m unittest discover -s tests # T-006 完成且 tests/ 存在后
python prototypes/demo.py # 单账号闭环验证(不提交)
```
测试命令时机:
- T-006 前:`tests/` 尚未建立时,只要求运行与当前任务匹配的可用验证;不要因为 `python -m unittest discover -s tests` 缺目录而判失败。
- T-006 后:`python -m unittest discover -s tests` 成为纯逻辑改动的必跑项;新增/修改 appconfig、db、excel、prompts、config、chrome 纯逻辑时同步补测。
## 7. 绝不
- 绝不把真实账号、密码、Cookie、token 写进代码、文档或日志。
- 绝不把密码/API Key 写进代码、文档、日志或导出文件;本地配置/DB 可明文保存,必须 gitignore,UI 打码。
- 绝不把 `config.json`、`cmshopee.db`、`chrome_user_data_dir/` 提交版本库。
- 绝不把 `config.json`、`config/ai_models.json`、`cmshopee.db`、`chrome_user_data_dir/`、`images/` 提交版本库。
- 绝不自动登录 / 自动填账号密码;登录由人工完成,程序只检测登录态。
- 绝不在缺少 ③ 批量确认弹窗确认的情况下点击「更新」提交线上。
- 绝不擅自删除用户文件或重置 user-data-dir。