docs: add round 25 dev status — batch transition P5.2-P5.6 sync
This commit is contained in:
@@ -823,6 +823,41 @@
|
||||
- 或 P12.2-P12.3 文档编写(状态机总览 + 权限总览 + propose 流程说明)
|
||||
- 或 P13.1 开始编写 milestone 后端测试
|
||||
|
||||
### 2026-03-18 01:00 UTC(第 25 轮:Batch Transition 全量校验同步 P5.2-P5.6)
|
||||
|
||||
本轮做了什么:
|
||||
- 将 batch transition 接口从"几乎无校验"升级为与单条 transition 完全对齐的安全级别
|
||||
- **新增 `current_user` 依赖注入**:batch 接口现在需要认证(之前完全无 auth)
|
||||
- **新增 `comment` 字段**:`BatchTransitionBody` 替代旧 `BatchTransition`,支持 completion comment
|
||||
- **P5.2 同步**:pending→open 时校验 milestone 必须为 undergoing + task depend_on 依赖检查
|
||||
- **P5.3 同步**:open→undergoing 时校验 assignee 非空且操作者必须是 assignee
|
||||
- **P5.4 同步**:undergoing→completed 时校验 comment 必填 + assignee 身份校验 + 自动创建 Comment 记录
|
||||
- **P5.5 同步**:closed 转换需要 `task.close` 权限
|
||||
- **P5.6 同步**:reopen 需要 `task.reopen_completed` / `task.reopen_closed` 权限,并清除 finished_on
|
||||
- **P3.5 同步**:completed 的 task 触发 milestone auto-complete hook
|
||||
- **Activity log**:每个成功转换的 task 写入 activity log
|
||||
- 所有校验失败的 task 进入 `skipped` 列表而非抛异常(保持 batch 语义:部分成功)
|
||||
- 移除旧 `BatchTransition` 类
|
||||
|
||||
改了哪些关键文件:
|
||||
- `HarborForge.Backend/app/api/routers/tasks.py` — batch transition 重写(+109 行,-18 行)
|
||||
|
||||
验证结果:
|
||||
- Python AST 语法检查通过
|
||||
- 无残留旧 `BatchTransition` 引用
|
||||
- 已 commit:backend `7bad57e`
|
||||
|
||||
当前阻塞/风险:
|
||||
- 前端如果有使用 batch transition 的地方,请求体需要从旧 `BatchTransition` 格式改为 `BatchTransitionBody`(新增可选 `comment` 字段,向后兼容)
|
||||
- P12.2-P12.3 文档(状态机总览、权限总览、propose 流程图)尚未编写
|
||||
- P13 自动化测试未开始
|
||||
- 无本地 MySQL/运行环境做集成验证
|
||||
|
||||
下一轮最建议继续做什么:
|
||||
- P12.2-P12.3 文档编写(状态机总览 + 权限总览 + propose 流程说明)
|
||||
- 或 P13.1 开始编写 milestone/task 后端测试骨架
|
||||
- 或前端排查是否有调用 batch transition 的地方需要适配新请求体
|
||||
|
||||
---
|
||||
|
||||
## 1. 背景
|
||||
|
||||
Reference in New Issue
Block a user