Files
ai-workflow-skill/docs/tests/inbox/send/send-creates-new-thread.md
T

37 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Case: `send-creates-new-thread`
## 用例意义
验证 `send` 在未指定既有线程时会创建新线程,并写入首条任务消息。
## 前置条件
- 空数据库已完成 `init`
## 输入
```bash
inbox --db TMPDIR/coord.db --json send --from leader --to worker-a --subject "Implement feature X" --summary "Add retry policy" --body "Implement retry handling for the HTTP client." --run run_blog_001 --task T1
```
## 预期输出
- 命令退出码为 `0`
- 返回 `thread.thread_id`
- `thread.status == "pending"`
- `thread.created_by == "leader"`
- `thread.assigned_to == "worker-a"`
- `message.kind == "task"`
## 断言结论
- `send` 会新建线程而不是只插入孤立消息
- 新线程的默认初始状态是 `pending`
## 补充约束
- `--from` 未显式传入时,会回退使用根级 `--agent`
- 新建线程时未显式传 `--summary`,会回退到 `--subject`
- 新建线程时 `--kind` 默认是 `task``--priority` 默认是 `normal`
-`--thread` 指向不存在的线程时,`send` 会使用该 thread ID 新建线程,而不是返回 `not_found`