docs(test): nightly advance report 2026-09-28
This commit is contained in:
@@ -0,0 +1,114 @@
|
||||
# 夜间推进自动化 测试报告
|
||||
|
||||
## 一、 测试背景 (Background)
|
||||
|
||||
每日 03:10 的设计目标是无人值守推进 `.worktrees/` 下的分支任务、经治理门禁合入 `dev`、在 tip 变化时更新 dev 服务,并在确认无内容丢失后清理已收口目录。本报告归档 run `20260928T064350Z` 的真实执行结果。该次运行不是满队列夜间清扫:编排进程为 `python3 -B scripts/nightly/advance.py --repo /home/weichen/projects/Agent-System --max-tasks 1 --task-timeout 300`(与 run 目录时间戳同时启动)。
|
||||
|
||||
## 二、 测试目标 (Test Objectives)
|
||||
|
||||
- 计划构建能列出当夜待处理条目(`plan.json`)。
|
||||
- 在 `--max-tasks 1` 上限内,对第一条非清理任务执行无头推进,并留下 result、耗时与日志。
|
||||
- `dev` tip 未变化时不重建服务(`env.json`)。
|
||||
- 清理阶段对计划中的 `cleanup_verify` 条目做祖先与干净检查;不满足则保留目录。
|
||||
- 报告引用 run 目录数据,不把未执行项记为通过。
|
||||
|
||||
## 三、 测试方案与环境 (Test Plan & Environment)
|
||||
|
||||
- 操作系统:Linux。
|
||||
- 主仓:`/home/weichen/projects/Agent-System`(分支 `dev`)。
|
||||
- 报告工作区:`/home/weichen/projects/Agent-System/.worktrees/nightly-advance-automation-2026-09-28`。
|
||||
- 设计触发:cron `10 3 * * *` → `scripts/nightly-advance.sh`(任务文档约定)。本次 run 的实际入口是上面的 `advance.py --max-tasks 1 --task-timeout 300`。
|
||||
- 执行器:cursor-agent 无头模式;agentctl daemon。`state.json` 记录 `daemon=ok`。
|
||||
- run 目录:`/home/weichen/projects/Agent-System/.tmp/nightly/20260928T064350Z`。
|
||||
- 证据(相对主仓):
|
||||
- `.tmp/nightly/20260928T064350Z/state.json`
|
||||
- `.tmp/nightly/20260928T064350Z/plan.json`
|
||||
- `.tmp/nightly/20260928T064350Z/advance.json`
|
||||
- `.tmp/nightly/20260928T064350Z/env.json`
|
||||
- `.tmp/nightly/20260928T064350Z/cleanup.json`
|
||||
- `.tmp/nightly/20260928T064350Z/agent-00-integrate-agent-reply-llm-narrative-2026-09-28.log`
|
||||
- 层级:工程工具夜间编排的一次有界实跑。产品 PI 全链路不适用;本文件不把该次运行记成产品测试 PASS。
|
||||
|
||||
## 四、 预期结果 (Expected Results)
|
||||
|
||||
- 活跃或待合入任务按计划推进、合入,或带原因 `blocked` / `failed`。
|
||||
- `dev` tip 变化时重建服务并通过 `/health` 与 `/ready`;tip 不变则服务阶段为 `not_required`。
|
||||
- 已完成且内容已在 `dev` 上、工作树干净的目录,经普通删除后移除;祖先检查失败则保留。
|
||||
- 每个实际执行的任务在本报告中有 result、耗时和证据日志相对路径。
|
||||
|
||||
## 五、 实际测试结果与判定 (Actual Results & Evaluation)
|
||||
|
||||
- 开始:`2026-09-28T06:43:50+00:00`;`dev` 起点 `e5c2519feaeedb689f0c4055e03cbfe65507f719`(`state.json` 的 `dev_tip_start`)。
|
||||
- 草稿落盘时刻:`2026-09-28T06:45:07+00:00`;`dev` 终点与起点相同(`dev_tip_end` / `dev_tip_final` 均为 `e5c2519feaeedb689f0c4055e03cbfe65507f719`)。
|
||||
- `dev` 变更:否。
|
||||
- 计划生成:`plan.json` `generated_at=2026-09-28T06:43:54`,`count=11`。
|
||||
|
||||
### 用例 1:integrate-agent-reply-llm-narrative-2026-09-28
|
||||
|
||||
- **测试输入 (Input)**:`plan.json` 第 1 条。`phase=integrate_closeout`,worktree `/home/weichen/projects/Agent-System/.worktrees/integrate-agent-reply-llm-narrative-2026-09-28`,`base_feature=agent-reply-llm-narrative`,blockers 为 `not_ancestor_of_dev`、`dirty_or_ignored_files`。编排上限 `--max-tasks 1`,因此只把这一条交给无头执行器。
|
||||
- **实际输出 (Actual Output)**:`advance.json` 记录 `rc=0`,`duration_s=71.6`,`phase=integrate_closeout`,`branch=null`,`owner=null`。日志末行:
|
||||
|
||||
```text
|
||||
{"task_id":"integrate-agent-reply-llm-narrative-2026-09-28","result":"merged","summary":"功能尖 dfd9f6ef 已由 4c42d1bf 合入 dev,当前候选第一父落后于 dev,未重建","new_dev_tip":"e5c2519feaeedb689f0c4055e03cbfe65507f719"}
|
||||
```
|
||||
|
||||
日志正文记录:工作树干净;冻结 HEAD `cb0ccf33fe58b2aa8aa84a1fc5fc3aebbcaf996f`,第一父 `8f77053f5169502eaf3e4e4135a082e8914f3704`;功能尖 `dfd9f6efb374c12bec7dd90b214c40f44cc0fee6` 已是当前 `dev` 的祖先,由 `4c42d1bf74e262930bcf127e517ab6b76a0dda71` 带入。未重新入队,未重建候选。
|
||||
|
||||
- **评价判定 (Evaluation / Verdict)**:PASS(`result=merged`)。
|
||||
- **性能与耗时 (Duration & Latency)**:71.6 秒。
|
||||
- **证据日志**:`.tmp/nightly/20260928T064350Z/agent-00-integrate-agent-reply-llm-narrative-2026-09-28.log`
|
||||
|
||||
### 用例 2:计划内未交给执行器的条目
|
||||
|
||||
`advance.json` 只有 1 条。下列 8 条在 `plan.json` 中、且阶段不是 `cleanup_verify`,本次没有对应 agent 日志。判定为未运行,不记 PASS。
|
||||
|
||||
| task | phase | 判定 | 耗时 | 证据 |
|
||||
|---|---|---|---|---|
|
||||
| integrate-agent-reply-llm-narrative-2026-09-28-r2 | integrate_closeout | 未运行 | — | 无 agent 日志;见 `.tmp/nightly/20260928T064350Z/plan.json` |
|
||||
| integrate-error-code-observability-2026-09-28 | integrate_closeout | 未运行 | — | 同上 |
|
||||
| integrate-land-promote-rc-beta5-record-2026-09-28 | integrate_closeout | 未运行 | — | 同上 |
|
||||
| integrate-pi-runner-env-mismatch-2026-09-28 | integrate_closeout | 未运行 | — | 同上 |
|
||||
| integrate-quality-gate-heading-mismatch-2026-09-28-r3 | integrate_closeout | 未运行 | — | 同上 |
|
||||
| integrate-test-user-doc-issues-2026-09-28 | integrate_closeout | 未运行 | — | 同上 |
|
||||
| full-system-browser-e2e-wipe-2026-09-26 | feature_advance | 未运行 | — | 同上 |
|
||||
| quality-gate-heading-mismatch-2026-09-28 | feature_advance | 未运行 | — | 同上 |
|
||||
|
||||
### 用例 3:dev 服务
|
||||
|
||||
- **测试输入 (Input)**:`dev_tip_start` 与 `dev_tip_end` 同为 `e5c2519feaeedb689f0c4055e03cbfe65507f719`。
|
||||
- **实际输出 (Actual Output)**:`env.json` 为 `{"dev_tip":"e5c2519feaeedb689f0c4055e03cbfe65507f719","status":"not_required","reason":"dev tip unchanged tonight"}`。无 `/health`、`/ready` 采样。
|
||||
- **评价判定 (Evaluation / Verdict)**:PASS(阶段按设计跳过;服务未重建)。
|
||||
- **性能与耗时 (Duration & Latency)**:`env.json` 未记录单独耗时。
|
||||
- **证据**:`.tmp/nightly/20260928T064350Z/env.json`
|
||||
|
||||
### 用例 4:清理
|
||||
|
||||
两条均来自 `cleanup.json`。`registry_state=done`,`ancestor_of_dev=false`,`clean=true`,`dirty_sample=[]`,`verdict=skip_not_on_dev`。未调用删除。
|
||||
|
||||
| worktree | 判定 | 耗时 | 证据 |
|
||||
|---|---|---|---|
|
||||
| integrate-quality-gate-heading-mismatch-2026-09-28-r2 | skip_not_on_dev | 未单独记录 | `.tmp/nightly/20260928T064350Z/cleanup.json` |
|
||||
| integrate-quality-gate-heading-mismatch-2026-09-28-r4 | skip_not_on_dev | 未单独记录 | `.tmp/nightly/20260928T064350Z/cleanup.json` |
|
||||
|
||||
- **评价判定 (Evaluation / Verdict)**:PASS(门禁按「不是 `dev` 祖先则不删」执行;目录保留)。
|
||||
|
||||
## 六、 自动化测试套件汇总 (Test Suite Execution)
|
||||
|
||||
本次夜间 run 没有另跑 `unittest` / `go test`。套件即编排阶段本身:
|
||||
|
||||
| 检查 | 实际 | 判定 |
|
||||
|---|---|---|
|
||||
| 预检 daemon | `state.json` `daemon=ok` | PASS |
|
||||
| plan 构造 | `plan.json` `count=11` | PASS |
|
||||
| 任务推进 | `advance.json` 1 项;`failed`/`blocked` 0 项;另外 8 项因 `--max-tasks 1` 未运行 | 已执行项 PASS |
|
||||
| dev 服务 | `status=not_required` | PASS |
|
||||
| 清理 | 2 项 `skip_not_on_dev`,0 项删除 | PASS |
|
||||
|
||||
## 七、 测试结论与后续优化建议 (Conclusion & Next Steps)
|
||||
|
||||
本次**已执行范围**判定为 PASS:唯一推进项 `result=merged`(71.6 秒),`dev` tip 未变,服务阶段 `not_required`,清理两项因不是 `dev` 祖先而保留。`advance.json` 中没有 `blocked` 或 `failed` 任务,因此没有该类人工裁决点。
|
||||
|
||||
后续(观察项,不是失败裁决):
|
||||
|
||||
1. 满队列尚未覆盖。`--max-tasks 1` 使另外 8 条 `integrate_closeout` / `feature_advance` 未运行。下一次去掉该上限(或显式提高上限)后再归档对应日志。
|
||||
2. 两个 `cleanup_verify` 目录仍在:`integrate-quality-gate-heading-mismatch-2026-09-28-r2` 与 `integrate-quality-gate-heading-mismatch-2026-09-28-r4`。登记状态为 `done`,工作树干净,但分支不是当前 `dev` 的祖先,自动化按门禁跳过删除。若要删除,需人工确认功能内容已经在 `dev` 上,再走普通 `remove`;本运行未使用 `--force`。
|
||||
Reference in New Issue
Block a user