feat: complete working8 pause semantics
This commit is contained in:
@@ -60,3 +60,92 @@
|
||||
2. 扩展 WASM status JSON 和 SDK 映射。
|
||||
3. 增加 Node WASM 测试,证明 pause/resume 恢复暂停前解释器状态。
|
||||
|
||||
## 2026-07-07 轮次 2:暂停语义代码实现、回归验证与任务关闭
|
||||
|
||||
### 用户目标
|
||||
|
||||
完成 `/home/mes123456/cnc_wams/work/working8` 的全部任务。
|
||||
|
||||
### 本轮做了什么
|
||||
|
||||
1. 补齐 `wasm-port` task runtime 的 LinuxCNC 风格暂停恢复状态:
|
||||
- 增加 `interpResumeState`;
|
||||
- pause 保存暂停前解释器状态;
|
||||
- resume 按保存状态恢复;
|
||||
- abort/home/program complete 同步清理状态。
|
||||
2. 补齐 motion runtime immediate pause/resume/step:
|
||||
- pause/resume/step/abort 改为即时命令;
|
||||
- pause 不清空 queue;
|
||||
- paused 时不消费普通 move;
|
||||
- STEP 只消费一个普通 motion 后自动恢复 paused;
|
||||
- status JSON 输出 `motion.stepping`、`motion.idForStep`、`motion.motionId`、`commandQueueDepth`。
|
||||
3. 增加 TP pause/resume probe:
|
||||
- 直接调用 vendored LinuxCNC `tpPause()`、`tpResume()`;
|
||||
- 验证暂停速度归零、位置保持、恢复后队列完成。
|
||||
4. Web 侧接入 motion paused:
|
||||
- runtime normalize 输出 `ui.interpResumeState`、`ui.taskPaused`、`ui.singleStepping`、`ui.motionPaused`、`ui.motionStepping`、`ui.motionQueueDepth`;
|
||||
- task policy 的 resume gate 接受 motion paused/task paused/interp paused;
|
||||
- store 的 `PAUSE_RESUME` 优先用 `machine.motionPaused` 判断 resume;
|
||||
- UI pause 按钮 active/title/data-paused 接入 `motionPaused`。
|
||||
5. 扩展测试:
|
||||
- WASM task-hal Node 覆盖 pause freeze、resume restore、step returns paused、motion queue preserved;
|
||||
- Web Node 覆盖 motion paused gate 和暂停期间 active line/motion line 不推进;
|
||||
- 50ms 截图 manifest 增加 `motionPaused` 证据字段。
|
||||
6. 运行全部验收命令并关闭 `W8-001` 至 `W8-014`。
|
||||
|
||||
### 本轮新增或修改文件
|
||||
|
||||
- `wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_task_hal_wasm.cpp`
|
||||
- `wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_motion_runtime.c`
|
||||
- `wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_tp_wasm.c`
|
||||
- `wasm-port/tests/wasm/node/verify_task_hal_wasm.mjs`
|
||||
- `wasm-port/tests/wasm/node/verify_tp_wasm.mjs`
|
||||
- `web-rtcp-5axis-xyzbc-trt-sim-plan/app/src/runtime/linuxcnc-task-hal-runtime.js`
|
||||
- `web-rtcp-5axis-xyzbc-trt-sim-plan/app/src/state/linuxcnc-task-policy.js`
|
||||
- `web-rtcp-5axis-xyzbc-trt-sim-plan/app/src/state/store.js`
|
||||
- `web-rtcp-5axis-xyzbc-trt-sim-plan/app/src/ui/axis-shell.js`
|
||||
- `web-rtcp-5axis-xyzbc-trt-sim-plan/tests/node/verify_run_feedback_loop.mjs`
|
||||
- `web-rtcp-5axis-xyzbc-trt-sim-plan/tools/verify-estop-power-home-run-pause-50ms.mjs`
|
||||
- `web-rtcp-5axis-xyzbc-trt-sim-plan/app/dist/**` 中本轮重新构建的静态产物和 WASM artifact
|
||||
- `work/working8/03-推进台账.md`
|
||||
- `work/working8/04-任务矩阵.md`
|
||||
- `work/working8/05-验收证据.md`
|
||||
- `work/working8/06-决策记录.md`
|
||||
|
||||
### 本轮验证
|
||||
|
||||
已通过:
|
||||
|
||||
```text
|
||||
linuxcnc_task_hal_wasm_build=ok
|
||||
linuxcnc_task_runtime_smoke=ok
|
||||
task_status_from_linuxcnc_runtime=ok
|
||||
task_commands_drive_motion_runtime=ok
|
||||
mdi_jog_task_motion_hal_sync=ok
|
||||
pause_freezes_motion_queue=ok
|
||||
resume_restores_interp_resume_state=ok
|
||||
step_returns_to_paused=ok
|
||||
tp_wasm_node_smoke=ok
|
||||
tp_pause_resume_smoke=ok
|
||||
gmoccapy_static_build=ok
|
||||
run_feedback_status_loop_smoke=ok
|
||||
run_ready_sequence_smoke=ok
|
||||
pause_uses_motion_paused_gate=ok
|
||||
pause_freezes_task_hal_status_loop=ok
|
||||
pause_position_status=passed-position-frozen
|
||||
verification_status=passed
|
||||
```
|
||||
|
||||
生成证据:
|
||||
|
||||
- trace:`/home/mes123456/cnc_wams/web-rtcp-5axis-xyzbc-trt-sim-plan/working/pause-position-traces/pause-position-20260707T140646Z/trace.json`
|
||||
- screenshots:`/home/mes123456/cnc_wams/web-rtcp-5axis-xyzbc-trt-sim-plan/working/screenshots/estop-power-home-run-pause-50ms-20260707T141219Z`
|
||||
- manifest:`/home/mes123456/cnc_wams/web-rtcp-5axis-xyzbc-trt-sim-plan/working/screenshots/estop-power-home-run-pause-50ms-20260707T141219Z/manifest.json`
|
||||
|
||||
### 遗留问题
|
||||
|
||||
本轮 `working8` 任务矩阵内任务均已完成。底层 task-hal motion runtime 仍是 wrapper 级可观测语义补齐,完整将 task-hal motion 执行迁移到 vendored TP runtime 仍属于后续架构演进,不再阻塞本轮 AXIS 暂停按钮验收。
|
||||
|
||||
### 下一步
|
||||
|
||||
无本轮阻塞项。后续如果继续推进,可把 task-hal motion runtime 的手写队列逐步替换为 vendored TP 队列执行路径。
|
||||
|
||||
Reference in New Issue
Block a user