Files
ai-workflow-skill/docs/tests/inbox/update/update-moves-thread-to-in-progress.md
T

35 lines
987 B
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: `update-moves-thread-to-in-progress`
## 用例意义
验证租约拥有者可以把线程推进到 `in_progress`,并生成进度消息。
## 前置条件
- `worker-a` 已成功 `claim` 线程 `THREAD_ID`
## 输入
```bash
inbox --db TMPDIR/coord.db --json update --agent worker-a --thread THREAD_ID --status in_progress --summary "Implementation started" --body "Scanning current HTTP client usage."
```
## 预期输出
- 命令退出码为 `0`
- `thread.status == "in_progress"`
- `message.kind == "progress"`
- `message.to_agent` 指向线程创建者
## 断言结论
- `update` 会把状态推进和消息追加合并为同一次事务
## 补充约束
- `update` 只接受 `in_progress``blocked` 两种 `--status`;其他值应返回退出码 `30` 与错误码 `invalid_input`
- `update` 依赖活跃 lease
- 若线程存在活跃 lease 但归属其他 agent,应返回 `lease_conflict`
- 若线程当前没有活跃 lease,应返回 `invalid_state`