1.2 KiB
1.2 KiB
Case: dispatch-auto-enables-worktree-for-code-like-task
用例意义
验证 dispatch 在未显式传 worktree flags 时,会对 code-like 任务自动启用 worktree 流程。
前置条件
TMPDIR/repo是一个干净的 Git 仓库- 已存在 code-like 任务
T1
输入
orch --db TMPDIR/coord.db --json run init --run run_blog_auto_worktree_001 --goal "Validate auto worktree detection"
orch --db TMPDIR/coord.db --json task add --run run_blog_auto_worktree_001 --task T1 --title "Implement backend API" --default-to backend-worker
orch --db TMPDIR/coord.db --json dispatch --run run_blog_auto_worktree_001 --task T1 --repo-path TMPDIR/repo
预期输出
dispatch退出码为0data.attempt.worktree_path为非空data.attempt.workspace_status == "created"- 返回的 worktree 路径在磁盘上存在
断言结论
dispatch存在自动 worktree 推断逻辑,不要求 leader 每次显式写--strict-worktree
补充约束
- 当前推断主要依赖任务角色与 acceptance JSON 的 code-like 标记
- 未指定
--workspace-root时,自动 worktree 模式默认写到仓库下的.orch/worktrees