Add OPFS G-code staging and browser simulation checks

This commit is contained in:
2026-06-22 10:56:21 +08:00
parent 8321055934
commit 61e2fe8441
19 changed files with 1869 additions and 35 deletions

View File

@@ -333,39 +333,42 @@ promotionAllowed=false
## 9. 当前状态
```text
status=M17_linuxcnc_5axis_gcode_source_ingest_complete
status=M22_host_native_boundary_visibility_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=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
latest_batch=M22-host-native-boundary-visibility
latest_gate=host_native_boundary_ui=ok,hardware_drive_false_visible=1,host_realtime_false_visible=1,external_user_m_false_visible=1,tool_db_false_visible=1,threejs_program_preview_mode=program-preview-and-tool-execution,threejs_preview_source=linuxcnc-interpreter-wasm_or_linuxcnc-machine-file-remap-wasm,threejs_toolpath_preview_source=linuxcnc_interpreter_canonical_motion,threejs_tool_execution_trace_source=linuxcnc_tp_samples_or_task_motion_hal_feedback,threejs_path_fit_bounds=ok,threejs_current_segment_highlight=ok,threejs_rapid_feed_visual_distinction=ok,threejs_no_gcode_semantics_generation=ok,threejs_canvas_nonblank_desktop=ok,threejs_canvas_nonblank_mobile=ok,opfs_unavailable_detected=1,opfs_fallback_current_page_lifecycle_only=1,non_opfs_workflows_still_pass=1,public_http_smoke_no_uncaught_exception=1,real_linuxcnc_5axis_program_cases_smoke=ok,native_task_hal_source_artifact_audit=ok,task_hal_web_simulation_boundary_consistent=1,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
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_with_linuxcnc_interpreter_execution
linuxcnc_5axis_gcode_sources=implemented_and_guarded_to_linuxcnc_source_manifest_trt_demos_only
linuxcnc_source_program_case_coverage=implemented_boat_xyzac_boat_xyzbc_impeller_xyzac_switchkins_xyzbc_switchkins_guarded_cases
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
threejs_preview=implemented_program_preview_and_tool_execution_with_fit_bounds_current_segment_and_rapid_feed_arc_layers
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_and_interpreter_runtime_connected_remap_planner_missing
full_execution_boundary=implemented_machine_file_remap_ready_with_planner_task_hal_blockers
host_native_boundary_visibility=implemented_ui_and_browser_smoke_guard_for_hardware_realtime_external_user_m_tool_db_false
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
session_persistence=implemented_opfs_save_restore_for_5axis_session_with_memory_fallback_when_opfs_unavailable
machine_file_staging=implemented_linuxcnc_trt_ini_hal_tool_table_remap_demo_opfs_staging_with_memory_fallback_when_opfs_unavailable
machine_file_backed_run=implemented_linuxcnc_fiveaxis_remap_wasm_machine_file_execution
planner_task_hal_gap=closed_for_web_simulation_boundary_with_task_motion_hal_wasm_runtime
native_task_hal_sync_plan=docs_native_task_hal_sync_implementation_steps_ready
native_task_hal_phase0_8=source_manifest_native_probe_hal_runtime_motion_hal_sync_task_shim_sdk_machine_file_store_ui_full_boundary_smokes_ready
next_batch=hardware_realtime_external_processes_if_required
native_task_hal_phase0_8=source_manifest_native_probe_hal_runtime_motion_hal_sync_task_shim_sdk_machine_file_store_ui_full_boundary_smokes_ready_and_m18_readiness_artifact_audited
native_task_hal_readiness_artifact=web-rtcp-5axis-sim-plan/build/readiness/native-task-hal-readiness.json
next_batch=none_from_development_continuation
```
当前 native task/HAL 接续状态:
@@ -419,6 +422,433 @@ plannerRuntimeReady=false
fullLinuxCncProgramExecutionReady=false
```
## 16. 最新接续基线
生成时间2026-06-22 CST
本节是下一轮工作的优先入口。旧的 M1-M17 记录保留为历史,不再作为“下一步”的判断依据;后续直接按本节和 `docs/native-task-hal-sync-implementation-steps.md` 执行。
### 16.1 当前完成情况
```text
ui_shell=ready
gmoccapy_layout=ready
profile_xyzac_trt=ready
profile_xyzbc_trt=ready
linuxcnc_kinematics_wasm=ready_browser_worker_and_node
linuxcnc_interpreter_wasm=ready_browser_worker_and_node
linuxcnc_tp_queue_timing=ready_for_canonical_motion
machine_file_staging=ready_opfs_and_memory_storage
machine_file_backed_fiveaxis_remap_run=ready_for_staged_linuxcnc_trt_sources
task_motion_hal_wasm_simulation_boundary=ready_for_web_simulation
threejs_program_preview=ready
threejs_tool_execution_display=ready
linuxcnc_source_program_case_coverage=ready_node_and_browser_guarded
nativeTaskReady=web_simulation_boundary_only
nativeHalSyncReady=web_simulation_boundary_only
opfs_degradation=ready_memory_fallback_current_page_lifecycle_only
hardwareDrive=false
hostRealtimeKernel=false
externalUserMProcessReady=false
toolDbProcessReady=false
```
已通过的当前 gate
```text
npm --prefix web-rtcp-5axis-sim-plan/app run smoke:node
bash web-rtcp-5axis-sim-plan/tests/browser/verify_gmoccapy_shell_browser.sh
bash web-rtcp-5axis-sim-plan/tests/browser/verify_gmoccapy_dist_browser.sh
```
### 16.2 Three.js 当前状态
Three.js 显示区现在不再承担 CNC 语义,只消费 LinuxCNC runtime 输出:
- 完整程序预览路径来自 `state.programExecution.motion`,即 LinuxCNC interpreter/WASM canonical motion events
- 已执行路径优先来自 `state.programExecutionTiming.samples`,即 LinuxCNC TP queue runtime timing samples
- 当前刀具/TCP 标记来自 `state.programRuntimeFeedback.axisPose` 或 task/HAL runtime feedback
- 刀轴方向线来自 `state.toolAxisVector`
- `Clear` 同步清空完整路径和已执行路径;
- 鼠标/触控旋转、平移、缩放和 `X/Y/Z/Fit` 预设视角已保留。
可观测 dataset
```text
canvas.dataset.threeSceneMode=program-preview-and-tool-execution
canvas.dataset.threeProgramPreviewSource=linuxcnc-interpreter-wasm / linuxcnc-machine-file-remap-wasm / fixture-line-playback
canvas.dataset.threeToolpathPreviewSource=linuxcnc_interpreter_canonical_motion
canvas.dataset.threeToolExecutionTraceSource=linuxcnc_tp_samples_or_task_motion_hal_feedback
canvas.dataset.threePathFitBounds=ok
canvas.dataset.threeCurrentSegmentHighlight=ok
canvas.dataset.threeRapidFeedVisualDistinction=ok
canvas.dataset.threeNoGcodeSemanticsGeneration=ok
canvas.dataset.threePathPoints=完整程序预览点数
canvas.dataset.threeExecutedPathPoints=已执行路径点数
canvas.dataset.threeRapidPathPoints=rapid 路径点数
canvas.dataset.threeFeedPathPoints=feed 路径点数
canvas.dataset.threeArcPathPoints=arc 路径点数
canvas.dataset.threeCurrentSegmentPoints=当前 segment 高亮点数
canvas.dataset.threeToolExecutionMarker=true/false
canvas.dataset.threeCameraControls=orbit-pan-zoom
```
边界要求:
```text
Three.js 不解析 G-code
Three.js 不重写 LinuxCNC 运动语义
Three.js 只显示 interpreter canonical motion、TP samples、task/HAL feedback
```
刀具路径预览和刀具执行轨迹对标要求:
```text
toolpath_preview_source=linuxcnc_source_program_interpreter_canonical_motion
tool_execution_trace_source=linuxcnc_tp_samples_or_task_motion_hal_feedback
tool_marker_source=linuxcnc_task_hal_or_runtime_feedback_tcp_pose
source_program_guard=linuxcnc_vendored_5axis_gcode_source_file
threejs_generated_toolpath_semantics=forbidden
```
- 完整刀具路径预览必须来自当前选中的 LinuxCNC 源程序 `.ngc` 经 interpreter/WASM 输出的 canonical motion不得由 Three.js 或 Web 侧按 G-code 文本自行推导;
- 已执行刀具轨迹必须优先来自 LinuxCNC TP queue timing samples 或 task/motion/HAL feedback不能用 UI 播放进度伪造为 LinuxCNC 执行轨迹;
- 刀具/TCP marker、刀轴和当前 segment 高亮必须能追溯到同一个 LinuxCNC runtime snapshot 或 canonical/timing event
- `boat-xyzac.ngc``boat-xyzbc.ngc``impeller-7bl-xyzac.ngc``xyzac_switchkins*.ngc``xyzbc_switchkins.ngc` 等案例需要逐个验证预览路径点数、执行轨迹点数、当前 G-code 行、RTCP/switchkins 状态和 source guard
- 如果 runtime fallback 到 fixture-line-playbackUI 可以显示降级预览,但不得把它标记为 LinuxCNC 源程序刀具路径对标通过。
### 16.3 后续工作总原则
后续工作按 `docs/native-task-hal-sync-implementation-steps.md` 执行,保持以下原则:
1. 不用 Web 侧自定义状态机替代 LinuxCNC task/HAL/motion 语义。
2. 不把 browser simulation boundary 扩大描述为真实硬件 runtime。
3. `nativeTaskReady=true``nativeHalSyncReady=true` 只允许在 Web simulation boundary 内成立,除非另有 host-native 对照和 WASM 比对 artifact。
4. `hardwareDrive=false``hostRealtimeKernel=false``externalUserMProcessReady=false``toolDbProcessReady=false` 必须继续明确展示。
5. 不修改用户个人备忘文件;本项目接续只写 `docs/development-continuation.md` 和必要工程文档。
### 16.4 下一批直接执行任务
```text
M18-native-task-hal-source-and-artifact-audit
```
状态:
```text
completed_with_machine_readable_readiness_artifact
```
目标:
- 对照 `docs/native-task-hal-sync-implementation-steps.md` 阶段 0-8审计当前源码、构建产物、测试和 UI 证据是否一致;
- 修正 `docs/development-continuation.md` 中旧段落遗留的 false/partial 状态,避免同一文件同时宣称 task/HAL ready 和 blocked
- 产出机器可读 readiness artifact明确 Web simulation promoted 与 hardware/native blocked 的区别。
建议检查文件:
```text
web-rtcp-5axis-sim-plan/app/src/runtime/linuxcnc-task-hal-runtime.js
web-rtcp-5axis-sim-plan/app/src/runtime/linuxcnc-task-hal-worker.js
web-rtcp-5axis-sim-plan/app/src/runtime/linuxcnc-task-hal-worker-client.js
web-rtcp-5axis-sim-plan/app/src/runtime/full-execution-boundary.js
web-rtcp-5axis-sim-plan/app/src/state/store.js
web-rtcp-5axis-sim-plan/app/src/ui/gmoccapy-shell.js
web-rtcp-5axis-sim-plan/tests/node/verify_linuxcnc_task_hal_runtime.mjs
web-rtcp-5axis-sim-plan/tests/browser/gmoccapy_shell_smoke.html
wasm-port/tests/wasm/node/verify_task_hal_wasm.sh
wasm-port/tests/wasm/node/verify_motion_hal_sync.sh
wasm-port/tests/wasm/node/verify_hal_runtime.sh
wasm-port/tests/native/probe_trt_task_hal_runtime.sh
```
验收:
```text
task_hal_web_simulation_boundary_consistent=1
native_task_hal_host_probe_status=passed_or_ready_disabled_by_default_or_skipped_missing_host_runtime
hardware_drive=0
host_realtime_kernel=0
external_user_m_process_ready=0
tool_db_process_ready=0
promotion_scope=web_simulation_only
```
已完成:
- 新增 `app/src/runtime/native-task-hal-audit.js`,汇总 source manifest、native opt-in probe、full execution boundary 和 task/HAL readiness
- 新增 `tests/node/verify_native_task_hal_audit.mjs`,默认运行 `wasm-port/tests/native/verify_task_hal_phase0.sh` 刷新 source/probe 证据;
- 生成机器可读 artifact `build/readiness/native-task-hal-readiness.json`
- `npm run smoke:node` 已接入该 gate
- 明确区分 `webSimulation.promoted=true``nativeHostAndHardware.hardwareDrive=false``hostRealtimeKernel=false``externalUserMProcessReady=false``toolDbProcessReady=false`
当前 M18 gate
```text
native_task_hal_source_artifact_audit=ok
task_hal_web_simulation_boundary_consistent=1
native_task_hal_host_probe_status=ready_disabled_by_default
hardware_drive=0
host_realtime_kernel=0
external_user_m_process_ready=0
tool_db_process_ready=0
promotion_scope=web_simulation_only
```
### 16.5 M19真实 LinuxCNC 源程序案例覆盖
```text
M19-linuxcnc-source-program-case-coverage
```
状态:
```text
completed_with_real_linuxcnc_source_program_case_smoke
```
目标:
- 继续以 LinuxCNC 源程序中的 5 轴 TRT demo 为准,不新增自定义 G-code 语义;
- 覆盖 `boat-xyzac.ngc``boat-xyzbc.ngc``impeller-7bl-xyzac.ngc``xyzac_switchkins*.ngc``xyzbc_switchkins.ngc`
- 每个案例都验证interpreter canonical motion、TP timing samples、Three.js 完整刀具路径预览、Three.js 已执行刀具轨迹、G-code 当前行、RTCP/switchkins 状态;
- 刀具路径预览和刀具执行轨迹必须对标 LinuxCNC 源程序 runtime 输出,不能由 Three.js/Web 自行解析或生成运动语义。
验收:
```text
linuxcnc_source_program_case_count>=5
all_cases_program_preview_points>0
all_cases_executed_path_points>0_after_run_or_step
all_cases_toolpath_preview_source=linuxcnc_interpreter_canonical_motion
all_cases_tool_execution_trace_source=linuxcnc_tp_samples_or_task_motion_hal_feedback
all_switchkins_cases_rtcp_state_changes_verified=1
all_cases_source_guard=linuxcnc_vendored_5axis_gcode_source_file
fixture_toolpath_fallback_not_promoted=1
```
建议新增或扩展:
```text
web-rtcp-5axis-sim-plan/tests/node/verify_real_linuxcnc_5axis_program_cases.mjs
web-rtcp-5axis-sim-plan/tests/browser/gmoccapy_shell_smoke.html
```
已完成:
- 新增 `tests/node/verify_real_linuxcnc_5axis_program_cases.mjs` 并接入 `npm run smoke:node`
- 覆盖 staged LinuxCNC TRT demo source guard`boat-xyzac.ngc``boat-xyzbc.ngc``impeller-7bl-xyzac.ngc``xyzac_switchkins.ngc``xyzac_switchkins_test_1.ngc``xyzac_switchkins_test_2.ngc``xyzac_switchkins_test_3.ngc``xyzbc_switchkins.ngc`
- 直接 canonical/TP 覆盖 `boat-xyzac.ngc``boat-xyzbc.ngc``impeller-7bl-xyzac.ngc``xyzac_switchkins_test_*.ngc`
-`xyzac_switchkins.ngc``xyzbc_switchkins.ngc` 这类 `o<sub> call` 入口,验证 LinuxCNC machine-file staging/remap run 和 source guard不把 direct interpreter 无子程序上下文时的 0 motion 标记为失败或通过;
- `linuxcnc-interpreter-runtime` 预处理单独一行的 LinuxCNC `%` 程序定界符为注释,保留行号,不新增 G-code 运动语义;
- TP WASM timing artifact 容量和大程序 sample stride 已支持 `impeller-7bl-xyzac.ngc` 的 4492 条 canonical motion 与 TP segment 对齐;
- browser smoke 在现有 `impeller-7bl-xyzac.ngc` 源程序流程中验证 canonical motion、TP samples、Three.js 完整路径/已执行轨迹和初始 RTCP switchkins 状态。
当前 M19 gate
```text
linuxcnc_source_program_case_count=8
all_cases_program_preview_points=ok
all_cases_executed_path_points=ok_after_run_or_step
all_cases_toolpath_preview_source=linuxcnc_interpreter_canonical_motion
all_cases_tool_execution_trace_source=linuxcnc_tp_samples_or_task_motion_hal_feedback
all_switchkins_cases_rtcp_state_changes_verified=1
all_cases_source_guard=linuxcnc_vendored_5axis_gcode_source_file
fixture_toolpath_fallback_not_promoted=1
real_linuxcnc_5axis_program_cases_smoke=ok
```
边界说明:
```text
sourceProgramBoundary=linuxcnc_vendored_5axis_gcode_source_file
toolpathPreviewBoundary=linuxcnc_interpreter_canonical_motion
toolExecutionTraceBoundary=linuxcnc_tp_samples_or_task_motion_hal_feedback
threejsGeneratedToolpathSemantics=forbidden
fixtureToolpathFallbackPromoted=false
hardwareDrive=false
```
### 16.6 M20Three.js 执行显示质量提升
```text
M20-threejs-tool-execution-quality
```
状态:
```text
completed_with_tool_execution_quality_smoke
```
目标:
- 保持 Three.js 不解析 G-code只消费 runtime 输出;
- 增加执行进度色带或当前 segment 高亮;
- 明确 rapid/feed/arc/switchkins segment 的可视区别;
- 增加路径 fit bounds避免真实 LinuxCNC 大程序被固定 clamp 后压扁;
- 增加 desktop/mobile 截图或 canvas pixel smoke验证刀具路径预览、已执行刀具轨迹和刀具 marker 不重叠、不空白;
- 任何可视化质量提升都必须保持路径点、segment 类型、当前刀具位置来源于 LinuxCNC interpreter/TP/task-HAL 输出。
验收:
```text
threejs_program_preview_mode=program-preview-and-tool-execution
threejs_preview_source=linuxcnc-interpreter-wasm_or_linuxcnc-machine-file-remap-wasm
threejs_toolpath_preview_source=linuxcnc_interpreter_canonical_motion
threejs_tool_execution_trace_source=linuxcnc_tp_samples_or_task_motion_hal_feedback
threejs_path_fit_bounds=ok
threejs_current_segment_highlight=ok
threejs_rapid_feed_visual_distinction=ok
threejs_no_gcode_semantics_generation=ok
threejs_canvas_nonblank_desktop=ok
threejs_canvas_nonblank_mobile=ok
```
已完成:
- Three.js 增加 rapid/feed/arc 分层路径、已执行路径和当前 segment 高亮;
- `Fit` 改为按当前程序预览、执行轨迹、当前 segment、TCP marker 和刀轴点集计算 bounds避免真实大程序在固定范围内压扁
- dataset 明确输出 toolpath preview source、tool execution trace source、fit bounds、当前 segment、rapid/feed 区分和 no G-code semantics generation
- fallback canvas 同步输出相同的可观测 gate并绘制当前 segment
- browser smoke 在真实 LinuxCNC `impeller-7bl-xyzac.ngc` 源程序路径中验证 desktop/mobile canvas nonblank、路径来源、rapid/feed 区分和当前 segment。
当前 M20 gate
```text
threejs_program_preview_mode=program-preview-and-tool-execution
threejs_preview_source=linuxcnc-interpreter-wasm_or_linuxcnc-machine-file-remap-wasm
threejs_toolpath_preview_source=linuxcnc_interpreter_canonical_motion
threejs_tool_execution_trace_source=linuxcnc_tp_samples_or_task_motion_hal_feedback
threejs_path_fit_bounds=ok
threejs_current_segment_highlight=ok
threejs_rapid_feed_visual_distinction=ok
threejs_no_gcode_semantics_generation=ok
threejs_canvas_nonblank_desktop=ok
threejs_canvas_nonblank_mobile=ok
```
### 16.7 M21公网部署与 OPFS 降级
```text
M21-public-http-opfs-degradation
```
状态:
```text
completed_with_public_http_fallback_smoke
```
背景:
公网 `http://82.156.24.101:8092` 这类 HTTP/IP 环境不是安全上下文OPFS 可能不可用。此前测试中 Save Session 已出现 `OPFS is not available in this browser`
目标:
- 检测非安全上下文和 OPFS 不可用状态;
- 让 Save Session、Restore Session、Stage Machine Files、Full Boundary Audit 给出明确 UI 状态;
- 不让 OPFS 缺失阻断不依赖 OPFS 的预览、运行、Three.js 显示、DRO、G-code 加载;
- 可选增加 memory fallback仅用于当前页面生命周期不宣称持久化。
验收:
```text
opfs_unavailable_detected=1
opfs_dependent_actions_blocked_with_clear_message=1
non_opfs_workflows_still_pass=1
public_http_smoke_no_uncaught_exception=1
```
已完成:
- `five-axis-session``linuxcnc-machine-file-staging` 增加 storage capability 检测,识别非安全上下文、缺失 `navigator.storage.getDirectory()` 和测试强制 OPFS unavailable
- OPFS 不可用时 Save Session、Restore Session、Stage Machine Files 使用 memory fallback只在当前页面生命周期内有效不声明持久化
- UI diagnostics 显示 `opfs unavailable`、fallback mode 和原因,避免静默失败;
- machine-file staging 在 memory fallback 下仍可支持不依赖持久 OPFS 的预览、运行、Three.js、DRO、G-code 加载和 full boundary audit
- browser smoke 强制 OPFS unavailable验证 source 页面没有 uncaught error非 OPFS 工作流仍通过。
当前 M21 gate
```text
opfs_unavailable_detected=1
opfs_fallback_current_page_lifecycle_only=1
opfs_dependent_actions_report_clear_fallback_message=1
non_opfs_workflows_still_pass=1
public_http_smoke_no_uncaught_exception=1
```
### 16.8 M22Host/native 边界可见性
```text
M22-host-native-boundary-visibility
```
状态:
```text
completed_with_host_native_boundary_ui_smoke
```
目标:
- 在 Web simulation boundary 已 promoted 时,继续明确展示非浏览器仿真范围;
- UI diagnostics 必须显示 `hardwareDrive=false``hostRealtimeKernel=false``externalUserMProcessReady=false``toolDbProcessReady=false`
- browser smoke 同时验证 state 字段和 DOM 文本,避免把 Web simulation promoted 误读为真实硬件、host realtime、外部 user-M 或 tool DB runtime ready。
已完成:
- gmoccapy info tabs 新增 `Host/native` 诊断行;
- `Host/native` 显示 hardware drive、host realtime、external user-M、tool DB 四项 false 状态;
- browser smoke 在 task/HAL full simulation boundary promoted 后验证四项 state 和 DOM 可见性。
当前 M22 gate
```text
host_native_boundary_ui=ok
hardware_drive_false_visible=1
host_realtime_false_visible=1
external_user_m_false_visible=1
tool_db_false_visible=1
```
### 16.9 每轮必须执行的回归
常规回归:
```text
npm --prefix web-rtcp-5axis-sim-plan/app run smoke:node
bash web-rtcp-5axis-sim-plan/tests/browser/verify_gmoccapy_shell_browser.sh
bash web-rtcp-5axis-sim-plan/tests/browser/verify_gmoccapy_dist_browser.sh
```
涉及 WASM core 时追加:
```text
bash wasm-port/tests/wasm/node/verify_hal_runtime.sh
bash wasm-port/tests/wasm/node/verify_motion_hal_sync.sh
bash wasm-port/tests/wasm/node/verify_task_hal_wasm.sh
bash wasm-port/tests/wasm/node/verify_task_hal_sdk.sh
bash wasm-port/tests/native/probe_trt_task_hal_runtime.sh
```
涉及部署时追加:
```text
npm --prefix web-rtcp-5axis-sim-plan/app run build
bash web-rtcp-5axis-sim-plan/tests/browser/verify_gmoccapy_dist_browser.sh
```
### 16.10 禁止事项
```text
禁止修改用户个人备忘文件,除非用户明确要求
禁止把 fixture fallback 描述为 LinuxCNC semantic proof
禁止把 Web simulation task/HAL runtime 描述为真实硬件控制
禁止绕过 LinuxCNC interpreter/TP/task/HAL 输出去手写 G-code 运动语义
禁止默认启动 host-native LinuxCNC runtime 或抢占已有 linuxcncsvr/rtapi_app
```
## 14. M16 任务
```text

View File

@@ -294,10 +294,27 @@ toolAxisVector
rtcpState
rtcpFrame.apiName
preview.selectedView
programExecution.motion
programExecutionTiming.samples
programRuntimeFeedback
```
browser smoke 已检查 canvas nonblank、scene objects、path points、RTCP on/off 同步和 STEP 后 TCP pose 更新。
当前 M20 已补齐真实程序显示质量 gate
```text
program preview=LinuxCNC interpreter canonical motion
tool execution trace=LinuxCNC TP samples or task/motion/HAL feedback
rapid/feed/arc visual layers=ready
current segment highlight=ready
path fit bounds=ready
desktop/mobile canvas nonblank=ready
threejs_generated_gcode_semantics=forbidden
```
Three.js 只按 runtime 输出的 motion/timing/feedback 绘制,不解析 G-code不生成 CNC 运动语义。
### Step 5profile 和 panel schema
目标:
@@ -493,6 +510,96 @@ hostRealtimeKernel=false
externalUserMProcessReady=false
```
### Step 10Native task/HAL readiness artifact
目标:
- 对齐 `docs/native-task-hal-sync-implementation-steps.md` 阶段 0-8 的 source/probe/runtime 证据;
- 生成机器可读 artifact明确 Web simulation promoted 与 host realtime/hardware/native process blocked 的区别;
- 把该 gate 接入常规 Node smoke避免文档和 runtime readiness 字段漂移。
当前实现:
```text
app/src/runtime/native-task-hal-audit.js
tests/node/verify_native_task_hal_audit.mjs
build/readiness/native-task-hal-readiness.json
```
artifact 必须包含:
```text
status=ok
taskHalWebSimulationBoundaryConsistent=true
webSimulation.promoted=true
webSimulation.nativeTaskReady=true
webSimulation.nativeHalSyncReady=true
nativeHostAndHardware.nativePromotionAllowed=false
nativeHostAndHardware.hardwareDrive=false
nativeHostAndHardware.hostRealtimeKernel=false
nativeHostAndHardware.externalUserMProcessReady=false
nativeHostAndHardware.toolDbProcessReady=false
gates.promotion_scope=web_simulation_only
```
验收:
```text
native_task_hal_source_artifact_audit=ok
task_hal_web_simulation_boundary_consistent=1
native_task_hal_host_probe_status=passed_or_ready_disabled_by_default_or_skipped_missing_host_runtime
hardware_drive=0
host_realtime_kernel=0
external_user_m_process_ready=0
tool_db_process_ready=0
promotion_scope=web_simulation_only
```
### Step 11LinuxCNC source program case coverage
目标:
- 以 vendored LinuxCNC TRT demo `.ngc` 为案例源,不新增 Web 侧 G-code 运动语义;
- 覆盖 `boat-xyzac.ngc``boat-xyzbc.ngc``impeller-7bl-xyzac.ngc`
`xyzac_switchkins*.ngc``xyzbc_switchkins.ngc`
- 对可直接解释的源程序,验证 interpreter canonical motion、TP queue timing samples、
当前 G-code 行、switchkins/RTCP 状态和 Three.js 数据源;
-`o<sub> call` 入口程序,验证 machine-file staging/remap run 与 source guard
不把 direct interpreter 无子程序上下文时的 0 motion 当成通过。
当前实现:
```text
tests/node/verify_real_linuxcnc_5axis_program_cases.mjs
tests/browser/gmoccapy_shell_smoke.html
app/src/runtime/linuxcnc-interpreter-runtime.js
wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_tp_wasm.c
```
关键约束:
```text
sourceProgramBoundary=linuxcnc_vendored_5axis_gcode_source_file
toolpathPreviewBoundary=linuxcnc_interpreter_canonical_motion
toolExecutionTraceBoundary=linuxcnc_tp_samples_or_task_motion_hal_feedback
threejsGeneratedToolpathSemantics=forbidden
fixtureToolpathFallbackPromoted=false
```
验收:
```text
linuxcnc_source_program_case_count=8
all_cases_program_preview_points=ok
all_cases_executed_path_points=ok_after_run_or_step
all_cases_toolpath_preview_source=linuxcnc_interpreter_canonical_motion
all_cases_tool_execution_trace_source=linuxcnc_tp_samples_or_task_motion_hal_feedback
all_switchkins_cases_rtcp_state_changes_verified=1
all_cases_source_guard=linuxcnc_vendored_5axis_gcode_source_file
fixture_toolpath_fallback_not_promoted=1
real_linuxcnc_5axis_program_cases_smoke=ok
```
不允许:
- 用 JS 重写 lookahead、blend、exact stop、S-curve 或 G-code modal 语义;
@@ -516,6 +623,10 @@ externalUserMProcessReady=false
当前已完成 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/选择/运行路径。native task/HAL 执行文档的 Phase 0-8 已建立 Web simulation boundarysource manifest、默认禁用的 native TRT probe、HAL registry/thread scheduler、minimal motion/HAL servo-cycle C ABI、`lctask_*` task shim、SDK wrapper、machine-file session、store/UI diagnostics 和 full boundary gate。`M428/M429/M430` 当前既可作为 Web runtime switchkins 事件驱动 `lckins_switch()`,也可在 staged machine-file run 中交给 vendored LinuxCNC five-axis remap C ABI 验证,还可通过 task/HAL runtime 的 MDI path 写入 `motion.switchkins-type` HAL snapshot只有 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` 可以在 kinematics/interpreter/machine-file-remap/TP/task-HAL gates 同时通过时报告 `promotionAllowed=true`,但该提升仅限 Web simulation boundary仍必须显示 `hardwareDrive=false``hostRealtimeKernel=false``externalUserMProcessReady=false``toolDbProcessReady=false`
OPFS session 和 machine-file staging 当前具备 capability 检测。安全上下文且 `navigator.storage.getDirectory()` 可用时使用 OPFS公网 HTTP/IP 或浏览器禁用 OPFS 时切换到 memory fallback。memory fallback 只保证当前页面生命周期内的保存、恢复、staging 和 full boundary audit 可继续运行不声明跨刷新持久化。UI diagnostics 必须显示 storage mode、OPFS unavailable 状态和原因,公共 HTTP smoke 必须验证无 uncaught exception且不依赖 OPFS 的预览、DRO、G-code 加载、运行和 Three.js 显示继续通过。
gmoccapy info tabs 当前还必须显示 Host/native boundary`hardwareDrive=false``hostRealtimeKernel=false``externalUserMProcessReady=false``toolDbProcessReady=false`。browser smoke 需要同时检查 DOM 和 `fullExecutionBoundary` state避免把 Web simulation promoted 误读为 host-native 或硬件能力 ready。
注意:`wasm-port/tests/wasm/node/verify_hal_runtime.sh``wasm-port/tests/wasm/node/verify_motion_hal_sync.sh``wasm-port/tests/wasm/node/verify_task_hal_wasm.sh``wasm-port/tests/wasm/node/verify_task_hal_sdk.sh` 会写同一个 `build/wasm/task-hal/linuxcnc_task_hal.*` 输出,验证时应串行运行,避免并发构建竞争造成无效 WASM 产物。
后续如果要越过 Web simulation boundary必须另行实现 host realtime kernel / hardware IO / external user-M / tool DB process 证明;当前完成范围仍限定为浏览器仿真。

View File

@@ -29,10 +29,12 @@ CNC 语义必须来自 LinuxCNC source/WASM/source-derived boundary
| 程序运行/暂停/继续/停止 | `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 |
| LinuxCNC 5 轴源程序案例覆盖 | `tests/node/verify_real_linuxcnc_5axis_program_cases.mjs`, `tests/browser/gmoccapy_shell_smoke.html`, `app/src/runtime/linuxcnc-interpreter-runtime.js` | `boat-xyzac.ngc`, `boat-xyzbc.ngc`, `impeller-7bl-xyzac.ngc`, `xyzac_switchkins*.ngc`, `xyzbc_switchkins.ngc` | source-guarded LinuxCNC demo canonical/TP/toolpath coverage; `o<sub> call` entries verified through machine-file staging/remap boundary | real LinuxCNC 5-axis program cases node smoke + browser source program 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 |
| 3D 五轴预览 | `app/src/visualization/five-axis-scene.js` | `qtvismach_5axis_gantry.png`, `lib/python/vismach.py` | visualization consuming runtime state | canvas nonblank smoke |
| Three.js 程序预览和执行轨迹 | `app/src/visualization/five-axis-scene.js`, `tests/browser/gmoccapy_shell_smoke.html` | LinuxCNC interpreter canonical motion, LinuxCNC TP timing samples, task/motion/HAL feedback | display only; no G-code semantics generated in Three.js | source-program browser smoke + desktop/mobile canvas nonblank |
| 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 |
@@ -41,10 +43,11 @@ CNC 语义必须来自 LinuxCNC source/WASM/source-derived boundary
| 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/TP WASM adapter point | kinematics + interpreter + TP timing runtime connected; task/motion/HAL simulation runtime connected separately | 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, task/motion/HAL WASM, `runSimConfigProgram({ executionMode: "fiveAxisRemap" })`, TRT remap files | machine-file remap, TP timing, and task/motion/HAL ready for Web simulation boundary; hardware/realtime kernel/external processes still false | full execution boundary node smoke + browser DOM smoke |
| Native task/HAL readiness artifact | `app/src/runtime/native-task-hal-audit.js`, `tests/node/verify_native_task_hal_audit.mjs`, `build/readiness/native-task-hal-readiness.json` | `wasm-port/tools/task-hal-source-manifest.txt`, `wasm-port/tests/native/probe_trt_task_hal_runtime.sh`, task/motion/HAL WASM gates | machine-readable audit that separates Web simulation promotion from host realtime/hardware/native process blockers | native task/HAL audit node smoke |
| Native task / realtime HAL sync runtime | `docs/native-task-hal-sync-implementation-steps.md`, `wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_task_hal_wasm.cpp`, `app/src/runtime/linuxcnc-task-hal-runtime.js` | `src/emc/task/emctaskmain.cc`, `src/emc/task/emctask.cc`, `src/emc/task/taskintf.cc`, `src/emc/task/emccanon.cc`, `src/emc/motion/control.c`, `src/emc/motion/command.c`, `src/emc/motion/motion.c`, `src/hal/hal_lib.c`, `src/hal/hal_priv.h` | task/motion/HAL deterministic WASM simulation runtime; host realtime/hardware out of scope | source manifest, native opt-in probe, HAL runtime smoke, motion/HAL sync smoke, task/HAL WASM SDK smoke, Web store/browser 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/five-axis-session.js` | current `wasm-port/runtime/opfs` | browser OPFS 5-axis session persistence | five_axis_session_smoke + browser save/restore smoke |
| OPFS/session storage capability | `app/src/runtime/five-axis-session.js`, `app/src/runtime/linuxcnc-machine-file-staging.js`, `app/src/ui/gmoccapy-shell.js` | browser OPFS contract and current page memory fallback | OPFS persistence when available; memory fallback is current page lifecycle only | five_axis_session_smoke + machine_file_staging_smoke + public HTTP fallback browser smoke |
## 3. 源文件追溯清单
@@ -1192,3 +1195,257 @@ Remaining risk:
Next:
interpreter_worker_or_opfs_machine_file_staging_or_remap_planner_boundary
```
## 21. M18 追溯记录
```text
Batch: M18-native-task-hal-source-and-artifact-audit
Date: 2026-06-22 CST
Files changed:
.gitignore
app/package.json
app/src/runtime/native-task-hal-audit.js
tests/node/verify_native_task_hal_audit.mjs
docs/development-continuation.md
docs/program-implementation-guide.md
docs/traceability-matrix.md
Feature:
Adds a machine-readable readiness audit for the native task/HAL source and
artifact boundary. The audit consumes task/HAL source manifest evidence,
default non-exclusive TRT native probe evidence, full execution boundary
readiness, and task/HAL runtime status, then writes
build/readiness/native-task-hal-readiness.json.
LinuxCNC references:
wasm-port/tools/task-hal-source-manifest.txt
wasm-port/tests/native/probe_trt_task_hal_runtime.sh
src/emc/task/emctaskmain.cc
src/emc/motion/control.c
src/hal/hal_lib.c
Boundary:
webSimulation.promotionScope=web_simulation_only
nativeTaskReady=true for Web simulation boundary only
nativeHalSyncReady=true for Web simulation boundary only
hardwareDrive=false
hostRealtimeKernel=false
externalUserMProcessReady=false
toolDbProcessReady=false
Tests:
node web-rtcp-5axis-sim-plan/tests/node/verify_native_task_hal_audit.mjs
npm --prefix web-rtcp-5axis-sim-plan/app run smoke:node
bash web-rtcp-5axis-sim-plan/tests/browser/verify_gmoccapy_shell_browser.sh
bash web-rtcp-5axis-sim-plan/tests/browser/verify_gmoccapy_dist_browser.sh
Result:
native_task_hal_source_artifact_audit=ok
task_hal_web_simulation_boundary_consistent=1
native_task_hal_host_probe_status=ready_disabled_by_default
hardware_drive=0
host_realtime_kernel=0
external_user_m_process_ready=0
tool_db_process_ready=0
promotion_scope=web_simulation_only
Remaining risk:
The readiness artifact does not execute host realtime LinuxCNC or hardware IO.
It intentionally keeps external user-M process and tool DB process readiness
false.
Next:
M19-linuxcnc-source-program-case-coverage
```
## 22. M19 追溯记录
```text
Batch: M19-linuxcnc-source-program-case-coverage
Date: 2026-06-22 CST
Files changed:
app/package.json
app/src/runtime/linuxcnc-interpreter-runtime.js
tests/node/verify_real_linuxcnc_5axis_program_cases.mjs
tests/browser/gmoccapy_shell_smoke.html
wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_tp_wasm.c
docs/development-continuation.md
docs/program-implementation-guide.md
docs/traceability-matrix.md
Feature:
Adds a real LinuxCNC TRT source-program case gate. The gate covers staged
source guards for boat, impeller, xyzac switchkins, and xyzbc switchkins demo
programs; validates direct interpreter canonical motion and LinuxCNC TP
samples where the source file is directly executable; and validates
machine-file staging/remap readiness for subroutine-entry demo files.
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/xyzac_switchkins_test_1.ngc
configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/xyzac_switchkins_test_2.ngc
configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/xyzac_switchkins_test_3.ngc
configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/xyzbc_switchkins.ngc
src/emc/tp/tp.c
Boundary:
sourceProgramBoundary=linuxcnc_vendored_5axis_gcode_source_file
toolpathPreviewBoundary=linuxcnc_interpreter_canonical_motion
toolExecutionTraceBoundary=linuxcnc_tp_samples_or_task_motion_hal_feedback
threejsGeneratedToolpathSemantics=forbidden
fixtureToolpathFallbackPromoted=false
Tests:
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_real_linuxcnc_5axis_program_cases.mjs
npm --prefix web-rtcp-5axis-sim-plan/app run smoke:node
bash web-rtcp-5axis-sim-plan/tests/browser/verify_gmoccapy_shell_browser.sh
bash web-rtcp-5axis-sim-plan/tests/browser/verify_gmoccapy_dist_browser.sh
Result:
linuxcnc_source_program_case_count=8
all_cases_program_preview_points=ok
all_cases_executed_path_points=ok_after_run_or_step
all_cases_toolpath_preview_source=linuxcnc_interpreter_canonical_motion
all_cases_tool_execution_trace_source=linuxcnc_tp_samples_or_task_motion_hal_feedback
all_switchkins_cases_rtcp_state_changes_verified=1
all_cases_source_guard=linuxcnc_vendored_5axis_gcode_source_file
fixture_toolpath_fallback_not_promoted=1
real_linuxcnc_5axis_program_cases_smoke=ok
Remaining risk:
`xyzac_switchkins.ngc` and `xyzbc_switchkins.ngc` are subroutine-entry demo
files; direct interpreter execution without staged subroutine context still
has zero canonical motion, so they remain verified through source guard and
machine-file remap staging rather than direct single-file preview.
Next:
M20-threejs-tool-execution-quality
```
## 23. M20 Three.js 显示质量追溯记录
```text
Batch: M20-threejs-tool-execution-quality
Date: 2026-06-22 CST
Files changed:
app/src/visualization/five-axis-scene.js
tests/browser/gmoccapy_shell_smoke.html
docs/development-continuation.md
docs/program-implementation-guide.md
docs/traceability-matrix.md
Feature:
Adds program-preview and tool-execution display quality gates to Three.js.
The scene now draws rapid/feed/arc layers, the executed TP/task trace, and
the current segment highlight while fitting the camera to real LinuxCNC
source-program bounds.
LinuxCNC references:
LinuxCNC interpreter canonical motion events
LinuxCNC TP queue timing samples
task/motion/HAL runtime feedback snapshots
Boundary:
threejsProgramPreviewMode=program-preview-and-tool-execution
toolpathPreviewBoundary=linuxcnc_interpreter_canonical_motion
toolExecutionTraceBoundary=linuxcnc_tp_samples_or_task_motion_hal_feedback
threejsGeneratedToolpathSemantics=forbidden
Tests:
bash web-rtcp-5axis-sim-plan/tests/browser/verify_gmoccapy_shell_browser.sh
bash web-rtcp-5axis-sim-plan/tests/browser/verify_gmoccapy_dist_browser.sh
Result:
threejs_program_preview_mode=program-preview-and-tool-execution
threejs_toolpath_preview_source=linuxcnc_interpreter_canonical_motion
threejs_tool_execution_trace_source=linuxcnc_tp_samples_or_task_motion_hal_feedback
threejs_path_fit_bounds=ok
threejs_current_segment_highlight=ok
threejs_rapid_feed_visual_distinction=ok
threejs_no_gcode_semantics_generation=ok
threejs_canvas_nonblank_desktop=ok
threejs_canvas_nonblank_mobile=ok
Remaining risk:
The visual distinction is display-only and remains limited to canonical/TP
segment data already emitted by LinuxCNC runtimes. It does not add lookahead,
blending, planner semantics, or hardware execution semantics in Three.js.
Next:
M21-public-http-opfs-degradation
```
## 24. M21 公网 OPFS 降级追溯记录
```text
Batch: M21-public-http-opfs-degradation
Date: 2026-06-22 CST
Files changed:
app/src/runtime/five-axis-session.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
docs/development-continuation.md
docs/program-implementation-guide.md
docs/traceability-matrix.md
Feature:
Adds explicit storage capability detection and current-page memory fallback
for public HTTP/IP deployments where OPFS is unavailable. Session save/restore
and machine-file staging continue inside the current page lifecycle, while UI
diagnostics report OPFS unavailable and the fallback reason.
LinuxCNC references:
LinuxCNC machine-file staging remains based on vendored TRT source/config
files; storage fallback does not alter interpreter, TP, task/HAL, or
kinematics semantics.
Boundary:
opfsAvailable=false when browser capability is missing or forced unavailable
fallbackMode=memory-fallback
memoryFallbackPersistence=current_page_lifecycle_only
nonOpfsWorkflowsStillPass=true
Tests:
node web-rtcp-5axis-sim-plan/tests/node/verify_machine_file_staging.mjs
node web-rtcp-5axis-sim-plan/tests/node/verify_five_axis_session.mjs
npm --prefix web-rtcp-5axis-sim-plan/app run smoke:node
bash web-rtcp-5axis-sim-plan/tests/browser/verify_gmoccapy_shell_browser.sh
bash web-rtcp-5axis-sim-plan/tests/browser/verify_gmoccapy_dist_browser.sh
Result:
opfs_unavailable_detected=1
opfs_fallback_current_page_lifecycle_only=1
opfs_dependent_actions_report_clear_fallback_message=1
non_opfs_workflows_still_pass=1
public_http_smoke_no_uncaught_exception=1
Remaining risk:
Memory fallback is not persistent across reloads. True OPFS persistence still
requires a secure context and browser OPFS support.
Next:
none_from_development_continuation
```
## 25. M22 Host/native 边界可见性追溯记录
```text
Batch: M22-host-native-boundary-visibility
Date: 2026-06-22 CST
Files changed:
app/src/ui/gmoccapy-shell.js
tests/browser/gmoccapy_shell_smoke.html
docs/development-continuation.md
docs/traceability-matrix.md
Feature:
Adds an explicit Host/native diagnostics row in gmoccapy info tabs so the
promoted Web simulation task/motion/HAL boundary remains visibly separated
from hardware drive, host realtime kernel, external user-M process, and tool
DB process readiness.
LinuxCNC references:
No new LinuxCNC source semantics are introduced. The change displays existing
full execution boundary fields emitted by the LinuxCNC task/motion/HAL Web
simulation runtime audit.
Boundary:
hardwareDrive=false
hostRealtimeKernel=false
externalUserMProcessReady=false
toolDbProcessReady=false
promotionScope=web_simulation_only
Tests:
bash web-rtcp-5axis-sim-plan/tests/browser/verify_gmoccapy_shell_browser.sh
bash web-rtcp-5axis-sim-plan/tests/browser/verify_gmoccapy_dist_browser.sh
npm --prefix web-rtcp-5axis-sim-plan/app run smoke:node
Result:
host_native_boundary_ui=ok
hardware_drive_false_visible=1
host_realtime_false_visible=1
external_user_m_false_visible=1
tool_db_false_visible=1
Remaining risk:
This is a visibility and regression guard only. It does not implement host
realtime kernel, hardware IO, external user-M process, or native tool DB
process support.
Next:
none_from_development_continuation
```