docs: split inbox test plans into case files
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# Case: `fail-persists-failure-body-and-artifact`
|
||||
|
||||
## 用例意义
|
||||
|
||||
验证 `fail` 能持久化失败说明与附件。
|
||||
|
||||
## 前置条件
|
||||
|
||||
- `worker-b` 已成功 `claim` 线程 `THREAD_ID`
|
||||
- `TMPDIR/failure.md` 已存在
|
||||
|
||||
## 输入
|
||||
|
||||
```bash
|
||||
inbox --db TMPDIR/coord.db --json fail --agent worker-b --thread THREAD_ID --summary "Migration failed" --body-file TMPDIR/failure.md --artifact TMPDIR/failure.md --artifact-kind report
|
||||
inbox --db TMPDIR/coord.db --json show --thread THREAD_ID
|
||||
```
|
||||
|
||||
## 预期输出
|
||||
|
||||
- `fail` 成功
|
||||
- 最终结果消息 `body` 等于文件内容
|
||||
- 结果消息包含 1 个 `report` artifact
|
||||
|
||||
## 断言结论
|
||||
|
||||
- 失败终态同样要能完整交付排障材料
|
||||
|
||||
## 补充约束
|
||||
|
||||
- `--payload-json` 需要是合法 JSON;空值会按 `{}` 处理
|
||||
- `--body` 与 `--body-file` 互斥;不可读的 `--body-file` 属于 `invalid_input`
|
||||
- `artifact-kind` 和 `artifact-metadata-json` 不能脱离 `--artifact` 单独使用,且多值数量必须满足“一次全量应用”或“逐 artifact 对齐”
|
||||
|
||||
Reference in New Issue
Block a user