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:
+4
-4
@@ -6,7 +6,7 @@
|
||||
|
||||
- 形态:本地函数 + 子进程(Chrome)+ CDP(`127.0.0.1:<port>`)+ SQLite + openpyxl + AI 服务调用。
|
||||
- 编码:UTF-8;传 Chrome / `setFileInputFiles` 的路径为 **Windows 绝对路径**。
|
||||
- 凭证:登录态在 user-data-dir;密码、AI Key 本地明文存于 config/DB,文件必须 gitignore;UI 打码显示,不出现在日志/导出。
|
||||
- 凭证:登录态在 user-data-dir;密码、AI Key 本地明文存于 config/DB;`config.json`、`config/ai_models.json`、`cmshopee.db`、`chrome_user_data_dir/`、`images/` 必须 gitignore;UI 打码显示,不出现在日志/导出。
|
||||
- 失败处理:抛带中文说明的异常或返回状态字段;GUI 负责提示,不静默吞错。
|
||||
|
||||
## appconfig 模块(`appconfig.py`,待建)
|
||||
@@ -74,8 +74,9 @@ SQLite 连接规则:
|
||||
```python
|
||||
import_tasks(file_paths: list[str]) -> dict
|
||||
# 只解析【输入列】:账号名、别名、商品id;并记录 source_file/source_file_abs/source_sheet/source_row/row_key
|
||||
# -> {"rows": [...], "stats": {"files": int, "total": int, "valid": int, "invalid": int}}
|
||||
# invalid = 缺别名/商品id 或脏数据的行
|
||||
# -> {"rows": [...], "stats": {"files": int, "total": int, "valid": int, "invalid": int, "file_errors": [...]}}
|
||||
# 必需列缺失(别名/商品id)= 整个文件拒绝并记录到 file_errors,不导入该文件任何行
|
||||
# invalid = 单行缺别名/商品id 或商品id格式错误等脏数据;逐行跳过,不阻塞同文件其他有效行
|
||||
|
||||
match_summary(rows: list[dict], accounts: list) -> dict
|
||||
# 用 accounts 的别名对 rows 做匹配统计(导入汇总栏用)
|
||||
@@ -225,5 +226,4 @@ set UPDATE=1 && python prototypes/demo.py # 走完点击「更新」提交
|
||||
|
||||
- AI 服务商/模型/计费;图像 image-to-image 能力与合规。
|
||||
- 满 9 张删除封面的确认框选择器(需实测)。
|
||||
- Excel 缺列/脏数据容错(整文件拒绝 vs 逐行跳过)。
|
||||
- 旧封面下载的图片格式/扩展名处理。
|
||||
|
||||
Reference in New Issue
Block a user