接入 LinuxCNC TP 运行反馈

This commit is contained in:
2026-06-21 23:29:56 +08:00
parent 626bcfe8e3
commit 3771b9eafe
44 changed files with 7881 additions and 326 deletions

View File

@@ -333,25 +333,285 @@ promotionAllowed=false
## 9. 当前状态
```text
status=M6_linuxcnc_kinematics_frame_proof_complete
status=M17_linuxcnc_5axis_gcode_source_ingest_complete
active_style=gmoccapy_5_axis
frontend_framework=none
ui_stack=html_css_typescript_es_modules
preview_stack=threejs
semantic_boundary=linuxcnc_owned
latest_batch=M6-linuxcnc-kinematics-frame-proof
latest_gate=linuxcnc_kinematics_runtime_smoke=ok,profile_boundary_smoke=ok,rtcp_store_smoke=ok,gmoccapy_shell_smoke=ok,gmoccapy_static_build=ok
rtcp_ui_state=implemented_fixture_fallback_and_node_kinematics_wasm_frame
latest_batch=M17-linuxcnc-5axis-gcode-source-ingest
latest_gate=full_execution_boundary_smoke=ok,linuxcnc_kinematics_runtime_smoke=ok,linuxcnc_interpreter_runtime_smoke=ok,linuxcnc_ini_runtime_smoke=ok,full_linuxcnc_5axis_source_node_smoke=ok,machine_file_staging_smoke=ok,five_axis_session_smoke=ok,profile_boundary_smoke=ok,rtcp_store_smoke=ok,gmoccapy_shell_smoke=ok,gmoccapy_dist_smoke=ok,gmoccapy_static_build=ok
rtcp_ui_state=implemented_browser_worker_and_node_kinematics_wasm_frame_with_fixture_fallback
control_wiring=power_estop_reset_auto_manual_jog_mdi_run_stop_pause_step_overrides_coolant_spindle_preview_home_reload_full
gcode_loading=implemented_browser_file_text_staging
program_current_line=implemented_fixture_line_playback_and_highlight
gcode_loading=implemented_browser_file_text_staging_with_linuxcnc_interpreter_execution
linuxcnc_5axis_gcode_sources=implemented_and_guarded_to_linuxcnc_source_manifest_trt_demos_only
program_current_line=implemented_linuxcnc_canonical_motion_highlight_with_fixture_fallback
tool_preview=implemented_tool_card_and_threejs_marker
threejs_preview=implemented_basic_canvas_scene
profile_source_map=implemented_xyzac_trt
profile_source_map=implemented_xyzac_trt_and_xyzbc_trt
profile_switching=implemented_xyzac_trt_and_xyzbc_trt_with_runtime_reload
pyvcp_hal_schema=implemented_xyzac_trt_switchkins
linuxcnc_boundary_adapter=kinematics_runtime_connected_node_interpreter_remap_missing
linuxcnc_kinematics_wasm=node_proof_ready_xyzac_trt
browser_kinematics_wasm=not_connected_fixture_fallback
full_program_execution=not_promoted_fixture_line_playback
next_batch=browser_kinematics_wasm_asset_worker_or_interpreter_execution_source
linuxcnc_boundary_adapter=kinematics_and_interpreter_runtime_connected_remap_planner_missing
full_execution_boundary=implemented_machine_file_remap_ready_with_planner_task_hal_blockers
linuxcnc_kinematics_wasm=browser_and_node_proof_ready_xyzac_trt
browser_kinematics_wasm=worker_connected_source_and_dist_xyzac_trt
linuxcnc_interpreter_wasm=browser_worker_and_node_direct_canonical_program_execution_ready_with_switchkins_mcode_preservation
browser_interpreter_wasm=worker_connected_source_and_dist
switchkins_rtcp_program_execution=implemented_m428_m429_program_events_drive_rtcp_and_kinematics_switch
full_program_execution=partial_interpreter_canonical_and_switchkins_event_ready_remap_planner_not_promoted
session_persistence=implemented_opfs_save_restore_for_5axis_session
machine_file_staging=implemented_linuxcnc_trt_ini_hal_tool_table_remap_demo_opfs_staging
machine_file_backed_run=implemented_linuxcnc_fiveaxis_remap_wasm_machine_file_execution
planner_task_hal_gap=audited_as_blocked_without_native_task_nml_realtime_hal_and_planner_queue_runtime
next_batch=trajectory_planner_wasm_boundary_or_native_task_hal_port
```
## 10. M12 任务
```text
M12-switchkins-rtcp-program-execution
```
状态:
```text
completed_with_program_level_rtcp_switching
```
已完成:
- `linuxcnc-interpreter-runtime` 识别 LinuxCNC TRT 配置中的 `M428/M429/M430` switchkins remap M-code
- 因当前 interpreter WASM 未启用 Python/NGC remap runtime运行前会从送入 WASM 的程序文本中移除这些高位 M-code避免 `M-code greater than 199` 阻断普通 canonical motion
- 原始程序的 `M428/M429/M430` 被保留为 `switchkinsEvents`,并打上 `linuxcnc_switchkins_remap_mcode_preserved_web_runtime_applied` 边界;
- canonical motion event 继承最近的 switchkins 状态,`RUN/STEP/RUN_FRAME` 按程序自动切换 `identity` / `tcp-xyzac` / `tcp-xyzbc`
- node/browser kinematics runtime 增加 `switchKinematics()`,程序内 `M428/M429` 会同步切换 LinuxCNC kinematics WASM 的 `lckins_switch()`
- gmoccapy diagnostics 显示 program switchkins event count
- smoke 覆盖含 `M428/M429` 的五轴联动 RTCP 程序:加载后进入 TCP执行 A/C 联动段保持 RTCP on运行到 `M429` 后回到 identity。
边界说明:
```text
switchkinsProgramBoundary=linuxcnc_remap_mcode_preserved_and_web_runtime_applied
interpreterBoundary=linuxcnc_interpreter_wasm_canonical_events
kinematicsBoundary=linuxcnc_kinematics_wasm_c_abi
remapRuntimeReady=false
plannerRuntimeReady=false
fullLinuxCncProgramExecutionReady=false
```
## 14. M16 任务
```text
M16-linuxcnc-tp-queue-timing-runtime
```
状态:
```text
completed_with_tp_wasm_and_web_node_smoke
```
已完成:
- `wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_tp_wasm.c` 新增
`lctp_run_canonical_motion_timing()`
- TP WASM C ABI 将 LinuxCNC interpreter canonical motion events 入队到 vendored
LinuxCNC `src/emc/tp` runtime并通过 `tpRunCycle()` 生成 segment timing
- canonical 零长度 motion 保留为 0 秒 timing segment不作为 TP enqueue failure
- 新增 `wasm-port/runtime/sdk/src/linuxcnc-tp.js`
- `linuxcnc-interpreter-runtime``runProgram()` / `runMachineFileProgram()` 后调用
TP SDK`programExecution.plannerTiming` 使用
`linuxcnc_tp_queue_runtime_timing_from_canonical_motion` 边界;
- store 优先使用 TP planner timingJS `execution-timing.js` 保留为 fallback/MDI
lightweight path
- full execution boundary 可在 TP timing 成功时报告 `plannerRuntimeReady=true`
- browser source/dist smoke 验证 interpreter Worker readiness 包含 TP planner runtime
并验证含 `ARC_FEED` 的真实 G-code 程序通过 TP arc timing segment。
边界说明:
```text
timingBoundary=linuxcnc_tp_queue_runtime_timing_from_canonical_motion
plannerRuntimeReady=true for interpreter canonical motion with TP WASM timing
nativeTaskReady=false
nativeHalSyncReady=false
fullLinuxCncProgramExecutionReady=false
hardwareDrive=false
```
验证:
```text
source /home/cnc/emsdk/emsdk_env.sh >/dev/null && bash wasm-port/tools/build_tp_wasm.sh && bash wasm-port/tests/wasm/node/verify_tp_wasm.sh
node web-rtcp-5axis-sim-plan/tests/node/verify_linuxcnc_interpreter_runtime.mjs
npm --prefix web-rtcp-5axis-sim-plan/app run smoke:node
npm --prefix web-rtcp-5axis-sim-plan/app run smoke
```
## 11. M13 任务
```text
M13-interpreter-worker-runtime
```
状态:
```text
completed_with_browser_worker_smoke
```
已完成:
- 新增 `linuxcnc-interpreter-worker.js``linuxcnc-interpreter-worker-client.js`
- 浏览器默认优先通过 Web Worker 加载 LinuxCNC interpreter WASM
- store 的 `RUN_INTERPRETER_PROGRAM` 支持 async runtime避免 worker 结果阻塞 UI 线程;
- 增加 `interpreterExecutionPending` 和 sequence guard防止旧解释器结果覆盖新加载程序
- gmoccapy diagnostics 显示 interpreter execution context
- browser smoke 验证 kinematics 和 interpreter 都在 Worker并验证 source/dist 两条路径。
边界说明:
```text
browserInterpreterExecutionContext=worker
nodeInterpreterExecutionContext=direct
interpreterBoundary=linuxcnc_interpreter_wasm_canonical_events
remapRuntimeReady=false
plannerRuntimeReady=false
fullLinuxCncProgramExecutionReady=false
```
## 14. M16 任务
```text
M16-planner-task-hal-boundary-audit
```
状态:
```text
completed_with_full_execution_boundary_smoke
```
已完成:
- 新增 `full-execution-boundary.js`,统一汇总 kinematics、interpreter canonical、machine-file staging、five-axis remap run、switchkins HAL evidence
- store 新增 `fullExecutionBoundary` 派生状态和 `RUN_FULL_BOUNDARY_AUDIT_REQUEST`
- gmoccapy diagnostics 显示 full boundary、planner/task/HAL blockers 和证据摘要;
- 底部新增 `Audit` 按钮,可触发 machine-file staging + machine-file backed five-axis remap run
- interpreter runtime 对 machine-file backed run 的 `remapRuntimeReady` 改为基于 `fiveaxis_ini_open=1``fiveaxis_remaps_ready=1``fiveaxis_file_reached_exit=1`
- Node/browser smoke 验证 partial remap boundary ready同时继续禁止 full LinuxCNC program execution promoted。
边界说明:
```text
fullExecutionBoundary=linuxcnc_machine_file_remap_ready_planner_task_hal_blocked
remapRuntimeReady=true for staged fiveAxisRemap C ABI run
halSwitchkinsEvidenceReady=true for fiveaxis_hal_switchkins evidence
nativeTaskReady=false
nativeHalSyncReady=false
plannerRuntimeReady=false
fullLinuxCncProgramExecutionReady=false
promotionAllowed=false
```
## 15. M17 任务
```text
M17-linuxcnc-5axis-gcode-source-ingest
```
状态:
```text
completed_with_real_linuxcnc_5axis_source_program_smoke
```
已完成:
- machine-file staging 从 LinuxCNC source manifest 中追加 TRT `demos/*.ngc`,包括 `boat-xyzac.ngc``boat-xyzbc.ngc``impeller-7bl-xyzac.ngc``xyzac_switchkins*.ngc``xyzbc_switchkins.ngc`
- `selectMachineFileProgram()` 强制 5 轴 G-code 必须来自 LinuxCNC 源程序目录 `configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/*.ngc`
- 新增 `listLinuxCncGcodeSources()``selectMachineFileProgram()`
- store 新增 `LOAD_LINUXCNC_GCODE_SOURCE`,可把 staged LinuxCNC 真实 5 轴 `.ngc` 源文件加载到 G-code 面板;
- gmoccapy G-code 面板新增 LinuxCNC 5-axis source 下拉框和 staging 按钮;
- machine-file backed remap run 使用当前选中的 LinuxCNC `.ngc` 源程序路径;
- Node/browser smoke 验证选择 `impeller-7bl-xyzac.ngc`UI 加载真实源程序machine-file run 的 `wasmProgramPath` 指向该源文件。
边界说明:
```text
gcodeSourceBoundary=linuxcnc_vendored_5axis_gcode_source_file
sourceMode=linuxcnc-vendored-5axis-gcode
machineFileBackedRunProgram=selected_staged_linuxcnc_ngc_source
sourceDirectoryGuard=configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/*.ngc only
remapRuntimeReady=true for staged fiveAxisRemap C ABI run
plannerRuntimeReady=false
nativeTaskReady=false
nativeHalSyncReady=false
fullLinuxCncProgramExecutionReady=false
```
## 12. M14 任务
```text
M14-opfs-machine-file-staging
```
状态:
```text
completed_with_node_and_browser_opfs_smoke
```
已完成:
- 新增 `linuxcnc-machine-file-staging.js`
- 复用 `wasm-port/runtime/sdk/src/sim-config-staging.js``planSimConfigStaging()`,为 `xyzac-trt` / `xyzbc-trt` 生成 LinuxCNC sim-config staging plan
- 将 INI、tool table、HAL、PyVCP XML、`remap_subs/*.ngc`、demo G-code 等 vendored LinuxCNC 文本文件保存到 OPFS 风格路径;
- store 增加 `machineFileStaging` 状态和 `stageMachineFiles()` API
- gmoccapy diagnostics 显示 machine-file staging 状态;
- build 产物复制 `wasm-port/tools/source-manifest.txt`,保证 dist 页面也能生成 staging plan
- node smoke 使用 memory OPFS 验证文件保存browser smoke 使用真实 OPFS 验证 source/dist staging。
边界说明:
```text
machineFileStagingBoundary=linuxcnc_sim_config_file_staging_plan_plus_opfs_text_persistence
stagedFiles=ini,hal,pyvcp,tool_table,remap_ngc,demo_gcode
nativeHalTaskSync=false
remapRuntimeReady=false
plannerRuntimeReady=false
fullLinuxCncProgramExecutionReady=false
```
## 13. M15 任务
```text
M15-machine-file-backed-fiveaxis-remap-run
```
状态:
```text
completed_with_node_and_browser_fiveaxis_remap_run
```
已完成:
- `linuxcnc-interpreter-runtime` 新增 `runMachineFileProgram()`
- interpreter Worker 支持 `runMachineFileProgram` 转发;
- store 新增 `RUN_MACHINE_FILE_PROGRAM` action 和 `machineFileExecution` 状态;
- 使用 M14 的 machine-file staging plan/files把 TRT INI、tool table、remap NGC、demo G-code 写入 Emscripten FS
- 调用 LinuxCNC interpreter SDK `runSimConfigProgram({ executionMode: "fiveAxisRemap" })`
- Node/browser smoke 验证 `fiveaxis_ini_open=1``fiveaxis_remaps_ready=1``fiveaxis_file_reached_exit=1`
- gmoccapy diagnostics 显示 machine-file backed run 状态。
边界说明:
```text
machineFileBackedRunBoundary=linuxcnc_fiveaxis_remap_wasm_machine_file_execution
sourceMode=linuxcnc-machine-file-remap-wasm
remapRuntimeReady=vendored_linuxcnc_fiveaxis_remap_c_abi_for_staged_files
nativeTaskHalSync=false
plannerRuntimeReady=false
fullLinuxCncProgramExecutionReady=false
```

View File

@@ -173,7 +173,20 @@ LinuxCNC kinematics proof:
promotionAllowed=true for kinematics frame source only
```
这表示 Web 仿真已经具备 RTCP 状态链路、TCP pose 显示、刀轴向量显示和控制按钮切换Node proof 路径已通过 `createLinuxCncKinematicsSdk({ moduleId: "xyzac-trt" })` 加载 LinuxCNC kinematics WASM 并生成 frame浏览器 smoke 仍保留 fixture fallback不把 fallback 冒充 LinuxCNC runtime proof。
这表示 Web 仿真已经具备 RTCP 状态链路、TCP pose 显示、刀轴向量显示和控制按钮切换Node 和浏览器路径已通过 `createLinuxCncKinematicsSdk({ moduleId: "xyzac-trt" })` 加载 LinuxCNC kinematics WASM 并生成 frame浏览器默认使用 Worker 隔离 kinematics WASM 调用。fixture fallback 仍保留为 runtime load failure 的 UI 安全路径,但 smoke 不再把 fixture fallback 当作当前 proof。
当前普通 G-code 程序执行也已接入 `createLinuxCncInterpSdk()`
```text
sourceMode=linuxcnc-interpreter-wasm
semanticBoundary=linuxcnc_interpreter_wasm_canonical_events
RUN/STEP source=LinuxCNC canonical motion events
remapRuntimeReady=false
plannerRuntimeReady=false
fullLinuxCncProgramExecutionReady=false
```
这只提升普通 G-code canonical execution source不代表 Python remap、tool DB、external user-M process 或完整 planner 已 promoted。
### Step 3gmoccapy UI 组件
@@ -432,6 +445,55 @@ readiness
- Browser canvas nonblank smoke
- 文档 traceability 检查。
### Step 9LinuxCNC TP queue timing runtime
目标:
- 删除真实 G-code 路径上的
`linuxcnc_canonical_motion_timing_estimate_not_planner_queue` 边界;
- 将 interpreter 生成的 LinuxCNC canonical motion events 输入从
`linuxcnc/src/emc/tp` 移植构建出的 WASM runtime
-`tpCreate()``tpSetCycleTime()``tpSetVmax()``tpSetVlimit()`
`tpSetAmax()``tpSetTermCond()``tpAddLine()``tpRunCycle()`
`tpGetPos()` 生成程序级 queue timing
- UI 的 elapsed/remaining/current velocity 来自 TP queue runtime 输出,而不是
JavaScript 按距离和进给率估算。
实现步骤:
1.`wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_tp_wasm.c` 新增
`lctp_run_canonical_motion_timing()` C ABI。
2. 输入只接受 interpreter runtime 已解析出的 canonical motion JSONC 侧只做字段读取、
TP enqueue 和 cycle loop不解释 G-code。
3.`wasm-port/runtime/sdk/src/linuxcnc-tp.js` 新增 TP SDK负责加载
`build/wasm/tp/linuxcnc_tp.{js,wasm}` 并调用 C ABI。
4. 在 Web interpreter runtime 中可选接入 `createLinuxCncTpSdk()``runProgram()`
`runMachineFileProgram()` 完成 canonical motion 后立即跑 TP queue timing。
5. `programExecution.summary.plannerRuntimeReady=true` 只在 TP runtime 调用成功且
motionCount 一致时成立;否则保留 canonical execution但不能把 planner timing 标为 ready。
6. `web-rtcp-5axis-full-linuxcnc-execution-boundary` 可把 `plannerRuntimeReady=true` 作为
已满足项,但仍必须显示 `nativeTaskReady=false``nativeHalSyncReady=false`
`fullLinuxCncProgramExecutionReady=false`,因为 native task/NML、HAL realtime thread 和
硬件驱动没有接入。
当前边界:
```text
sourceMode=linuxcnc-interpreter-wasm
timing.semanticBoundary=linuxcnc_tp_queue_runtime_timing_from_canonical_motion
plannerRuntimeReady=true
nativeTaskReady=false
nativeHalSyncReady=false
fullLinuxCncProgramExecutionReady=false
```
不允许:
- 用 JS 重写 lookahead、blend、exact stop、S-curve 或 G-code modal 语义;
- 把 TP queue timing 说成已经驱动硬件;
- 把 native LinuxCNC task/NML/realtime HAL 说成已经完成;
- 对没有通过 TP runtime 的 operator MDI lightweight path 标记 planner ready。
## 5. 禁止事项
- 不在 JavaScript 中实现 G-code 解释器。
@@ -439,7 +501,11 @@ readiness
- 不把 gmoccapy Python/GTK runtime 移植进浏览器。
- 不把 Python remap/tool DB/external user-M process 伪装成已支持。
- 不用 UI fixture 结果冒充 LinuxCNC runtime proof。
- 用于 5 轴 machine-file backed run 的 G-code 必须来自 LinuxCNC 源程序目录
`configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/*.ngc`
用户上传或手写的 G-code 只能作为 operator file/普通 interpreter 输入,不得标记为
`linuxcnc-vendored-5axis-gcode` 或用于 5 轴源程序边界证明。
## 6. 开工建议
当前已完成 Step 1 到 Step 7 的 Node LinuxCNC kinematics proof。下一轮应把 browser asset copy/worker 接入完成,让真实浏览器也能加载 kinematics WASM或继续推进 interpreter/remap/planner使 program execution 从 fixture line playback 升级
当前已完成 Step 1 到 Step 9 的 Node/browser LinuxCNC kinematics proof、浏览器 Worker kinematics 隔离、浏览器 Worker interpreter canonical execution source、`xyzac-trt`/`xyzbc-trt` profile 切换、OPFS 五轴会话保存/恢复、OPFS machine-file staging、machine-file backed `fiveAxisRemap` C ABI run、程序级 `M428/M429` switchkins RTCP 自动切换、LinuxCNC TP queue timing runtime、full execution boundary audit以及真实 LinuxCNC TRT 5 轴 `.ngc` 源程序 staging/选择/运行路径。`M428/M429/M430` 当前既可作为 Web runtime switchkins 事件驱动 `lckins_switch()`,也可在 staged machine-file run 中交给 vendored LinuxCNC five-axis remap C ABI 验证;只有 LinuxCNC source manifest 中的 `configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/*.ngc` 可作为 `linuxcnc-vendored-5axis-gcode` 进入 UI 和 machine-file run。`web-rtcp-5axis-full-linuxcnc-execution-boundary` 可以在真实 interpreter canonical motion 已通过 TP WASM 时报告 `plannerRuntimeReady=true`,但必须继续把 `nativeTaskReady=false``nativeHalSyncReady=false``fullLinuxCncProgramExecutionReady=false``promotionAllowed=false` 显示为 blocker除非后续真正接入 native task/NML 和 realtime HAL sync

View File

@@ -519,6 +519,7 @@ LinuxCNC G-code text
8. `M7-browser-kinematics-runtime`:浏览器 asset copy/worker 加载 kinematics WASM。
9. `M8-session`OPFS 保存/恢复五轴仿真会话。
10. `M9-release-gate`Node/browser/docs/release gate。
11. `M10-profile-switching``xyzac-trt` / `xyzbc-trt` profile 切换并重载对应 kinematics WASM。
## 9. 验收标准
@@ -537,15 +538,10 @@ LinuxCNC G-code text
## 10. 下一步动作
当前已完成到 `M6-kinematics-frame-proof`。建议下一轮优先做:
当前已完成到 `M11-profile-session-business-closure`。建议下一轮优先做:
- 在 build-static 中复制 `wasm-port/build/wasm/kinematics` 所需产物,或新增 worker 隔离 kinematics WASM 加载
- `app/src/main.js` 在浏览器中 attach `xyzac-trt` kinematics runtime
- 保持 fixture fallback不把 browser fixture smoke 标记为 LinuxCNC proof
- 或转向 LinuxCNC interpreter/remap/planner 接入,把 program execution 从 fixture line playback 升级
- 使用 Vite + Three.js
- 先接入现有普通 G-code program inventory
- 画出五轴机床基本结构;
- 按 AXIS/PyVCP/gmoccapy 参考放置 toolbar、Manual/MDI、DRO、SWITCHKINS、joint values、preview
- 加 Playwright smoke
- 把 interpreter WASM 调用迁移到 Worker保持 UI 主线程只做渲染和状态编排
- 接入 OPFS machine-session 的 INI/HAL/tool table staging让 interpreter execution 使用真实会话文件
- 继续推进 remap/planner 边界,不把普通 canonical execution 冒充完整 LinuxCNC task/motion runtime
- 保持 source/browser/dist 三层 smokeinterpreter canonical frame、kinematics worker frame、DRO/preview 同步
- 启动本地 dev server 给出访问地址。

View File

@@ -24,22 +24,26 @@ CNC 语义必须来自 LinuxCNC source/WASM/source-derived boundary
| 右侧模式按钮栏 | `app/src/ui/gmoccapy-status-sidebar.ts` | gmoccapy screenshot | UI action dispatch | browser button/action smoke |
| 底部运行控制 | `app/src/ui/gmoccapy-bottom-controls.ts` | gmoccapy/AXIS run controls | UI action dispatch | playback smoke |
| G-code 当前行 | `app/src/ui/gmoccapy-gcode-panel.ts` | AXIS/gmoccapy program display | LinuxCNC output rendering | active-line smoke |
| 上电/急停/复位/模式操作 | `app/src/state/store.js`, `app/src/ui/gmoccapy-shell.js` | gmoccapy/AXIS operator workflow | browser UI runtime fixture | node smoke + browser operator smoke |
| JOG/MDI 操作 | `app/src/state/store.js`, `app/src/ui/gmoccapy-shell.js` | AXIS Manual/MDI workflow | browser UI runtime fixture | node smoke + browser operator smoke |
| G-code 文件加载 | `app/src/ui/gmoccapy-shell.js`, `app/src/state/store.js` | AXIS/gmoccapy open program workflow | file text staging only, not LinuxCNC interpreter proof | node smoke + browser operator smoke |
| 程序执行当前行显示 | `app/src/state/store.js`, `app/src/ui/gmoccapy-shell.js` | AXIS/gmoccapy current line display | fixture line playback until LinuxCNC interpreter is connected | node smoke + browser operator smoke |
| 上电/急停/复位/模式操作 | `app/src/state/store.js`, `app/src/state/linuxcnc-task-policy.js`, `app/src/ui/gmoccapy-shell.js` | `src/emc/nml_intf/emc.hh`, `src/emc/task/emctaskmain.cc`, `src/emc/task/emctask.cc` | LinuxCNC task source-referenced Web policy | node smoke + browser operator smoke |
| JOG/MDI 操作 | `app/src/state/store.js`, `app/src/state/linuxcnc-task-policy.js`, `app/src/ui/gmoccapy-shell.js` | `src/emc/task/emctaskmain.cc` `EMC_JOG_INCR`, `EMC_JOINT_HOME`, `EMC_TASK_PLAN_EXECUTE` | LinuxCNC task source-referenced Web policy | node smoke + browser operator smoke |
| 程序运行/暂停/继续/停止 | `app/src/state/store.js`, `app/src/state/linuxcnc-task-policy.js`, `app/src/ui/gmoccapy-shell.js` | `src/emc/task/emctaskmain.cc` `EMC_TASK_PLAN_RUN`, `EMC_TASK_PLAN_PAUSE`, `EMC_TASK_PLAN_RESUME`, `EMC_TASK_ABORT` | LinuxCNC task source-referenced Web policy | node smoke + browser operator smoke |
| G-code 文件加载 | `app/src/ui/gmoccapy-shell.js`, `app/src/state/store.js` | AXIS/gmoccapy open program workflow | browser file staging + LinuxCNC interpreter execution | node smoke + browser operator smoke |
| LinuxCNC 5 轴源程序选择 | `app/src/runtime/linuxcnc-machine-file-staging.js`, `app/src/state/store.js`, `app/src/ui/gmoccapy-shell.js` | `configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/*.ngc` | guarded vendored LinuxCNC source-directory G-code staging + selected machine-file run | machine-file staging node smoke + browser source selector smoke |
| 程序执行当前行显示 | `app/src/state/store.js`, `app/src/ui/gmoccapy-shell.js` | AXIS/gmoccapy current line display | LinuxCNC interpreter canonical motion events with fixture fallback | node smoke + browser operator smoke |
| 程序执行速度/时间 | `wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_tp_wasm.c`, `wasm-port/runtime/sdk/src/linuxcnc-tp.js`, `app/src/runtime/linuxcnc-interpreter-runtime.js`, `app/src/state/store.js`, `app/src/ui/gmoccapy-shell.js` | LinuxCNC interpreter canonical motion events queued through `src/emc/tp/tp.c`, `tc.c`, `tcq.c`, S-curve/Ruckig support sources | LinuxCNC TP queue runtime timing from canonical motion; JS estimate kept only as fallback/MDI lightweight path | TP WASM smoke + interpreter/store node smoke + browser source/dist TP timing smoke |
| 刀具预览 | `app/src/ui/gmoccapy-shell.js`, `app/src/visualization/five-axis-scene.js` | gmoccapy/vismach tool display | visualization/runtime state display | browser operator smoke |
| 3D 五轴预览 | `app/src/visualization/five-axis-scene.js` | `qtvismach_5axis_gantry.png`, `lib/python/vismach.py` | visualization | canvas nonblank smoke |
| Vismach transform tree | `app/src/visualization/machine-model.ts` | `lib/python/vismach.py`, `src/hal/user_comps/vismach/*.py` | visualization from GUI reference | scene graph smoke |
| `xyzac-trt` profile | `app/src/profiles/xyzac-trt.js` | `configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzac-trt.ini` | source/config reference | profile boundary node smoke |
| `xyzac-trt` source reference map | `app/src/profiles/source-reference-map.js` | `xyzac-trt.ini`, `xyzac-trt.xml`, `switchkins_postgui.hal`, `xyzac-trt_cmds.hal`, `xyzac-trt-kins.c`, `trtfuncs.c`, `switchkins.c` | profile/source map only, not runtime proof | profile boundary node smoke |
| `xyzbc-trt` profile | `app/src/profiles/xyzbc-trt.ts` | `configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzbc-trt.ini` | source/config reference | profile node smoke |
| `xyzbc-trt` profile | `app/src/profiles/xyzbc-trt.js` | `configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzbc-trt.ini` | source/config reference + runtime module switch | profile node smoke + browser profile switch smoke |
| SWITCHKINS panel | `app/src/panel-schema/xyzac-trt-pyvcp.js` | `xyzac-trt.xml`, `switchkins_postgui.hal` | UI/HAL binding reference | profile boundary node smoke + browser DOM smoke |
| M428/M429/M430 state | `app/src/profiles/xyzac-trt.js`, `app/src/panel-schema/xyzac-trt-pyvcp.js` | `remap_subs/428remap.ngc`, `429remap.ngc`, `430remap.ngc` | LinuxCNC remap/source reference only until runtime adapter is connected | profile boundary node smoke |
| LinuxCNC boundary adapter | `app/src/runtime/linuxcnc-boundary-adapter.js` | LinuxCNC interpreter/kinematics WASM future adapter point | adapter entrypoint only, runtime not connected | profile boundary node smoke + browser DOM smoke |
| LinuxCNC boundary adapter | `app/src/runtime/linuxcnc-boundary-adapter.js` | LinuxCNC interpreter/kinematics/TP WASM adapter point | kinematics + interpreter + TP timing runtime connected; native task/realtime HAL still not ported | profile boundary node smoke + browser DOM smoke |
| Full execution boundary audit | `app/src/runtime/full-execution-boundary.js`, `app/src/state/store.js`, `app/src/ui/gmoccapy-shell.js` | LinuxCNC kinematics WASM, interpreter WASM, TP WASM, `runSimConfigProgram({ executionMode: "fiveAxisRemap" })`, TRT remap files | machine-file remap and TP timing ready; native task/realtime HAL blocked | full execution boundary node smoke + browser DOM smoke |
| Five-axis kinematics | `core/linuxcnc_kinematics_wasm` | `trtfuncs.c`, `xyzac-trt-kins.c`, `xyzbc-trt-kins.c`, `5axiskins.c` | LinuxCNC source-derived WASM | Node roundtrip smoke |
| RTCP/TCP frame | `app/src/runtime/rtcp-frame.js` | LinuxCNC kinematics output + canonical events | fixture frame plumbing until kinematics WASM is ready | RTCP/store node smoke + browser DOM smoke |
| OPFS session | `app/src/runtime/session-*` | current `wasm-port/runtime/opfs` | host-side persistence | save/restore smoke |
| OPFS session | `app/src/runtime/five-axis-session.js` | current `wasm-port/runtime/opfs` | browser OPFS 5-axis session persistence | five_axis_session_smoke + browser save/restore smoke |
## 3. 源文件追溯清单
@@ -118,11 +122,12 @@ src/emc/kinematics/kins_util.c
| --- | --- | --- |
| gmoccapy UI style | ready | 可直接 Web 化 |
| Three.js preview | implemented_basic_canvas_scene | 已显示基础五轴机床、刀具/TCP marker、刀轴、刀路并消费 `rtcpFrame` |
| LinuxCNC interpreter WASM | existing_project_capability | 可参考 `wasm-port` 现有 SDK |
| LinuxCNC 5-axis kinematics WASM | node_proof_ready | `createLinuxCncKinematicsSdk({ moduleId: "xyzac-trt" })` 已由 web adapter 加载Node smoke 验证 forward/inverse frame |
| RTCP frame UI plumbing | implemented_fixture_and_kinematics_wasm | fixture fallback 仍为 `linuxCncKinematicsReady=false`Node kinematics proof 为 `source-derived-kinematics-wasm` / `linuxcnc_kinematics_wasm_c_abi` |
| Operator workflow | implemented_fixture_only | 上电/急停/复位/模式/JOG/MDI/G-code 加载/当前行显示已闭环;执行仍是 fixture line playback |
| LinuxCNC boundary adapter | kinematics_runtime_connected_node | `web-rtcp-5axis-linuxcnc-boundary-adapter` 可区分 kinematics-only ready 与 interpreter/remap missing |
| LinuxCNC interpreter WASM | browser_and_node_canonical_execution_ready | `createLinuxCncInterpSdk()` 已接入普通 G-code canonical motion executionremap/planner 未 promoted |
| LinuxCNC 5-axis kinematics WASM | browser_and_node_proof_ready | `createLinuxCncKinematicsSdk({ moduleId: "xyzac-trt" })` 已由 web adapter 加载Node/source-browser/dist-browser smoke 验证 forward/inverse frame |
| RTCP frame UI plumbing | implemented_fixture_and_kinematics_wasm | fixture fallback 仍为 `linuxCncKinematicsReady=false`browser/node kinematics proof 为 `source-derived-kinematics-wasm` / `linuxcnc_kinematics_wasm_c_abi` |
| Operator workflow | implemented_linuxcnc_task_policy_with_canonical_motion | 上电/急停/复位/模式/JOG/MDI/RUN/PAUSE/RESUME/STOP/HOME 通过 `linuxcnc_task_state_mode_command_gate`;普通程序执行来自 LinuxCNC canonical motion |
| LinuxCNC boundary adapter | kinematics_and_interpreter_connected | `web-rtcp-5axis-linuxcnc-boundary-adapter` 可区分 kinematics-only ready 与 interpreter/remap missing |
| Full execution boundary audit | implemented_remap_ready_planner_task_hal_blocked | `web-rtcp-5axis-full-linuxcnc-execution-boundary` 汇总 kinematics/interpreter/machine-file-remap evidence仍明确 `plannerRuntimeReady=false``nativeTaskReady=false``nativeHalSyncReady=false``fullLinuxCncProgramExecutionReady=false` |
| PyVCP/HAL panel schema | implemented_reference_only | `xyzac-trt-switchkins-pyvcp` 已整理 SWITCHKINS 控件与 HAL nets不执行 native HAL |
| Python GUI runtime | not_ported | 只参考,不运行 |
| Python remap runtime | blocked | 不在第一版实现 |
@@ -465,3 +470,548 @@ Remaining risk:
Next:
browser_kinematics_wasm_asset_worker_or_interpreter_execution_source
```
## 13. M7 追溯记录
```text
Batch: M7-browser-kinematics-runtime
Date: 2026-06-21 CST
Files changed:
app/package.json
app/scripts/build-static.mjs
app/src/main.js
app/src/runtime/linuxcnc-kinematics-runtime.js
tests/browser/gmoccapy_shell_smoke.html
tests/browser/verify_gmoccapy_dist_browser.sh
docs/development-continuation.md
docs/program-implementation-guide.md
docs/technical-roadmap.md
docs/traceability-matrix.md
Feature:
将浏览器主流程接入 xyzac-trt LinuxCNC kinematics WASM。
runtime loader 移除顶层 node:* 依赖,支持 browser ESM import
app/src/main.js 启动后自动 attach kinematics runtime
build-static 复制 linuxcnc-kinematics.js 与 kinematics .js/.wasm 产物到 dist
browser smoke 同时覆盖源码入口和 dist 入口。
LinuxCNC references:
wasm-port/runtime/sdk/src/linuxcnc-kinematics.js
wasm-port/build/wasm/kinematics/linuxcnc_xyzac_trt_kinematics.js
wasm-port/build/wasm/kinematics/linuxcnc_xyzac_trt_kinematics.wasm
src/emc/kinematics/xyzac-trt-kins.c
Boundary:
sourceMode=source-derived-kinematics-wasm
semanticBoundary=linuxcnc_kinematics_wasm_c_abi
browserKinematicsReady=true
nodeKinematicsReady=true
fullLinuxCncProgramExecutionReady=false
fixtureFallback=available_only_on_runtime_load_failure
Tests:
npm --prefix web-rtcp-5axis-sim-plan/app run build
npm --prefix web-rtcp-5axis-sim-plan/app run smoke:node
npm --prefix web-rtcp-5axis-sim-plan/app run smoke
Result:
gmoccapy_static_build=ok
linuxcnc_kinematics_runtime_smoke=ok
rtcp_store_smoke=ok
profile_boundary_smoke=ok
gmoccapy_shell_smoke=ok
gmoccapy_dist_smoke=ok
Remaining risk:
Superseded by M8/M9: browser kinematics now runs through Worker and ordinary
G-code RUN/STEP uses LinuxCNC interpreter canonical events. Remap/planner
execution remains not promoted.
Next:
linuxcnc_interpreter_remap_planner_execution_source_or_worker_isolation
```
## 14. M8-M9 追溯记录
```text
Batch: M8-kinematics-worker-runtime
Batch: M9-interpreter-canonical-program-execution
Date: 2026-06-21 CST
Files changed:
app/package.json
app/scripts/build-static.mjs
app/src/main.js
app/src/runtime/linuxcnc-interpreter-runtime.js
app/src/runtime/linuxcnc-kinematics-runtime.js
app/src/runtime/linuxcnc-kinematics-worker.js
app/src/runtime/linuxcnc-kinematics-worker-client.js
app/src/runtime/linuxcnc-boundary-adapter.js
app/src/state/store.js
app/src/ui/gmoccapy-shell.js
tests/node/verify_linuxcnc_interpreter_runtime.mjs
tests/node/verify_linuxcnc_kinematics_runtime.mjs
tests/node/verify_rtcp_store.mjs
tests/browser/gmoccapy_shell_smoke.html
Feature:
浏览器默认通过 Web Worker 加载 xyzac-trt LinuxCNC kinematics WASM
普通 G-code 程序通过 LinuxCNC interpreter WASM 执行并输出 canonical
motion eventsRUN/STEP 使用 canonical motion line/pose 更新 G-code
highlight、DRO、RTCP frame 和 Three.js preview。
LinuxCNC references:
wasm-port/runtime/sdk/src/linuxcnc-kinematics.js
wasm-port/runtime/sdk/src/linuxcnc-interp.js
wasm-port/build/wasm/kinematics/linuxcnc_xyzac_trt_kinematics.wasm
wasm-port/build/wasm/core/linuxcnc_interp.wasm
Boundary:
kinematics sourceMode=source-derived-kinematics-wasm
kinematics executionContext=worker in browser
interpreter sourceMode=linuxcnc-interpreter-wasm
interpreter semanticBoundary=linuxcnc_interpreter_wasm_canonical_events
remapRuntimeReady=false
plannerRuntimeReady=false
fullLinuxCncProgramExecutionReady=false
Tests:
npm --prefix web-rtcp-5axis-sim-plan/app run build
npm --prefix web-rtcp-5axis-sim-plan/app run smoke:node
npm --prefix web-rtcp-5axis-sim-plan/app run smoke
Result:
gmoccapy_static_build=ok
linuxcnc_kinematics_runtime_smoke=ok
linuxcnc_interpreter_runtime_smoke=ok
rtcp_store_smoke=ok
profile_boundary_smoke=ok
gmoccapy_shell_smoke=ok
gmoccapy_dist_smoke=ok
Remaining risk:
Interpreter runtime currently runs on the main browser thread; remap/planner,
OPFS machine-session staging, Python remap, tool DB, and external user-M process
remain not promoted.
Next:
remap_planner_worker_interpreter_or_opfs_machine_session_integration
```
## 15. M10-M11 追溯记录
```text
Batch: M10-profile-switching
Batch: M11-profile-session-business-closure
Date: 2026-06-21 CST
Files changed:
app/src/profiles/index.js
app/src/profiles/xyzbc-trt.js
app/src/profiles/source-reference-map.js
app/src/runtime/five-axis-session.js
app/src/runtime/rtcp-frame.js
app/src/state/store.js
app/src/ui/gmoccapy-shell.js
app/src/styles/gmoccapy.css
tests/node/verify_five_axis_session.mjs
tests/node/verify_profile_boundary.mjs
tests/node/verify_rtcp_store.mjs
tests/browser/gmoccapy_shell_smoke.html
Feature:
增加 xyzbc-trt profile、source reference map、PyVCP SWITCHKINS schema
变体和 UI profile selectorprofile 切换后重载对应 LinuxCNC kinematics WASM。
增加 web-rtcp-5axis OPFS session snapshot可保存/恢复 profile、program、
axis/TCP pose、RTCP state、canonical execution summary、runtime readiness 和 preview state。
LinuxCNC references:
configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzbc-trt.ini
configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzbc-trt.xml
src/emc/kinematics/xyzbc-trt-kins.c
wasm-port/runtime/opfs snapshot/file-service pattern
Boundary:
profile switching=source/config reference plus source-derived kinematics runtime reload
session persistence=browser OPFS UI/runtime state snapshot
machine-file staging=false
remapRuntimeReady=false
plannerRuntimeReady=false
Tests:
npm --prefix web-rtcp-5axis-sim-plan/app run build
npm --prefix web-rtcp-5axis-sim-plan/app run smoke:node
npm --prefix web-rtcp-5axis-sim-plan/app run smoke
Result:
gmoccapy_static_build=ok
linuxcnc_kinematics_runtime_smoke=ok
linuxcnc_interpreter_runtime_smoke=ok
five_axis_session_smoke=ok
rtcp_store_smoke=ok
profile_boundary_smoke=ok
gmoccapy_shell_smoke=ok
gmoccapy_dist_smoke=ok
Remaining risk:
Session snapshot persists Web simulation state, not full LinuxCNC machine-file
staging. Interpreter still runs on the main browser thread. Remap/planner,
Python remap, tool DB, and external user-M process remain not promoted.
Next:
interpreter_worker_or_opfs_machine_file_staging_or_remap_planner_boundary
```
## 17. M18 追溯记录
```text
Batch: M18-linuxcnc-task-policy-controls
Date: 2026-06-21 CST
Files changed:
app/src/state/linuxcnc-task-policy.js
app/src/runtime/execution-timing.js
app/src/state/store.js
app/src/ui/gmoccapy-shell.js
tests/node/verify_rtcp_store.mjs
tests/node/verify_five_axis_session.mjs
tests/browser/gmoccapy_shell_smoke.html
Feature:
Adds a source-referenced LinuxCNC task policy gate for operator controls:
TOGGLE_POWER, RESET, ESTOP, SET_MODE, JOG, RUN_MDI, RUN, STEP, HOME,
PAUSE, RESUME, STOP, and ABORT. The gmoccapy diagnostics panel now exposes
task state/mode/interpreter state, gate readiness, and the source file list
including `linuxcnc/src/emc/task/emctaskmain.cc`.
Adds LinuxCNC TP queue timing from interpreter canonical motion events.
UI now reports total/elapsed/remaining time and current segment
duration/velocity from the TP WASM runtime when available.
LinuxCNC references:
src/emc/nml_intf/emc.hh
src/emc/task/emctaskmain.cc
src/emc/task/emctask.cc
Boundary:
taskPolicyBoundary=linuxcnc_task_state_mode_command_gate
timingBoundary=linuxcnc_tp_queue_runtime_timing_from_canonical_motion
sourceMode=linuxcnc-task-source-referenced-policy
nativeTaskReady=false
nativeHalSyncReady=false
plannerRuntimeReady=true
fullLinuxCncProgramExecutionReady=false
Tests:
npm --prefix web-rtcp-5axis-sim-plan/app run smoke:node
npm --prefix web-rtcp-5axis-sim-plan/app run smoke
Result:
rtcp_store_smoke=ok
five_axis_session_smoke=ok
gmoccapy_shell_smoke=ok
gmoccapy_dist_smoke=ok
Remaining risk:
The control gates are aligned to LinuxCNC task source behavior, but this is
still a Web policy mirror. The project does not run the native LinuxCNC task
process, NML IPC loop, or realtime HAL synchronization. TP timing is computed
by the vendored LinuxCNC TP queue runtime from canonical motion events; it is
still not hardware drive timing and does not make native task/HAL ready.
Next:
decide_release_handoff_or_start_native_task_hal_planner_boundary
```
## 17. M13 追溯记录
```text
Batch: M13-interpreter-worker-runtime
Date: 2026-06-21 CST
Files changed:
app/src/main.js
app/src/runtime/linuxcnc-interpreter-worker.js
app/src/runtime/linuxcnc-interpreter-worker-client.js
app/src/state/store.js
app/src/ui/gmoccapy-shell.js
tests/browser/gmoccapy_shell_smoke.html
tests/node/verify_five_axis_session.mjs
tests/node/verify_rtcp_store.mjs
Feature:
Browser LinuxCNC interpreter WASM now loads through a Web Worker by default,
matching the existing kinematics Worker isolation. Program execution in store
accepts async interpreter runtimes, exposes interpreterExecutionPending, and
uses a sequence guard so stale Worker results cannot overwrite newer program
loads.
LinuxCNC references:
wasm-port/runtime/sdk/src/linuxcnc-interp.js
wasm-port/build/wasm/core/linuxcnc_interp.js
wasm-port/build/wasm/core/linuxcnc_interp.wasm
Boundary:
browserInterpreterExecutionContext=worker
nodeInterpreterExecutionContext=direct
interpreter semanticBoundary=linuxcnc_interpreter_wasm_canonical_events
remapRuntimeReady=false
plannerRuntimeReady=false
fullLinuxCncProgramExecutionReady=false
Tests:
npm --prefix web-rtcp-5axis-sim-plan/app run smoke:node
npm --prefix web-rtcp-5axis-sim-plan/app run build
npm --prefix web-rtcp-5axis-sim-plan/app run smoke
Result:
linuxcnc_kinematics_runtime_smoke=ok
linuxcnc_interpreter_runtime_smoke=ok
five_axis_session_smoke=ok
rtcp_store_smoke=ok
profile_boundary_smoke=ok
gmoccapy_static_build=ok
gmoccapy_shell_smoke=ok
gmoccapy_dist_smoke=ok
Remaining risk:
Interpreter isolation is complete for browser canonical execution, but this
still does not promote native LinuxCNC remap/planner, tool DB, task/HAL sync,
or external user-M process.
Next:
opfs_machine_file_staging_or_remap_planner_boundary
```
## 18. M14 追溯记录
```text
Batch: M14-opfs-machine-file-staging
Date: 2026-06-21 CST
Files changed:
app/package.json
app/scripts/build-static.mjs
app/src/main.js
app/src/runtime/linuxcnc-machine-file-staging.js
app/src/state/store.js
app/src/ui/gmoccapy-shell.js
tests/node/verify_machine_file_staging.mjs
tests/browser/gmoccapy_shell_smoke.html
Feature:
Adds LinuxCNC TRT machine-file staging for the web simulator. The runtime
reuses `planSimConfigStaging()` to collect INI, tool table, HAL/PyVCP assets,
remap NGC files, and demo G-code from the vendored LinuxCNC tree, then persists
those text files into OPFS-style machine paths. Store exposes stageMachineFiles()
and gmoccapy diagnostics render staging status.
LinuxCNC references:
wasm-port/runtime/sdk/src/sim-config-staging.js
wasm-port/tools/source-manifest.txt
configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzac-trt.ini
configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzbc-trt.ini
configs/sim/axis/vismach/5axis/table-rotary-tilting/remap_subs/*.ngc
configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/*.ngc
Boundary:
machineFileStagingBoundary=linuxcnc_sim_config_file_staging_plan_plus_opfs_text_persistence
stagedFiles=ini,hal,pyvcp,tool_table,remap_ngc,demo_gcode
nativeHalTaskSync=false
remapRuntimeReady=false
plannerRuntimeReady=false
fullLinuxCncProgramExecutionReady=false
Tests:
npm --prefix web-rtcp-5axis-sim-plan/app run smoke:node
npm --prefix web-rtcp-5axis-sim-plan/app run build
npm --prefix web-rtcp-5axis-sim-plan/app run smoke
Result:
machine_file_staging_smoke=ok
linuxcnc_kinematics_runtime_smoke=ok
linuxcnc_interpreter_runtime_smoke=ok
five_axis_session_smoke=ok
rtcp_store_smoke=ok
profile_boundary_smoke=ok
gmoccapy_static_build=ok
gmoccapy_shell_smoke=ok
gmoccapy_dist_smoke=ok
Remaining risk:
Machine files are staged and persisted as browser/host text assets. This does
not yet execute a machine-file backed LinuxCNC task session, native HAL sync,
Python/NGC remap runtime, full planner, tool DB, or external user-M process.
Next:
remap_planner_boundary_or_machine_file_backed_run
```
## 19. M15 追溯记录
```text
Batch: M15-machine-file-backed-fiveaxis-remap-run
Date: 2026-06-21 CST
Files changed:
app/src/runtime/linuxcnc-interpreter-runtime.js
app/src/runtime/linuxcnc-interpreter-worker.js
app/src/runtime/linuxcnc-interpreter-worker-client.js
app/src/runtime/linuxcnc-machine-file-staging.js
app/src/state/store.js
app/src/ui/gmoccapy-shell.js
tests/node/verify_machine_file_staging.mjs
tests/browser/gmoccapy_shell_smoke.html
Feature:
Adds machine-file backed five-axis remap execution. The simulator now stages
TRT machine files, forwards the staged INI/tool table/remap/demo files into
the LinuxCNC interpreter WASM filesystem, and calls
`runSimConfigProgram({ executionMode: "fiveAxisRemap" })`. Node and browser
smokes verify LinuxCNC reports INI open, remap readiness, and program exit.
LinuxCNC references:
wasm-port/runtime/sdk/src/linuxcnc-interp.js
wasm-port/runtime/sdk/src/sim-config-staging.js
configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzac-trt.ini
configs/sim/axis/vismach/5axis/table-rotary-tilting/remap_subs/428remap.ngc
configs/sim/axis/vismach/5axis/table-rotary-tilting/remap_subs/429remap.ngc
configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/xyzac_switchkins.ngc
Boundary:
machineFileBackedRunBoundary=linuxcnc_fiveaxis_remap_wasm_machine_file_execution
sourceMode=linuxcnc-machine-file-remap-wasm
remapRuntimeReady=vendored_linuxcnc_fiveaxis_remap_c_abi_for_staged_files
nativeTaskHalSync=false
plannerRuntimeReady=false
fullLinuxCncProgramExecutionReady=false
Tests:
npm --prefix web-rtcp-5axis-sim-plan/app run smoke:node
npm --prefix web-rtcp-5axis-sim-plan/app run build
npm --prefix web-rtcp-5axis-sim-plan/app run smoke
Result:
machine_file_staging_smoke=ok
linuxcnc_interpreter_runtime_smoke=ok
rtcp_store_smoke=ok
gmoccapy_shell_smoke=ok
gmoccapy_dist_smoke=ok
Remaining risk:
The run uses vendored LinuxCNC five-axis remap C ABI for staged files, but
still does not promote full native task/HAL synchronization, trajectory
planner runtime, tool DB process, or external user-M process.
Next:
planner_boundary_or_full_task_hal_gap_closure
```
## 20. M16 追溯记录
```text
Batch: M16-planner-task-hal-boundary-audit
Date: 2026-06-21 CST
Files changed:
app/package.json
app/src/runtime/full-execution-boundary.js
app/src/runtime/linuxcnc-interpreter-runtime.js
app/src/state/store.js
app/src/ui/gmoccapy-shell.js
tests/node/verify_full_execution_boundary.mjs
tests/node/verify_linuxcnc_interpreter_runtime.mjs
tests/node/verify_machine_file_staging.mjs
tests/node/verify_rtcp_store.mjs
tests/browser/gmoccapy_shell_smoke.html
Feature:
Adds a full LinuxCNC execution boundary audit layer. The Web simulator now
summarizes kinematics WASM, interpreter canonical motion, machine-file
staging, five-axis remap C ABI run, and switchkins HAL evidence in one
explicit diagnostics contract. It also adds an Audit control that can trigger
staging plus machine-file backed remap execution from the gmoccapy shell.
LinuxCNC references:
wasm-port/runtime/sdk/src/linuxcnc-interp.js
wasm-port/runtime/sdk/src/linuxcnc-hal.js
configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzac-trt.ini
configs/sim/axis/vismach/5axis/table-rotary-tilting/remap_subs/428remap.ngc
configs/sim/axis/vismach/5axis/table-rotary-tilting/remap_subs/429remap.ngc
configs/sim/axis/vismach/5axis/table-rotary-tilting/remap_subs/430remap.ngc
Boundary:
fullExecutionBoundary=linuxcnc_machine_file_remap_ready_planner_task_hal_blocked
remapRuntimeReady=true for staged fiveAxisRemap C ABI run
halSwitchkinsEvidenceReady=true for fiveaxis_hal_switchkins evidence
nativeTaskReady=false
nativeHalSyncReady=false
plannerRuntimeReady=false
fullLinuxCncProgramExecutionReady=false
promotionAllowed=false
Tests:
npm --prefix web-rtcp-5axis-sim-plan/app run smoke:node
npm --prefix web-rtcp-5axis-sim-plan/app run build
npm --prefix web-rtcp-5axis-sim-plan/app run smoke
Result:
full_execution_boundary_smoke=ok
machine_file_staging_smoke=ok
linuxcnc_interpreter_runtime_smoke=ok
rtcp_store_smoke=ok
gmoccapy_shell_smoke=ok
gmoccapy_dist_smoke=ok
Remaining risk:
Full native LinuxCNC task/NML process, realtime HAL thread synchronization,
trajectory planner queue runtime, external user-M process, and full tool DB
process are still not ported or promoted.
Next:
optional_native_task_hal_planner_port_or_release_handoff
```
## 21. M17 追溯记录
```text
Batch: M17-linuxcnc-5axis-gcode-source-ingest
Date: 2026-06-21 CST
Files changed:
app/src/runtime/linuxcnc-machine-file-staging.js
app/src/runtime/linuxcnc-interpreter-runtime.js
app/src/state/store.js
app/src/ui/gmoccapy-shell.js
tests/node/verify_machine_file_staging.mjs
tests/browser/gmoccapy_shell_smoke.html
Feature:
Adds real vendored LinuxCNC five-axis G-code source ingestion. TRT demo
programs from `configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/*.ngc`
are staged, listed in the gmoccapy G-code panel, loadable into the program
viewer, and used as the selected `wasmProgramPath` for machine-file backed
fiveAxisRemap execution.
LinuxCNC references:
configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/boat-xyzac.ngc
configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/boat-xyzbc.ngc
configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/impeller-7bl-xyzac.ngc
configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/xyzac_switchkins.ngc
configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/xyzbc_switchkins.ngc
Boundary:
gcodeSourceBoundary=linuxcnc_vendored_5axis_gcode_source_file
sourceMode=linuxcnc-vendored-5axis-gcode
machineFileBackedRunProgram=selected_staged_linuxcnc_ngc_source
sourceDirectoryGuard=configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/*.ngc only
remapRuntimeReady=true for staged fiveAxisRemap C ABI run
plannerRuntimeReady=false
nativeTaskReady=false
nativeHalSyncReady=false
fullLinuxCncProgramExecutionReady=false
Tests:
npm --prefix web-rtcp-5axis-sim-plan/app run smoke:node
npm --prefix web-rtcp-5axis-sim-plan/app run build
npm --prefix web-rtcp-5axis-sim-plan/app run smoke
Result:
machine_file_staging_smoke=ok
gmoccapy_shell_smoke=ok
gmoccapy_dist_smoke=ok
Remaining risk:
The selected G-code source is real LinuxCNC vendored source and the machine-file
run uses that selected file path, but full native task/NML, realtime HAL sync,
and trajectory planner queue runtime are still not promoted.
Next:
trajectory_planner_wasm_boundary_or_native_task_hal_port
```
## 16. M12 追溯记录
```text
Batch: M12-switchkins-rtcp-program-execution
Date: 2026-06-21 CST
Files changed:
app/src/runtime/linuxcnc-interpreter-runtime.js
app/src/runtime/linuxcnc-kinematics-runtime.js
app/src/runtime/linuxcnc-kinematics-worker.js
app/src/runtime/linuxcnc-kinematics-worker-client.js
app/src/state/store.js
app/src/ui/gmoccapy-shell.js
tests/node/verify_linuxcnc_interpreter_runtime.mjs
tests/node/verify_rtcp_store.mjs
tests/browser/gmoccapy_shell_smoke.html
Feature:
LinuxCNC TRT `M428/M429/M430` switchkins remap M-code is preserved as
program-level runtime events. The interpreter runtime strips those high M-codes
only from the WASM input program so LinuxCNC interpreter canonical motion can
continue, then annotates canonical motion with active switchkins state.
RUN/STEP/RUN_FRAME now applies program switchkins state to RTCP state and calls
LinuxCNC kinematics WASM `lckins_switch()` through direct and Worker runtimes.
LinuxCNC references:
configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzac-trt.ini
configs/sim/axis/vismach/5axis/table-rotary-tilting/remap_subs/428remap.ngc
configs/sim/axis/vismach/5axis/table-rotary-tilting/remap_subs/429remap.ngc
configs/sim/axis/vismach/5axis/table-rotary-tilting/remap_subs/430remap.ngc
src/emc/kinematics/switchkins.c
wasm-port/runtime/sdk/src/linuxcnc-kinematics.js
Boundary:
switchkinsProgramBoundary=linuxcnc_remap_mcode_preserved_and_web_runtime_applied
interpreter sourceMode=linuxcnc-interpreter-wasm
interpreter semanticBoundary=linuxcnc_interpreter_wasm_canonical_events
kinematics semanticBoundary=linuxcnc_kinematics_wasm_c_abi
remapRuntimeReady=false
plannerRuntimeReady=false
fullLinuxCncProgramExecutionReady=false
Tests:
npm --prefix web-rtcp-5axis-sim-plan/app run smoke:node
npm --prefix web-rtcp-5axis-sim-plan/app run build
npm --prefix web-rtcp-5axis-sim-plan/app run smoke
Result:
linuxcnc_kinematics_runtime_smoke=ok
linuxcnc_interpreter_runtime_smoke=ok
five_axis_session_smoke=ok
rtcp_store_smoke=ok
profile_boundary_smoke=ok
gmoccapy_static_build=ok
gmoccapy_shell_smoke=ok
gmoccapy_dist_smoke=ok
Remaining risk:
This preserves and applies switchkins remap M-codes in Web runtime, but does not
execute LinuxCNC Python/NGC remap, native HAL/task synchronization, full planner,
tool DB, or external user-M process.
Next:
interpreter_worker_or_opfs_machine_file_staging_or_remap_planner_boundary
```