1.4 KiB
1.4 KiB
Case: reconcile-maps-done-or-failed-thread-to-terminal-task-state
用例意义
验证 reconcile 会把 worker 侧 thread 的终态同步到 orch 任务,并刷新 run 聚合状态。
前置条件
- 已存在 run 和已 dispatch 的任务
- worker 已对该 thread 完成
done或fail
输入
orch --db TMPDIR/coord.db --json run init --run run_blog_001 --goal "Build blog MVP"
orch --db TMPDIR/coord.db --json task add --run run_blog_001 --task T1 --title "Implement retry policy" --default-to worker-a
orch --db TMPDIR/coord.db --json dispatch --run run_blog_001 --task T1 --execution-mode analysis --body "Implement retry handling for the HTTP client."
inbox --db TMPDIR/coord.db --json claim --agent worker-a --thread THREAD_ID
inbox --db TMPDIR/coord.db --json done --agent worker-a --thread THREAD_ID --summary "Retry policy implemented" --body "The HTTP client now retries transient failures."
orch --db TMPDIR/coord.db --json reconcile --run run_blog_001
orch --db TMPDIR/coord.db --json status --run run_blog_001
预期输出
reconcile退出码为0data.updated_tasks包含T1T1.status == "done";若输入是fail,则应为failed- 后续
status.data.run.status与终态任务聚合结果一致
断言结论
- 任务终态依赖
reconcile落回orch,而不是由 worker 直接改写 task 表 - run 级聚合状态会随终态任务一并刷新