Author orch Markdown test plan

This commit is contained in:
2026-03-19 16:27:28 +08:00
parent b448d98e71
commit a20bec1cac
68 changed files with 2225 additions and 160 deletions
@@ -0,0 +1,34 @@
# Case: `dispatch-rejects-non-ready-task`
## 用例意义
验证 `dispatch` 在任务仍被依赖阻塞时会返回稳定的 `invalid_state` 契约,而不是偷偷创建 attempt。
## 前置条件
- 已存在 run `run_blog_003`
- 任务 `T2` 依赖 `T1`
- `T1` 尚未完成
## 输入
```bash
orch --db TMPDIR/coord.db --json run init --run run_blog_003 --goal "Validate ready gating"
orch --db TMPDIR/coord.db --json task add --run run_blog_003 --task T1 --title "Backend"
orch --db TMPDIR/coord.db --json task add --run run_blog_003 --task T2 --title "Frontend"
orch --db TMPDIR/coord.db --json dep add --run run_blog_003 --task T2 --depends-on T1
orch --db TMPDIR/coord.db --json dispatch --run run_blog_003 --task T2
```
## 预期输出
- `dispatch` 退出码为 `30`
- JSON 错误码为 `invalid_state`
## 断言结论
- 依赖未满足时,`dispatch` 失败得很早,并且不会越过 ready gate
## 补充约束
- 该错误是调度状态错误,不是 `not_found`