54 lines
2.3 KiB
Markdown
54 lines
2.3 KiB
Markdown
# Case: `council-wait-wakes-when-all-reviewers-complete`
|
|
|
|
## 用例意义
|
|
|
|
验证 `council wait` 在三位 reviewer 都完成后会被唤醒,并返回完整 reviewer 状态集合。
|
|
|
|
## 前置条件
|
|
|
|
- 使用隔离的临时目录 `TMPDIR`
|
|
- 已通过 `council start` 创建 run `council_blog_wait_001`
|
|
- 本地可使用 `sqlite3` 从 `task_attempts` 中读取 reviewer thread ID,用于构造 `inbox` 完成态
|
|
|
|
## 输入
|
|
|
|
```bash
|
|
orch --db TMPDIR/coord.db --json council start \
|
|
--run council_blog_wait_001 \
|
|
--target "Review the current blog architecture."
|
|
|
|
THREAD_ID_CR1=$(sqlite3 TMPDIR/coord.db "SELECT thread_id FROM task_attempts WHERE run_id = 'council_blog_wait_001' AND task_id = 'CR1' AND attempt_no = 1;")
|
|
THREAD_ID_CR2=$(sqlite3 TMPDIR/coord.db "SELECT thread_id FROM task_attempts WHERE run_id = 'council_blog_wait_001' AND task_id = 'CR2' AND attempt_no = 1;")
|
|
THREAD_ID_CR3=$(sqlite3 TMPDIR/coord.db "SELECT thread_id FROM task_attempts WHERE run_id = 'council_blog_wait_001' AND task_id = 'CR3' AND attempt_no = 1;")
|
|
|
|
inbox --db TMPDIR/coord.db --json claim --agent architecture-reviewer --thread "$THREAD_ID_CR1"
|
|
inbox --db TMPDIR/coord.db --json done --agent architecture-reviewer --thread "$THREAD_ID_CR1" --summary "Review complete"
|
|
|
|
inbox --db TMPDIR/coord.db --json claim --agent implementation-reviewer --thread "$THREAD_ID_CR2"
|
|
inbox --db TMPDIR/coord.db --json done --agent implementation-reviewer --thread "$THREAD_ID_CR2" --summary "Review complete"
|
|
|
|
inbox --db TMPDIR/coord.db --json claim --agent risk-reviewer --thread "$THREAD_ID_CR3"
|
|
inbox --db TMPDIR/coord.db --json done --agent risk-reviewer --thread "$THREAD_ID_CR3" --summary "Review complete"
|
|
|
|
orch --db TMPDIR/coord.db --json council wait \
|
|
--run council_blog_wait_001 \
|
|
--timeout-seconds 2
|
|
```
|
|
|
|
## 预期输出
|
|
|
|
- `council wait` 退出码为 `0`
|
|
- `wait.data.woke == true`
|
|
- `wait.data.all_complete == true`
|
|
- `wait.data.reviewers` 长度为 `3`
|
|
- 三个 reviewer 的 `status` 都是 `done`
|
|
|
|
## 断言结论
|
|
|
|
- `council wait` 的唤醒条件是“三位 reviewer 全部达到终态成功”
|
|
- 返回结果不仅告知已唤醒,还会携带完整 reviewer 状态快照,便于 leader 继续执行 tally/report
|
|
|
|
## 补充约束
|
|
|
|
- 当前手工复现实例需要通过 `task_attempts` 提取 reviewer `thread_id`,因为 `orch` CLI 还不直接暴露 attempt-thread mapping
|