Files
KDL_WORK/working2/05-验收证据.md
2026-06-28 20:58:18 +08:00

221 lines
12 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 05-验收证据
版本0.1
日期2026-06-28
## 1. 证据状态
| 状态 | 含义 |
| --- | --- |
| 待验证 | 任务尚未执行或未产生产物。 |
| 通过 | 已执行且满足验收标准。 |
| 不通过 | 已执行但不满足验收标准。 |
| 跳过 | 因明确边界暂不执行,必须说明原因。 |
## 2. 基准证据项
| 证据 | 状态 | 目标产物 |
| --- | --- | --- |
| EV-W2-SPEC-001语法覆盖矩阵 | 通过 | `working2/programs/manifest.md``spec-programs/manifest.json` 已覆盖章节 4 到 25。 |
| EV-W2-PROG-010Runtime 程序创建 | 通过 | `kdl-wasm/web/tests/fixtures/abb120/spec-programs/runtime/W2_*.grl` 共 11 个manifest Runtime 层级共 12 项。 |
| EV-W2-PROG-020Error 程序创建 | 通过 | `static/error/W2_E*.grl` 共 5 个,其中 4 个 Static、1 个 Runtime timeout error。 |
| EV-W2-PROG-030Post 程序创建 | 通过 | `post/W2_P*.grl` 共 3 个。 |
| EV-W2-RUN-001suite runner | 通过 | `kdl-wasm/web/test-results/abb120-spec/W2-JOB-20260628082622-51484d62/job.json`。 |
| EV-W2-RUN-030虚拟控制器执行 | 通过 | 每个 runtime 程序输出 `controller.json``trace.json``motion-queue.json`。 |
| EV-W2-RUN-040逐帧轨迹 | 通过 | Runtime 轨迹 `trajectory.json` 包含 `frames[]`,每帧包含 joints[6]、TCP position[3] 和 TCP quaternion[4]。 |
| EV-W2-RUN-050IO/wait/pulse | 通过 | `W2_60_IOWaitPulse``W2_E50_RuntimeTimeout` 输出 IO/wait/pulse/timeout trace。 |
| EV-W2-POST-010三品牌输出 | 通过 | `post-report.json` 记录 ABB/FANUC/KUKA 文件名和 report。 |
| EV-W2-POST-020roundtrip | 通过 | `roundtrip.json` 记录 ABB import 回读状态和 diagnostics。 |
| EV-W2-UI-020HTML 截图 | 通过 | `kdl-wasm/web/test-results/virtual-controller/virtual-controller-desktop.png``virtual-controller-mobile.png``evidence.json`。 |
| EV-W2-CI-900全量命令 | 通过 | `npm run typecheck``npm test``npm run verify:virtual-controller` 全部通过WASM native build 未执行。 |
| EV-W2-DEPLOY-001演示包 manifest | 通过 | `demo-manifest.json` 包含 release_id、job_id、19 个程序、报告、截图、文档入口。 |
| EV-W2-DEPLOY-020演示包 zip | 通过 | `kdl-wasm/web/test-results/deploy/kdl-olp-demo-20260628-164048-W2-JOB-20260628082622-51484d62.zip`。 |
| EV-W2-DEPLOY-040HTTPS 发布 | 通过 | `https://82.156.24.101:8095/` 可访问首页、虚拟控制器、report、截图和逐帧轨迹 JSON。 |
| EV-W2-DEPLOY-050远程 smoke test | 通过 | `kdl-wasm/web/test-results/deploy/kdl-olp-demo-20260628-164048-W2-JOB-20260628082622-51484d62.deploy.json``program_count=19``summary.fail=0`。 |
## 3. 建议命令
### 3.1 文档和覆盖矩阵检查
```powershell
rg -n "W2_|通用机器人编程语法规范|Runtime|Static|Post|ABB120|虚拟控制器" working2
```
预期:能找到 README、任务矩阵、验收证据、决策记录和 manifest 中的覆盖项。
### 3.2 GRL 和 ABB120 测试
```powershell
cd E:\Work\kdl_work
npm test -- grl abb120
```
预期GRL parser/semantic、ABB120 fixture、表达式和程序编译测试通过。
### 3.3 虚拟控制器运行测试
```powershell
npm test -- virtual controller runtime
```
预期状态机、IR runtime、motion queue、IO runtime、workbench/debug facade 测试通过。
### 3.4 后处理和导入回读
```powershell
npm test -- post import roundtrip
```
预期ABB/FANUC/KUKA post、brand import、roundtrip diff 测试通过。
### 3.5 HTML 虚拟控制器截图
```powershell
npm run verify:virtual-controller
```
预期桌面和移动截图生成状态交互、Wait 置位和无横向溢出检查通过。
### 3.6 可选 WASM native build
```powershell
cmake --build kdl-wasm/build-wasm -j16
```
预期:当前 Emscripten/Ninja 环境可用时构建通过;如环境缺失,记录为环境阻塞而不是功能通过。
### 3.7 服务器演示包生成
建议后续实现脚本:
```powershell
cd E:\Work\kdl_work
node kdl-wasm/web/scripts/build-demo-package.mjs
node kdl-wasm/web/scripts/verify-demo-package.mjs kdl-wasm/web/test-results/deploy/kdl-olp-demo-<release_id>.zip
```
预期:生成 zip解压校验包含 `index.html``demo-manifest.json`、19 个 `.grl`、最新 `W2-JOB-*`、逐帧 `trajectory.frames`、2 张截图和 2 份 Word 文档。
### 3.8 HTTPS 远程 smoke test
```powershell
$base = "https://82.156.24.101:8095"
curl.exe -k "$base/"
curl.exe -k "$base/demo-manifest.json"
curl.exe -k "$base/spec-programs/manifest.json"
curl.exe -k "$base/app/virtual-controller.html"
curl.exe -k "$base/test-results/abb120-spec/<job_id>/report.json"
curl.exe -k "$base/test-results/virtual-controller/virtual-controller-desktop.png" --output NUL
curl.exe -k "$base/test-results/virtual-controller/virtual-controller-mobile.png" --output NUL
```
预期:
1. 关键 URL 返回 200。
2. `demo-manifest.json``program_count` 为 19。
3. `report.json``summary.fail` 为 0。
4. 浏览器可打开虚拟控制器页面和报告页面。
## 4. 实际产物目录
```text
kdl-wasm/web/test-results/abb120-spec/
W2-JOB-20260628022836-51484d62/
job.json
manifest.json
report.json
report.html
programs/
<program_id>/
compile.json
controller.json
motion-queue.json
trace.json
io.json
trajectory.json
post-report.json
roundtrip.json
```
每个 `job.json` 必须包含:
1. `job_id`
2. `suite_id`
3. `robot_id`
4. `spec_version`
5. `programs`
6. `commands`
7. `status`
8. `diagnostics`
9. `artifact_paths`
## 5. 当前记录
| 时间 | 命令 | 结果 |
| --- | --- | --- |
| 2026-06-28 09:38 Asia/Shanghai | `npm run suite:abb120-spec` | 通过;生成 `W2-JOB-20260628013857-19b5a2c7`18 个程序missingSections 为空。 |
| 2026-06-28 09:40 Asia/Shanghai | `npm run typecheck` | 通过。 |
| 2026-06-28 09:41 Asia/Shanghai | `npm test` | 通过41 个 test files155 个 tests。 |
| 2026-06-28 09:42 Asia/Shanghai | `npm run verify:virtual-controller` | 通过desktop screenshot 49892 bytesmobile screenshot 47887 byteswait=`satisfied`,所有主要面板可见。 |
| 2026-06-28 10:28 Asia/Shanghai | `npm test -- abb120SpecSuite` | 通过manifest 引用、层级、expected status、expected diagnostics 和 W2_99 完整示例证据均通过。 |
| 2026-06-28 10:28 Asia/Shanghai | `npm run typecheck` | 通过。 |
| 2026-06-28 10:28 Asia/Shanghai | `npm run suite:abb120-spec` | 通过;生成 `W2-JOB-20260628022836-51484d62`19 个程序missingSections 为空。 |
| 2026-06-28 10:33 Asia/Shanghai | `npm test` | 通过41 个 test files155 个 tests。 |
| 2026-06-28 10:33 Asia/Shanghai | `npm run verify:virtual-controller` | 通过desktop screenshot 49892 bytesmobile screenshot 47887 byteswait=`satisfied`,所有主要面板可见。 |
| 2026-06-28 12:06 Asia/Shanghai | `npm run demo:build` | 通过;生成 release `20260628-120601-W2-JOB-20260628024709-51484d62`zip 3769732 bytessha256=`e3d936ae5e2c813f80346363b66b82fc19c87fe61ca421ac1b2de2eb4bc1c699`。 |
| 2026-06-28 12:06 Asia/Shanghai | `npm run demo:verify -- kdl-wasm/web/test-results/deploy/kdl-olp-demo-20260628-120601-W2-JOB-20260628024709-51484d62.zip` | 通过;解压后 `program_count=19``.grl=19``summary.fail=0`、截图和 2 份 Word 文档均存在。 |
| 2026-06-28 12:07 Asia/Shanghai | 上传并切换服务器 release | 通过;`current` 指向 `/opt/kdl-olp-demo/8095/releases/20260628-120601-W2-JOB-20260628024709-51484d62``previous` 指向 `/opt/kdl-olp-demo/8095/releases/20260628-120357-W2-JOB-20260628024709-51484d62`,服务 `kdl-site-8095` 为 active。 |
| 2026-06-28 12:07 Asia/Shanghai | HTTPS remote smoke test | 通过;`/``/demo-manifest.json``/spec-programs/manifest.json``/app/virtual-controller.html``report.json``report.html`、desktop/mobile png 全部返回 200`program_count=19``summary.fail=0`。 |
| 2026-06-28 12:15 Asia/Shanghai | `npm run typecheck` | 通过。 |
| 2026-06-28 12:15 Asia/Shanghai | `npm test` | 通过41 个 test files155 个 tests。 |
| 2026-06-28 16:25 Asia/Shanghai | `npm run typecheck` | 通过。 |
| 2026-06-28 16:25 Asia/Shanghai | `npm test -- kdl-wasm/web/tests/integration/abb120SpecSuite.test.ts kdl-wasm/web/tests/integration/abb120SuiteArtifacts.test.ts` | 通过5 个 integration tests 通过,包含逐帧 trajectory 断言。 |
| 2026-06-28 16:26 Asia/Shanghai | `npm run suite:abb120-spec` | 通过;生成 `W2-JOB-20260628082622-51484d62`19 个程序missingSections 为空。 |
| 2026-06-28 16:28 Asia/Shanghai | `npm run verify:virtual-controller` | 通过desktop screenshot 45302 bytesmobile screenshot 40407 bytes`Run` 后 state=`running`DI wait=`satisfied`。 |
| 2026-06-28 16:35 Asia/Shanghai | `npm run demo:verify -- kdl-wasm/web/test-results/deploy/kdl-olp-demo-20260628-163458-W2-JOB-20260628082622-51484d62.zip` | 通过;`program_count=19``.grl=19``summary.fail=0``runtime_trajectory_frames=9/12`。 |
| 2026-06-28 16:38 Asia/Shanghai | `powershell -NoProfile -ExecutionPolicy Bypass -File kdl-wasm/web/scripts/deploy-demo-package.ps1 -ZipPath ... -Target abigailaw-8091` | 通过;关键 URL 全部 200`program_count=19``summary.fail=0`,服务 `kdl-site-8095` 自动重启后读取新 release。 |
| 2026-06-28 16:39 Asia/Shanghai | Python HTTPS 远程逐帧轨迹抽查 | 通过;`W2_30_MotionAllTypes` 有 12 帧,`W2_60_IOWaitPulse` 有 4 帧,`W2_99_FullSpecExample` 有 32 帧,均含 joints 和 TCP。 |
### 最新 job
| 项 | 值 |
| --- | --- |
| job_id | `W2-JOB-20260628082622-51484d62` |
| suite_id | `working2-abb120-spec` |
| robot_id | `abb_irb120_3_58` |
| job.json | `kdl-wasm/web/test-results/abb120-spec/W2-JOB-20260628082622-51484d62/job.json` |
| report.html | `kdl-wasm/web/test-results/abb120-spec/W2-JOB-20260628082622-51484d62/report.html` |
| HTML screenshots | `kdl-wasm/web/test-results/virtual-controller/` |
## 6. 服务器发布证据记录模板
| 项 | 值 |
| --- | --- |
| release_id | `20260628-164048-W2-JOB-20260628082622-51484d62` |
| zip 路径 | `kdl-wasm/web/test-results/deploy/kdl-olp-demo-20260628-164048-W2-JOB-20260628082622-51484d62.zip` |
| zip hash | 见同目录 `kdl-olp-demo-20260628-164048-W2-JOB-20260628082622-51484d62.summary.json`。 |
| job_id | `W2-JOB-20260628082622-51484d62` |
| 发布地址 | `https://82.156.24.101:8095/` |
| 服务器 release 目录 | `/opt/kdl-olp-demo/8095/releases/20260628-164048-W2-JOB-20260628082622-51484d62` |
| current 指向 | `/opt/kdl-olp-demo/8095/releases/20260628-164048-W2-JOB-20260628082622-51484d62` |
| smoke test 时间 | `2026-06-28 16:40 Asia/Shanghai` |
| smoke test 结果 | 通过;关键 URL 全部 200`program_count=19``summary.fail=0`。 |
| 回滚目录 | `/opt/kdl-olp-demo/8095/releases/20260628-163458-W2-JOB-20260628082622-51484d62` |
## 7. 远程页面人工验收记录模板
| 演示项 | 程序或页面 | 结果 | 备注 |
| --- | --- | --- | --- |
| 首页打开 | `/` | 通过 | HTTP 200返回 11199 bytes。 |
| manifest 打开 | `/demo-manifest.json` | 通过 | HTTP 200`program_count=19`。 |
| 虚拟控制器打开 | `/app/virtual-controller.html` | 通过 | HTTP 200页面包含 Program 下拉、Frame slider 和 `Trajectory Frames` 表格。 |
| 报告打开 | `/test-results/abb120-spec/W2-JOB-20260628082622-51484d62/report.html` | 通过 | HTTP 200返回 2266 bytes。 |
| 最小运动演示 | `W2_00_MinimalModule` | 通过 | 程序源和 compile artifact 均在 manifest 中可跳转。 |
| 三类运动演示 | `W2_30_MotionAllTypes` | 通过 | 远程 `trajectory.json` 有 12 帧,每帧包含 TCP 和 J1-J6。 |
| IO/wait/pulse 演示 | `W2_60_IOWaitPulse` | 通过 | 远程 `trajectory.json` 有 4 帧;页面 DI1 可将 wait 切到 `satisfied`。 |
| 完整示例演示 | `W2_99_FullSpecExample` | 通过 | 远程 `trajectory.json` 有 32 帧,每帧包含 TCP 和 J1-J6。 |
| 静态诊断展示 | `W2_E10``W2_E40` | 通过 | `report.json` 中保留 expected diagnostics`summary.fail=0`。 |
| 后处理展示 | `W2_P10``W2_P30` | 通过 | post/roundtrip artifacts 均在 package 内。 |
| 桌面截图打开 | `virtual-controller-desktop.png` | 通过 | HTTP 20045302 bytes。 |
| 移动截图打开 | `virtual-controller-mobile.png` | 通过 | HTTP 20040407 bytes。 |