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: `fail-marks-thread-failed`
## 用例意义
验证租约拥有者可以把线程推进到 `failed` 终态,并生成失败结果消息。
## 前置条件
- `worker-b` 已成功 `claim` 线程 `THREAD_ID`
## 输入
```bash
inbox --db TMPDIR/coord.db --json fail --agent worker-b --thread THREAD_ID --summary "Migration failed" --body "The migration cannot proceed because the prior schema is inconsistent."
```
## 预期输出
- 命令退出码为 `0`
- `thread.status == "failed"`
- `message.kind == "result"`
## 断言结论
- `fail``done` 共享结果消息模型,但进入的是失败终态
- 成功 `fail` 后会释放当前活跃 lease,避免线程停留在失败终态却仍显示被占用
## 补充约束
-`--agent` 未显式提供时,可以回退使用根级 `--agent`
- `fail` 生成的 `result` 消息会发回线程创建者,而不是发给当前执行者自己
- 如果线程没有活跃 lease`fail` 应返回 `invalid_state`,而不是 `lease_conflict`