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
+4 -4
View File
@@ -1,7 +1,7 @@
# Orch `run init` Test Plan Index
## Status
## Case Files
No command case files are authored yet.
Use [../ROADMAP.md](../ROADMAP.md) for planned case slugs and document progress.
| Case Slug | File | Coverage Note |
| --- | --- | --- |
| `run-init-creates-new-run` | [run-init-creates-new-run.md](./run-init-creates-new-run.md) | creates a new active run and persists goal and summary |
@@ -0,0 +1,34 @@
# Case: `run-init-creates-new-run`
## 用例意义
验证 `run init` 会创建新的 orchestration run,并返回稳定的 run 元数据。
## 前置条件
- `TMPDIR/coord.db` 尚不存在或为空路径
## 输入
```bash
orch --db TMPDIR/coord.db --json run init --run run_blog_001 --goal "Build blog MVP" --summary "Public blog plus admin CRUD"
```
## 预期输出
- 命令退出码为 `0`
- `data.run.run_id == "run_blog_001"`
- `data.run.goal == "Build blog MVP"`
- `data.run.summary == "Public blog plus admin CRUD"`
- `data.run.status == "active"`
- 返回 `created_at``updated_at`
## 断言结论
- `run init` 会创建 run 记录,而不是只做内存态初始化
- 新建 run 的默认状态是 `active`
## 补充约束
- `--run``--goal` 是必填;缺失任一项都应返回 `invalid_input`
- 当同一 `run_id` 已存在时,应返回 `invalid_state`,而不是覆盖旧 run