docs: split inbox test plans into case files
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
# Case: `claim-rejects-when-thread-already-claimed`
|
||||
|
||||
## 用例意义
|
||||
|
||||
验证同一线程在已有活跃租约时,其他执行者无法重复领取。
|
||||
|
||||
## 前置条件
|
||||
|
||||
- `worker-z` 已成功 `claim` 线程 `THREAD_ID`
|
||||
|
||||
## 输入
|
||||
|
||||
```bash
|
||||
inbox --db TMPDIR/coord.db --json claim --agent worker-y --thread THREAD_ID
|
||||
```
|
||||
|
||||
## 预期输出
|
||||
|
||||
- 退出码为 `20`
|
||||
- JSON 错误码为 `lease_conflict`
|
||||
|
||||
## 断言结论
|
||||
|
||||
- 活跃 lease 是 `claim` 的排他条件
|
||||
|
||||
## 补充约束
|
||||
|
||||
- `claim` 只允许作用在 `pending` 线程上;如果线程已是 `claimed`、`in_progress`、`blocked`,或已进入任一终态,则应返回 `invalid_state`,而不是 `lease_conflict`
|
||||
Reference in New Issue
Block a user