2.3 KiB
2.3 KiB
Case: council-wait-wakes-when-all-reviewers-complete
用例意义
验证 council wait 在三位 reviewer 都完成后会被唤醒,并返回完整 reviewer 状态集合。
前置条件
- 使用隔离的临时目录
TMPDIR - 已通过
council start创建 runcouncil_blog_wait_001 - 本地可使用
sqlite3从task_attempts中读取 reviewer thread ID,用于构造inbox完成态
输入
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退出码为0wait.data.woke == truewait.data.all_complete == truewait.data.reviewers长度为3- 三个 reviewer 的
status都是done
断言结论
council wait的唤醒条件是“三位 reviewer 全部达到终态成功”- 返回结果不仅告知已唤醒,还会携带完整 reviewer 状态快照,便于 leader 继续执行 tally/report
补充约束
- 当前手工复现实例需要通过
task_attempts提取 reviewerthread_id,因为orchCLI 还不直接暴露 attempt-thread mapping