32 lines
796 B
Markdown
32 lines
796 B
Markdown
# Case: `reply-attaches-artifact`
|
|
|
|
## 用例意义
|
|
|
|
验证 `reply` 支持追加带附件的答复消息。
|
|
|
|
## 前置条件
|
|
|
|
- 已存在一个非终态线程 `THREAD_ID`
|
|
- `TMPDIR/decision.md` 已存在
|
|
|
|
## 输入
|
|
|
|
```bash
|
|
inbox --db TMPDIR/coord.db --json reply --from leader --to worker-a --thread THREAD_ID --summary "Retry read timeouts" --artifact TMPDIR/decision.md --artifact-kind brief --artifact-metadata-json '{"label":"decision"}'
|
|
```
|
|
|
|
## 预期输出
|
|
|
|
- 命令退出码为 `0`
|
|
- `message.artifacts` 长度为 `1`
|
|
- artifact 路径、kind、metadata 都可读
|
|
|
|
## 断言结论
|
|
|
|
- `reply` 与 `send/update/done/fail` 共享附件写入契约
|
|
|
|
## 补充约束
|
|
|
|
- `artifact-kind` 与 `artifact-metadata-json` 依赖至少一个 `--artifact`;数量不匹配也应返回 `invalid_input`
|
|
|