Files
ai-workflow-skill/docs/tests/orch/dispatch/dispatch-requires-explicit-execution-mode.md
T

964 B

Case: dispatch-requires-explicit-execution-mode

用例意义

验证 dispatch 不再做 worktree heuristics,而是要求 caller 显式声明 --execution-mode analysis|code

前置条件

  • 已存在 run run_blog_auto_worktree_001
  • 已存在任务 T1

输入

orch --db TMPDIR/coord.db --json run init --run run_blog_auto_worktree_001 --goal "Validate explicit execution mode"
orch --db TMPDIR/coord.db --json task add --run run_blog_auto_worktree_001 --task T1 --title "Implement backend API" --default-to worker-a
orch --db TMPDIR/coord.db --json dispatch --run run_blog_auto_worktree_001 --task T1

预期输出

  • dispatch 退出码为 30
  • JSON 错误码为 invalid_input
  • 错误消息指出必须提供 --execution-mode

断言结论

  • dispatch 的执行模式是显式契约,而不是由 runtime 根据任务元数据自行猜测
  • leader 必须对 thread-only 与 worktree-backed 执行路径负责