docs: add round 28 dev status — P13.2 task tests 34 passing
This commit is contained in:
@@ -940,6 +940,36 @@
|
|||||||
- P13.2 Task 后端测试(状态流转合法性 + assignee 校验 + comment 强制 + 编辑限制)
|
- P13.2 Task 后端测试(状态流转合法性 + assignee 校验 + comment 强制 + 编辑限制)
|
||||||
- 或 P13.3 Propose 后端测试(accept/reject/reopen + feat_task_id 生成 + code 递增)
|
- 或 P13.3 Propose 后端测试(accept/reject/reopen + feat_task_id 生成 + code 递增)
|
||||||
|
|
||||||
|
### 2026-03-18 04:00 UTC(第 28 轮:P13.2 Task 后端测试 — 34 个测试)
|
||||||
|
|
||||||
|
本轮做了什么:
|
||||||
|
- 编写 `tests/test_task_transitions.py`,覆盖 task 状态机的完整后端测试(P13.2)
|
||||||
|
- **TestPendingToOpen**(4 个):成功 / milestone 非 undergoing 拒绝 / depend_on 未完成拒绝 / depend_on 已完成成功
|
||||||
|
- **TestOpenToUndergoing**(3 个):assignee 成功启动 / 无 assignee 失败 / 非 assignee 被 403 拒绝
|
||||||
|
- **TestUndergoingToCompleted**(4 个):带 comment 成功 / 无 comment 失败 / 空白 comment 失败 / 非 assignee 被 403 拒绝
|
||||||
|
- **TestCloseTask**(6 个):pending/open/undergoing 可关闭 / completed/closed 终态拒绝 / 无权限 403
|
||||||
|
- **TestReopen**(3 个):completed→open 成功 + finished_on 清除 / closed→open 成功 / 无权限 403
|
||||||
|
- **TestInvalidTransitions**(10 个参数化):10 种非法状态流转全部返回 400
|
||||||
|
- **TestEditRestrictions**(4 个):undergoing 禁止编辑 / completed 禁止编辑 / open+assignee 仅 assignee 可编辑 / open 无 assignee 任何人可编辑
|
||||||
|
- 修复 conftest.py 缺少 webhook model import 导致的 "no such table: webhooks" 错误
|
||||||
|
|
||||||
|
改了哪些关键文件:
|
||||||
|
- `HarborForge.Backend/tests/test_task_transitions.py` — 新增(~530 行)
|
||||||
|
- `HarborForge.Backend/tests/conftest.py` — 新增 webhook model import
|
||||||
|
|
||||||
|
验证结果:
|
||||||
|
- `python3 -m pytest tests/ -v` — **51 passed**(17 milestone + 34 task),0 failed
|
||||||
|
- 已 commit:backend `c21e4ee`
|
||||||
|
|
||||||
|
当前阻塞/风险:
|
||||||
|
- P13.3 propose 后端测试尚未编写
|
||||||
|
- P14 收尾验收未开始
|
||||||
|
- 无本地 MySQL/运行环境做集成验证
|
||||||
|
|
||||||
|
下一轮最建议继续做什么:
|
||||||
|
- P13.3 Propose 后端测试(accept/reject/reopen + feat_task_id 生成 + propose_code 递增)
|
||||||
|
- 或 P14 收尾验收(如果认为核心测试覆盖已足够)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 1. 背景
|
## 1. 背景
|
||||||
|
|||||||
Reference in New Issue
Block a user