Files
ai-workflow-skill/docs/tests/orch/reconcile/reconcile-maps-claimed-or-in-progress-thread-to-running.md
T

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 --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 退出码为 0
  • data.updated_tasks 长度为 1
  • 唯一更新任务的 status == "running"
  • data.run.run_id == "run_blog_001"

断言结论

  • reconcile 是 leader 侧把 inbox 执行状态投影回 scheduler 状态机的关键同步点
  • claim 与 in-progress 的 worker 信号不会停留在 inbox 层