Author orch Markdown test plan
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Orch `retry` Test Plan Index
|
||||
|
||||
## Status
|
||||
## Case Files
|
||||
|
||||
No command case files are authored yet.
|
||||
|
||||
Use [../ROADMAP.md](../ROADMAP.md) for planned case slugs and document progress.
|
||||
| Case Slug | File | Coverage Note |
|
||||
| --- | --- | --- |
|
||||
| `retry-creates-new-attempt-for-failed-task` | [retry-creates-new-attempt-for-failed-task.md](./retry-creates-new-attempt-for-failed-task.md) | creates a successor attempt, thread, and worktree after a failed attempt |
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
# Case: `retry-creates-new-attempt-for-failed-task`
|
||||
|
||||
## 用例意义
|
||||
|
||||
验证 `retry` 会在失败任务上创建新的尝试记录,而不是复用旧线程或旧 worktree。
|
||||
|
||||
## 前置条件
|
||||
|
||||
- 已创建运行 `run_blog_retry_001`
|
||||
- 已创建任务 `T1`
|
||||
- `T1` 已通过严格 worktree 模式完成首次 `dispatch`
|
||||
- `worker-a` 已 `claim` 首次尝试线程并通过 `inbox fail` 把线程推进到 `failed`
|
||||
- 最近一次 `reconcile` 已执行,使任务状态同步为 `failed`
|
||||
- 已知首次尝试的线程为 `OLD_THREAD_ID`,worktree 为 `OLD_WORKTREE_PATH`
|
||||
|
||||
## 输入
|
||||
|
||||
```bash
|
||||
orch --db TMPDIR/coord.db --json retry --run run_blog_retry_001 --task T1 --body "Retry after fixing the failure."
|
||||
```
|
||||
|
||||
## 预期输出
|
||||
|
||||
- 退出码为 `0`
|
||||
- `retry.data.task.status == "dispatched"`
|
||||
- `retry.data.attempt.attempt_no == 2`
|
||||
- `retry.data.attempt.thread_id != OLD_THREAD_ID`
|
||||
- `retry.data.attempt.worktree_path != OLD_WORKTREE_PATH`
|
||||
- 新 worktree 路径在文件系统上存在
|
||||
- `retry.data.previous_attempt.attempt_no == 1`
|
||||
|
||||
## 断言结论
|
||||
|
||||
- `retry` 会为失败任务生成新的执行尝试,而不是把旧尝试重新打开
|
||||
- 对代码任务而言,重试会分配新的 worktree,避免旧失败环境污染下一次执行
|
||||
|
||||
## 补充约束
|
||||
|
||||
- `--to` 可选;未显式传入时,默认沿用当前任务/尝试的既有分配信息
|
||||
- `retry` 支持 `--body-file`,并遵守与 `--body` 的互斥规则
|
||||
Reference in New Issue
Block a user