Add spec-aware orch tasks and verification gates
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
# Orch `verify` Test Plan Index
|
||||
|
||||
## Case Files
|
||||
|
||||
| Case Slug | File | Coverage Note |
|
||||
| --- | --- | --- |
|
||||
| `verify-status-returns-spec-and-gate-for-task` | [verify-status-returns-spec-and-gate-for-task.md](./verify-status-returns-spec-and-gate-for-task.md) | returns the selected task, latest attempt, spec snapshot, and current gate state |
|
||||
| `verify-record-updates-gate-and-marks-task-done-when-required-checks-pass` | [verify-record-updates-gate-and-marks-task-done-when-required-checks-pass.md](./verify-record-updates-gate-and-marks-task-done-when-required-checks-pass.md) | records named checks, recomputes the gate, and promotes the task to `done` when all required checks pass |
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
# Case: `verify-record-updates-gate-and-marks-task-done-when-required-checks-pass`
|
||||
|
||||
## 用例意义
|
||||
|
||||
验证 `verify record` 在逐个记录 required checks 后,会重新计算 gate,并在所有必过项通过时把 task 从 `verifying` 推进到 `done`。
|
||||
|
||||
## 前置条件
|
||||
|
||||
- 已存在处于 `verifying` 的任务 `T1`
|
||||
- 该任务的 required checks 为 `lint` 与 `test`
|
||||
|
||||
## 输入
|
||||
|
||||
```bash
|
||||
orch --db TMPDIR/coord.db --json verify record --run run_verify_001 --task T1 --check lint --status passed --summary "lint clean"
|
||||
orch --db TMPDIR/coord.db --json verify record --run run_verify_001 --task T1 --check test --status passed --summary "tests clean"
|
||||
orch --db TMPDIR/coord.db --json status --run run_verify_001
|
||||
```
|
||||
|
||||
## 预期输出
|
||||
|
||||
- 第一次 `verify record` 后:
|
||||
- `data.task.status == "verifying"`
|
||||
- `data.gate.status == "pending"`
|
||||
- `data.gate.pending_checks` 仍包含 `test`
|
||||
- 第二次 `verify record` 后:
|
||||
- `data.task.status == "done"`
|
||||
- `data.gate.status == "passed"`
|
||||
- `data.gate.pending_checks` 为空
|
||||
- 后续 `status.data.run.status == "done"`
|
||||
|
||||
## 断言结论
|
||||
|
||||
- `verify record` 不是单纯写一条 check 日志;它会驱动 gate 和 task 状态机前进
|
||||
- 只有所有 required checks 通过,task 才会真正完成
|
||||
@@ -0,0 +1,32 @@
|
||||
# Case: `verify-status-returns-spec-and-gate-for-task`
|
||||
|
||||
## 用例意义
|
||||
|
||||
验证 `verify status` 能把 task 的验证上下文一次性展示出来,而不是要求 leader 手工拼装 task、attempt、spec 与 check 结果。
|
||||
|
||||
## 前置条件
|
||||
|
||||
- 已存在带 required checks 的任务
|
||||
- 该任务已经经过 `reconcile` 进入 `verifying`
|
||||
|
||||
## 输入
|
||||
|
||||
```bash
|
||||
orch --db TMPDIR/coord.db --json verify status --run run_verify_001 --task T1
|
||||
```
|
||||
|
||||
## 预期输出
|
||||
|
||||
- `verify status` 退出码为 `0`
|
||||
- `data.task.task_id == "T1"`
|
||||
- `data.attempt.attempt_no == 1`
|
||||
- `data.spec.spec_file` 非空
|
||||
- `data.spec.check_profile == "cadence_component"`
|
||||
- `data.gate.status == "pending"`
|
||||
- `data.gate.required_checks` 包含 `lint` 与 `test`
|
||||
- `data.gate.pending_checks` 在首次查询时仍包含所有未通过检查
|
||||
|
||||
## 断言结论
|
||||
|
||||
- `verify status` 是 leader 查看 gate 的主入口,而不是只返回 task 表里的裸状态
|
||||
- gate 是否仍在等待检查、已经失败、还是已经通过,都应在一个响应里可见
|
||||
Reference in New Issue
Block a user