feat(T-002): 建立核心数据模型与状态枚举

- src/core/status.py: TaskStatus 六态枚举,英文成员 + display_name/from_display
  中英映射(单一事实源),对齐 04-architecture.md §3.4。
- src/core/models.py: OrderTask dataclass,字段集合/类型对齐 §3.3;支付模式不挂模型。
- tests/test_models.py: 枚举完整性/双向映射/未知值报错/默认值/实例独立性。
- 文档同步:04 §3.4 约定补 from_display;tasks/progress/current-state 更新。

验证:compileall OK;unittest Ran 10 tests, OK。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
chengma
2026-06-24 17:17:52 +08:00
co-authored by Claude Opus 4.8
parent 2863bf2750
commit c41f37a27d
8 changed files with 205 additions and 11 deletions
+1 -1
View File
@@ -21,7 +21,7 @@
| ID | 任务 | 依赖 | 验收要点 | 状态 |
| --- | --- | --- | --- | --- |
| T-001 | 初始化 Python 项目骨架 | - | 建立 `src/`、`tests/`、`requirements.txt`;可运行最小入口;不引入无关依赖;用**真实可运行命令**替换 `00-ai-start-here.md`、`03-tech-stack.md`、`05-coding-rules.md`、`current-state.md` 中的占位符验证命令 | DONE |
| T-002 | 建立核心数据模型和状态枚举 | T-001 | `OrderTask`、`TaskStatus` 与 `04-architecture.md` 一致;有基础单元测试 | TODO |
| T-002 | 建立核心数据模型和状态枚举 | T-001 | `OrderTask`、`TaskStatus` 与 `04-architecture.md` 一致;有基础单元测试 | DONE |
| T-003 | 建立日志和运行产物目录策略 | T-001 | 日志、截图、UI XML 输出路径清晰;不记录敏感信息 | TODO |
## Phase 1 · 最高风险验证