Files
cnc_wams/完善wasm/working/10-联合验证命令清单.md
2026-07-10 21:26:42 -04:00

252 lines
13 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.
# 10-联合验证命令清单
## 执行原则
1. 只改总控文档时,至少执行语法/文本级检查和目标应用 Node smoke。
2. 修改 `wasm-port` 源码、SDK、工具、测试时执行对应 `wasm-port` 最小 gate。
3. 修改 `web-rtcp-5axis-xyzbc-trt-sim-plan` UI、runtime、profile、staging、evidence 工具时,执行该项目 Node/browser/evidence gate。
4. 修改 LinuxCNC vendor、source manifest、baseline 或核心语义边界时,执行完整联合 gate。
## 基线检查
工作目录:`/home/mes123456/cnc_wams`
```bash
git -C linuxcnc rev-parse HEAD
cd wasm-port
./tools/verify_upstream_baseline.sh
./tools/verify_vendor_sync.sh
./tools/verify_no_standalone_cnc_semantics.sh
```
通过标准:
- LinuxCNC HEAD 为 `60597ee0718873d2449058c824262a275e5e4bad`
- upstream baseline、vendor sync、no-standalone guard 均 0 退出。
## `wasm-port` 核心必跑包
工作目录:`/home/mes123456/cnc_wams/wasm-port`
```bash
./tests/native/verify_native_probes.sh
./tests/native/verify_nc_files.sh
./tests/native/verify_sim_configs.sh
./tests/wasm/node/verify_ini_wasm.sh
./tests/wasm/node/verify_interp_wasm.sh
./tests/wasm/node/verify_sim_configs_wasm.sh
./tests/wasm/node/verify_sim_configs_inventory_wasm.sh
./tests/wasm/node/verify_nc_files_wasm.sh
./tests/wasm/node/verify_tp_wasm.sh
./tests/opfs/node/verify_file_service.sh
./tests/ui/node/verify_ui_node_smokes.sh
```
浏览器和 host gate
```bash
./tests/browser/verify_ini_panel_browser.sh
./tests/browser/verify_interp_browser.sh
./tests/host/verify_host_smokes.sh
```
专项 gate
```bash
./tests/wasm/node/verify_kinematics_wasm.sh
./tests/wasm/node/verify_task_hal_wasm.sh
./tests/wasm/node/verify_python_remap_runtime_port_wasm.sh
./tests/sdk/node/verify_python_remap_runtime_port.sh
./tests/sdk/node/verify_tool_db_node_runtime_adapter.sh
./tests/browser/verify_python_remap_runtime_browser.sh
```
## `xyzbc-trt` Web 应用 gate
工作目录:`/home/mes123456/cnc_wams`
```bash
npm --prefix web-rtcp-5axis-xyzbc-trt-sim-plan/app run smoke:node
npm --prefix web-rtcp-5axis-xyzbc-trt-sim-plan/app run build
npm --prefix web-rtcp-5axis-xyzbc-trt-sim-plan/app run smoke:browser
npm --prefix web-rtcp-5axis-xyzbc-trt-sim-plan/app run smoke:buttons
npm --prefix web-rtcp-5axis-xyzbc-trt-sim-plan/app run evidence:web
npm --prefix web-rtcp-5axis-xyzbc-trt-sim-plan/app run evidence:compare
```
native evidence 采集按该项目 README 的意图应使用本仓库 LinuxCNC
```bash
/home/mes123456/cnc_wams/linuxcnc/scripts/rip-environment \
python3 web-rtcp-5axis-xyzbc-trt-sim-plan/tools/collect-native-xyzbc-trt-evidence.py --run --timeout 90
```
注意:该项目 README 中仍出现历史路径 `/home/mes123456/linuxcnc-master/scripts/rip-environment`,后续应统一改为 `/home/mes123456/cnc_wams/linuxcnc/scripts/rip-environment`,否则会造成 native 基线口径漂移。
## 完整联合 gate
Web software parity 与 release artifact
```bash
cd /home/mes123456/cnc_wams
wasm-port/tests/host/verify_web_software_parity_gate.sh
node wasm-port/tests/sdk/node/verify_project_release_gate_manifest.mjs
node wasm-port/tests/host/write_project_release_readiness_artifact.mjs wasm-port/build/project-release-readiness.json
node wasm-port/tests/host/verify_project_release_readiness_artifact.mjs wasm-port/build/project-release-readiness.json
```
通过标准包括 `web_software_parity_gate=ok`、release gates `14/14 passed`。Tool DB/Python host proof 可按实际机器证据为 true 或 false但 promotion 必须 disabled普通 release 脚本不得包含任何 `ENABLE_*_RUNTIME_PROBE=1`
完整复验顺序:
1. 基线检查。
2. `wasm-port` 核心必跑包。
3. `wasm-port` browser/host gate。
4. `xyzbc-trt` Node/build/browser/buttons gate。
5. native/Web evidence 重采。
6. compare evidence 必须 `failCount=0``blockers=[]`
## 04 文档逐项 gate
04 文档声称 10 个模块、125 个功能项和 3 个受限项。逐项复核时,除完整联合 gate 外,还必须执行以下检查:
```bash
rg -n 'src/emc/rs274ngc|src/emc/task|src/emc/motion|src/hal|src/emc/kinematics|OPFS|用户界面' \
/home/mes123456/cnc_wams/完善wasm/04基于Web的LinuxCNC兼容数控仿真平台.txt
```
逐项登记要求:
- 每个 04 功能项必须写入 `13-04验收文档任务对标矩阵.md` 或其后续明细文件。
- 每个功能项必须至少有一个 LinuxCNC 源码或上游资产路径。
- 每个声称“通过”的功能项必须有 Native/WASM/Browser 中对应层级的最近命令输出或 evidence JSON 字段。
- 受限项必须标为条件通过或 Blocked不能计入无条件完成。
- 若 04 与 `03完全对标...txt` 口径冲突,按 `03` 的更严格证据体系执行。
HAL Scope/Meter 后续专项 gate
```bash
cd wasm-port && node tests/ui/node/verify_hal_meter_evidence.mjs
cd wasm-port && node tests/ui/node/verify_hal_scope_waveform_evidence.mjs
node web-rtcp-5axis-xyzbc-trt-sim-plan/tests/node/verify_hal_meter_scope_evidence.mjs
npm --prefix web-rtcp-5axis-xyzbc-trt-sim-plan/app run evidence:web
npm --prefix web-rtcp-5axis-xyzbc-trt-sim-plan/app run evidence:compare
```
通过标准:
- `hal_meter_evidence` 必须覆盖被声称支持的 pin/signal/parameter 当前值、类型、来源和完整性。
- `hal_scope_waveform_evidence` 必须覆盖采样周期、记录长度、通道、触发、样本序列和 LinuxCNC `halscope` 源码引用。
- 只有截图、canvas 折线或 UI 文本时,不得把 `4.13``10.7` 从条件通过/待实现 gate 晋级为完成。
- `verify_hal_meter_evidence.mjs``verify_hal_scope_waveform_evidence.mjs` 和 Web gate 已落地并通过;`halGraph``halNets`、gmoccapy HAL model 或截图仍不能单独替代 JSON gate。
- 实际 schema、生成路径、最小字段、sample 规则和通过输出见 `23-04-HAL-Meter-Scope-JSON-Evidence-Gate落地蓝图.md`
- `web-xyzbc-trt-evidence.json` 顶层必须出现 `hal_meter_evidence``hal_scope_waveform_evidence``compare-xyzbc-trt-evidence.json` 必须出现对应 comparison 项。
- 上述正式 evidence 和 comparison 项已由 `evidence:web``evidence:compare` 生成并通过,见 `28`
Host runtime evidence gate
```bash
cd wasm-port && node tests/host/verify_host_runtime_opt_in_evidence.mjs
cd wasm-port && node tests/host/verify_host_runtime_promotion_state_machine.mjs
cd wasm-port && node tests/host/verify_project_release_vs_host_promotion.mjs
node web-rtcp-5axis-xyzbc-trt-sim-plan/tests/node/verify_host_runtime_opt_in_evidence.mjs
```
- 普通 gate 不得设置三个 opt-in 环境变量。
- `projectReleaseReady=true``hostPromotionAllowed=false` 必须可以同时成立。
- `ready_disabled_by_default` 不得算 native passPython 单 fixture 不得算 family promotion。
- 当前四个 gate 已通过,见 `29`人工锁、realtime、hardware 未解除。
五轴范围后续专项 gate
```bash
npm --prefix web-rtcp-5axis-xyzbc-trt-sim-plan/app run smoke:node
node web-rtcp-5axis-xyzbc-trt-sim-plan/tests/node/verify_profile_boundary.mjs
node web-rtcp-5axis-xyzbc-trt-sim-plan/tests/node/verify_real_linuxcnc_5axis_program_cases.mjs
node web-rtcp-5axis-xyzbc-trt-sim-plan/tests/node/verify_impeller_feed_task_hal_run.mjs
```
通过标准:
- `xyzbc_trt_web_app_smoke=ok` 只证明默认 `xyzbc-trt` 代表应用。
- profile boundary gate 必须明确 `XYZBC``XYZAC``XYZAB` 各自的 source reference、坐标和 promotion 状态。
- `impeller-7bl-xyzac.ngc``boat-xyzbc.ngc` 等程序证据必须保留 LinuxCNC vendored source guard。
- 04 的 A/C、XYZAB、sphere、impeller 和泛五轴结论不得互相继承。
动态加载/预编译后续专项 gate
```bash
cd wasm-port && ./tests/wasm/node/verify_hal_runtime.sh
cd wasm-port && ./tests/wasm/node/verify_kinematics_wasm.sh
cd wasm-port && ./tools/verify_hal_component_source_sync.sh
cd wasm-port && node tests/wasm/node/verify_hal_component_precompile_manifest.mjs
cd wasm-port && node tests/wasm/node/verify_hal_component_truth_tables.mjs
cd wasm-port && node tests/wasm/node/verify_hal_component_thread_net_execution.mjs
```
通过标准:
- `verify_hal_runtime.sh` 只能证明 virtual HAL pin/signal/param/net/thread 和 `loadrt` 事件边界,不能单独证明 `and2``or2``not``mux2``scale` 组件函数执行。
- `verify_kinematics_wasm.sh` 必须覆盖 `trivkins``5axiskins``xyzac-trt``xyzbc-trt``puma``genser``genhex``pentakins` 等预编译模块的 WASM probe 和 forward/inverse gate。
- `verify_hal_component_source_sync.sh` 已输出 `hal_component_source_sync=ok`;全量 `verify_vendor_sync.sh` 也已在独立 path/hash/provenance overlay 清单下通过。两者只晋级 P1/source boundary不替代组件运行证据。
- `verify_hal_component_precompile_manifest.mjs` 已输出 `hal_component_precompile_manifest=ok`,绑定 source、generator、generated hash、factory 和 allowlist blocked policy。
- `verify_hal_component_truth_tables.mjs` 已输出 `hal_component_truth_tables=ok`,覆盖 `and2`/`or2`/`not` truth table、`mux2` 两路选择和 `scale` 三组浮点公式。
- `verify_hal_component_thread_net_execution.mjs` 已输出 `hal_component_thread_net_execution=ok``unknown_loadrt_component_blocked=ok``hal_component_session_reset=ok`
- 目标 Web `smoke:node` 已输出 `xyzac_trt_hal_component_manifest=ok``xyzac_trt_hal_component_execution=ok``xyzac_trt_unknown_loadrt_blocked=ok`
- 浏览器/WASM 中不得把 `loadrt:<name>` 事件记录宣称为 LinuxCNC 原生运行时动态链接。
- 当前实现缺口见 `21-04-HAL-Component-Precompile-Manifest实现缺口复核.md`native evidence 中的 `loadrt mux2``loadrt scale``addf J*_mux``addf rpm_rps` 只能作为 LinuxCNC 配置来源证据,不能替代 WASM 组件执行 gate。
- 实际落地合同见 `24-04-HAL-Component-Precompile-Manifest-Truth-Table-Gate落地蓝图.md`P1 实施结果见 `26-04-HAL-Component-P1源码同步与哈希Gate实施记录.md`P1 已完成不代表公式、WASM symbol 或真实执行完成。
- `loadrt` 必须实例化 allowlist 组件,`addf` 必须绑定可调用入口servo step 必须更新输出 pin 并传播 signal只追加 `loadrt:`/`call:` event 时 gate 必须失败。
Full-process/realtime 后续专项 gate
```bash
cd wasm-port && ./tests/wasm/node/verify_task_hal_wasm.sh
cd wasm-port && ./tests/wasm/node/verify_hal_runtime.sh
node web-rtcp-5axis-xyzbc-trt-sim-plan/tests/node/verify_full_execution_boundary.mjs
node web-rtcp-5axis-xyzbc-trt-sim-plan/tests/node/verify_linuxcnc_task_hal_runtime.mjs
node web-rtcp-5axis-xyzbc-trt-sim-plan/tests/node/verify_native_task_hal_audit.mjs
npm --prefix web-rtcp-5axis-xyzbc-trt-sim-plan/app run smoke:node
npm --prefix web-rtcp-5axis-xyzbc-trt-sim-plan/app run smoke:browser
```
通过标准:
- `full_execution_boundary_smoke=ok`
- `linuxcnc_task_hal_runtime_smoke=ok``task_hal_machine_file_smoke=ok``switchkins_remap_hal_sync_smoke=ok`
- `native_task_hal_source_artifact_audit=ok`
- readiness artifact 必须保留 `promotion_scope=web_simulation_only`
- `hardware_drive=0``host_realtime_kernel=0``host_external_user_m_process_ready=0``host_tool_db_process_ready=0`
- Browser gate 必须渲染 task/HAL readiness并保留 host realtime false。
- 当前实现缺口见 `22-04-Full-Process-Realtime-Runtime-Proof实现缺口复核.md`;不得把 Web/WASM simulation runtime 的 promotion 误写为宿主 Linux realtime、硬件驱动、完整 native process topology 或任意宿主外部进程已完成。
Host runtime opt-in/promotion 专项 gate
```bash
cd wasm-port && ./tests/docs/node/verify_host_runtime_boundary_docs.sh
cd wasm-port && node tests/host/verify_project_release_readiness_artifact.mjs
cd wasm-port && node tests/host/verify_host_runtime_opt_in_evidence.mjs
cd wasm-port && node tests/host/verify_host_runtime_promotion_state_machine.mjs
cd wasm-port && node tests/host/verify_project_release_vs_host_promotion.mjs
node web-rtcp-5axis-xyzbc-trt-sim-plan/tests/node/verify_full_execution_boundary.mjs
node web-rtcp-5axis-xyzbc-trt-sim-plan/tests/node/verify_native_task_hal_audit.mjs
```
通过标准:
- `ready_disabled_by_default``skipped_*``blocked_*` 不得计为 native pass。
- `runtime_lifecycle_probe_passed` 只能绑定精确 Python fixture不得自动批量晋级 family。
- `project-release-readiness.json``ready=true` 与 host promotion 分开blocked families 和 manual lock 必须保留。
- `hostRealtimeKernel=false``hardwareDrive=false` 不得由 User-M/Tool DB/Python probe 解除。
- 实际 schema、状态机、人工解锁和反向断言见 `25-04-Host-Runtime-Opt-In-Promotion-Evidence-Gate落地蓝图.md`
- 三个 `ENABLE_*_RUNTIME_PROBE=1` 命令只允许人工显式执行,不属于普通 CI/联合 gate。
## 记录要求
每次执行后必须更新:
- `完善wasm/working/03-推进台账.md`
- `完善wasm/working/05-验收证据.md`
- 如结论或边界改变,更新 `完善wasm/working/06-决策记录.md`
- 本仓库根日志 `gptlog-process/gpdlog.md`