Author orch Markdown test plan
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
# Case: `dispatch-allows-explicit-base-ref-on-dirty-repo`
|
||||
|
||||
## 用例意义
|
||||
|
||||
验证 strict worktree dispatch 在仓库已变脏时,只要显式给出可解析的 `--base-ref`,仍可继续创建 attempt。
|
||||
|
||||
## 前置条件
|
||||
|
||||
- `TMPDIR/repo` 是一个 Git 仓库
|
||||
- 仓库工作区存在未提交变更
|
||||
- `HEAD` 仍指向合法 commit
|
||||
- 已存在 run `run_blog_worktree_003` 与任务 `T1`
|
||||
|
||||
## 输入
|
||||
|
||||
```bash
|
||||
orch --db TMPDIR/coord.db --json run init --run run_blog_worktree_003 --goal "Validate explicit base ref on dirty repo"
|
||||
orch --db TMPDIR/coord.db --json task add --run run_blog_worktree_003 --task T1 --title "Implement backend" --default-to worker-a
|
||||
orch --db TMPDIR/coord.db --json dispatch --run run_blog_worktree_003 --task T1 --repo-path TMPDIR/repo --workspace-root .orch/worktrees --strict-worktree --base-ref HEAD
|
||||
```
|
||||
|
||||
## 预期输出
|
||||
|
||||
- `dispatch` 退出码为 `0`
|
||||
- `data.attempt.base_ref == "HEAD"`
|
||||
- `data.attempt.base_commit` 等于 dirty 之前当前可解析的 `HEAD` commit
|
||||
|
||||
## 断言结论
|
||||
|
||||
- `--base-ref` 是 dirty repo strict dispatch 的显式解锁条件
|
||||
- worktree 基线来自 commit,而不是当前未提交工作区内容
|
||||
Reference in New Issue
Block a user