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,33 @@
# Case: `claim-acquires-thread-lease`
## 用例意义
验证 `claim` 可以把 `pending` 线程切换到 `claimed`,并生成租约事件消息。
## 前置条件
- 已存在一个 `pending` 线程 `THREAD_ID`
## 输入
```bash
inbox --db TMPDIR/coord.db --json claim --agent worker-a --thread THREAD_ID --lease-seconds 300
```
## 预期输出
- 命令退出码为 `0`
- `thread.status == "claimed"`
- `thread.assigned_to == "worker-a"`
- `message.kind == "event"`
- `message.summary == "thread claimed"`
## 断言结论
- `claim` 同时更新线程状态与活跃租约
- 成功领取会附带一条事件消息,而不是静默改状态
- 未显式传 `--lease-seconds`,或传入非正值时,租约时长应回退到默认 `900`
## 补充约束
-`--agent` 未显式提供时,可以回退使用根级 `--agent`