1.4 KiB
1.4 KiB
Case: reconcile-maps-claimed-or-in-progress-thread-to-running
用例意义
验证 reconcile 会把 worker 侧的 claim / in_progress 进展同步回 orch,将任务推进到 running。
前置条件
- 已存在 run
run_blog_001 - 任务
T1已通过dispatch创建 attempt 和 thread - worker 已对该 thread 完成
claim,并可选地追加in_progress更新
输入
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 update --agent worker-a --thread THREAD_ID --status in_progress --summary "Implementation started"
orch --db TMPDIR/coord.db --json reconcile --run run_blog_001
预期输出
reconcile退出码为0data.updated_tasks长度为1- 唯一更新任务的
status == "running" data.run.run_id == "run_blog_001"
断言结论
reconcile是 leader 侧把 inbox 执行状态投影回 scheduler 状态机的关键同步点- claim 与 in-progress 的 worker 信号不会停留在 inbox 层