docs: add axis run process working set
This commit is contained in:
151
work/working8-暂停按钮/03-推进台账.md
Normal file
151
work/working8-暂停按钮/03-推进台账.md
Normal file
@@ -0,0 +1,151 @@
|
||||
# 03-推进台账
|
||||
|
||||
## 记录规则
|
||||
|
||||
每轮推进必须记录:
|
||||
|
||||
- 时间;
|
||||
- 用户目标;
|
||||
- 本轮做了什么;
|
||||
- 改了哪些文件;
|
||||
- 验证了什么;
|
||||
- 遗留问题;
|
||||
- 下一步。
|
||||
|
||||
## 2026-07-07 轮次 1:暂停功能 wasm 补齐方案建档
|
||||
|
||||
### 用户目标
|
||||
|
||||
根据 `AXIS暂停按钮LinuxCNC调用链分析.md`,实现暂停功能,完善 `wasm-port` 中 LinuxCNC 的 WASM 功能,最终实现 `web-rtcp-5axis-xyzbc-trt-sim-plan` 的暂停按钮正确功能;把完善方法和详细步骤写入 `work/working8`,并包含项目内容、开发步骤、推进台账、任务矩阵、验收证据、决策记录和 README 索引。
|
||||
|
||||
### 本轮做了什么
|
||||
|
||||
1. 阅读 AXIS 暂停按钮调用链分析文档,确认暂停必须同时覆盖 task/interpreter 与 motion/trajectory 两层。
|
||||
2. 检查 `wasm-port` 结构,确认已有 task-hal、motion runtime、TP wasm、SDK 和 WASM Node 测试。
|
||||
3. 检查 `web-rtcp-5axis-xyzbc-trt-sim-plan` 暂停按钮、task policy、store 分发逻辑和已有暂停测试报告。
|
||||
4. 识别当前主要差距:
|
||||
- task wrapper 没有完整保存和输出 `interpResumeState`;
|
||||
- motion pause 仍偏普通队列命令,缺少 GUI immediate pause 语义;
|
||||
- STEP 缺少 LinuxCNC 式自动回暂停;
|
||||
- Web resume gate 仍需以 motion paused 为优先依据;
|
||||
- TP pause/resume 需要补可观测测试。
|
||||
5. 创建 `work/working8` 文档体系。
|
||||
|
||||
### 本轮新增或修改文件
|
||||
|
||||
- `work/working8/README.md`
|
||||
- `work/working8/01-项目功能内容.md`
|
||||
- `work/working8/02-项目程序开发详细步骤.md`
|
||||
- `work/working8/03-推进台账.md`
|
||||
- `work/working8/04-任务矩阵.md`
|
||||
- `work/working8/05-验收证据.md`
|
||||
- `work/working8/06-决策记录.md`
|
||||
|
||||
### 本轮验证
|
||||
|
||||
本轮是方案与推进文档建档,未修改业务代码,未运行构建和测试。
|
||||
|
||||
已完成的静态核对:
|
||||
|
||||
- 确认 `wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_task_hal_wasm.cpp` 已有 `EMC_TASK_PLAN_PAUSE/RESUME/STEP` 分支。
|
||||
- 确认 `wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_motion_runtime.c` 已有 `paused` 字段和 pause/resume 命令识别。
|
||||
- 确认 `wasm-port/tests/wasm/node/verify_task_hal_wasm.mjs` 已有最低限度 pause/resume smoke。
|
||||
- 确认 Web 侧已有 `trace-pause-position-json.mjs` 和 `verify-estop-power-home-run-pause-50ms.mjs` 暂停冻结验证工具。
|
||||
|
||||
### 下一步
|
||||
|
||||
从 `04-任务矩阵.md` 的 `W8-001` 开始:
|
||||
|
||||
1. 修改 task runtime,增加 `interpResumeState`。
|
||||
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