docs: split inbox test plans into case files

This commit is contained in:
2026-03-19 11:29:17 +08:00
parent 9beb7e93eb
commit 5f59350577
70 changed files with 1820 additions and 1606 deletions
@@ -0,0 +1,34 @@
# Case: `done-persists-result-body-and-artifact`
## 用例意义
验证 `done` 能持久化结果正文与附件,并被后续 `show` 读取。
## 前置条件
- `worker-a` 已成功 `claim` 线程 `THREAD_ID`
- `TMPDIR/result.md` 已存在
## 输入
```bash
inbox --db TMPDIR/coord.db --json done --agent worker-a --thread THREAD_ID --summary "Retry policy implemented" --body-file TMPDIR/result.md --artifact TMPDIR/result.md --artifact-kind report
inbox --db TMPDIR/coord.db --json show --thread THREAD_ID
```
## 预期输出
- `done` 成功
- 最终结果消息 `body` 等于文件内容
- 结果消息包含 1 个 `report` artifact
## 断言结论
- `done` 是结果交付命令,不只是状态切换命令
- `done` 也支持 `--payload-json`;若传入非法 JSON,应返回 `invalid_input`
## 补充约束
- `--body``--body-file` 互斥;不可读的 `--body-file` 也属于 `invalid_input`
- artifact 相关 flag 依赖至少一个 `--artifact`,并遵守“指定一次或按 artifact 数量逐个指定”的计数规则