1098 lines
45 KiB
Plaintext
1098 lines
45 KiB
Plaintext
项目整体完成情况与后续执行计划
|
||
|
||
生成时间:2026-06-14 CST
|
||
|
||
本文件接替 `text9.txt`。后续工作按 `text10.txt` 执行;除非明确要求审计旧记录,
|
||
不要再回到 `text1/text2/text3/text4/text5/text6/text7/text8/text9` 扩展进度。
|
||
`text9.txt` 作为历史归档保留。
|
||
|
||
一、续接状态与防重规则
|
||
|
||
1. 当前续接点。
|
||
|
||
`text9.txt` 已推进到:
|
||
|
||
```text
|
||
五十一、2026-06-14 继续执行记录:browser ini-named readback path groups guard
|
||
```
|
||
|
||
该批已提交并推送:
|
||
|
||
```text
|
||
0b7771b 继续推进浏览器 ini-named readback path 组 guard
|
||
```
|
||
|
||
本文件从 `text10.txt` 重新开始记录后续进度。
|
||
|
||
2. 每轮开始前必须先执行。
|
||
|
||
```bash
|
||
git status --short
|
||
git log -5 --oneline
|
||
tail -n 120 text10.txt
|
||
awk '/^[一二三四五六七八九十百]+、/ {print}' text10.txt | sort | uniq -d
|
||
```
|
||
|
||
执行规则:
|
||
|
||
- 如果 `git status --short` 是 clean,且最新提交已经包含当前建议工作,不要重复追加记录;
|
||
- 每轮只追加一个新的中文编号记录;提交前再次检查标题唯一性;
|
||
- `text10.txt` 只记录新的后续进度,不复制 `text9.txt` 的长历史;
|
||
- 每批完成后,如果要写记录,先写 `text10.txt`,再提交该批代码和记录;
|
||
- 如果发现重复记录,先做 dedupe 清理并提交,再继续新功能或新 guard;
|
||
- `text9.txt` 不再追加新进度,除非明确要求审计或修正历史记录。
|
||
|
||
二、当前项目纪律
|
||
|
||
1. LinuxCNC 仍是唯一 CNC 语义来源。
|
||
|
||
G-code、remap、tool、parameter、planner、kinematics、user-M、tool DB、Python
|
||
remap 等语义必须来自 LinuxCNC upstream 或 vendored LinuxCNC C/C++/配置/脚本源码。
|
||
|
||
2. 本项目允许实现的范围仍限于:
|
||
|
||
- build;
|
||
- source sync;
|
||
- runtime shim;
|
||
- filesystem staging;
|
||
- OPFS;
|
||
- WASM/browser boundary;
|
||
- 测试胶水;
|
||
- 文档;
|
||
- 机器可读 gate/artifact。
|
||
|
||
3. 禁止事项继续有效:
|
||
|
||
- 不在 JS 中重写 G-code 或 CNC 语义;
|
||
- 不修改 vendored LinuxCNC 源文件来让测试通过;
|
||
- 不把 full-process/HAL/UI/Python/tool DB 依赖伪装成 standalone pass;
|
||
- 不把 expected failure 硬改成 pass,除非已有 LinuxCNC-owned runtime proof,并且
|
||
native、Node、browser gate 都按顺序通过;
|
||
- browser 不能依赖目录枚举。
|
||
|
||
4. 加快实质性推进铁律。
|
||
|
||
核心移植已稳定后,暂停性能测试和纯 test glue 微整理,后续默认优先推进能被用户或
|
||
上层 API 直接使用的实质性能力:
|
||
|
||
- 优先级从高到低为:OPFS/session persistence、SDK/API surface、browser/UI workflow、
|
||
sim config coverage promotion、host/runtime boundary proof、文档化可执行工作流;
|
||
- 每批应尽量产出一个可调用 helper、可复用 API、可验证用户流程、可执行 gate、
|
||
可提升覆盖面的 runtime boundary proof,或者一份直接指导下一步实现的设计/清单;
|
||
- 允许继续做测试胶水,但只能作为支撑实质能力的验证,不再把“局部常量化/断言整理”
|
||
作为主要目标;
|
||
- 禁止启动性能测试,除非已有明确功能路径和用户流程需要性能基线;
|
||
- 禁止为了“推进”而扩大 CNC 语义边界;G-code、tool、parameter、planner 等语义仍必须
|
||
由 LinuxCNC-owned runtime 提供;
|
||
- 每批仍必须小步、可验证、可回滚,并按 `text10.txt` 记录结论和下一步建议。
|
||
|
||
三、当前完成情况摘要
|
||
|
||
1. 当前工作树状态。
|
||
|
||
切换到 `text10.txt` 前已确认:
|
||
|
||
```text
|
||
git status --short: clean
|
||
text9.txt duplicate Chinese headings: none
|
||
```
|
||
|
||
当前最近提交:
|
||
|
||
```text
|
||
0b7771b 继续推进浏览器 ini-named readback path 组 guard
|
||
c0bce74 继续推进浏览器 custom saved staging 断言组 guard
|
||
32aeba7 继续推进浏览器 saved staging 断言组 guard
|
||
7d9cf88 继续推进浏览器 random session path 断言组 guard
|
||
cba210b 继续推进浏览器 session path 断言组 guard
|
||
```
|
||
|
||
2. WASM port 基础架构稳定。
|
||
|
||
`wasm-port` 仍按独立移植工作区组织,包含 vendor、runtime/core、runtime/sdk、
|
||
runtime/opfs、runtime/ui、native/wasm/browser tests、docs 和 tools。
|
||
|
||
3. 关键基线保持稳定。
|
||
|
||
- `linuxcnc/nc_files` native Layer 1:
|
||
- `total 107`
|
||
- `pass 101`
|
||
- `expected_fail 6`
|
||
- `unexpected_fail 0`
|
||
- `linuxcnc/configs/sim` native Layer 2:
|
||
- `total 159`
|
||
- `pass 151`
|
||
- `expected_fail 8`
|
||
- `unexpected_fail 0`
|
||
- Node sim-config inventory:
|
||
- `executed=28`
|
||
- `passed=28`
|
||
- `skipped=131`
|
||
- `unexpected_fail=0`
|
||
|
||
4. blocked runtime family 仍未 promotion。
|
||
|
||
仍 blocked,不允许 promotion:
|
||
|
||
- `L4-USER-M-PROCESS`
|
||
- `L4-TOOL-DB`
|
||
- `L4-PYTHON-REMAP`
|
||
|
||
当前 host 仍按缺少 LinuxCNC host runtime 处理,不执行任何:
|
||
|
||
```bash
|
||
ENABLE_MILLTURN_USER_M_RUNTIME_PROBE=1 bash wasm-port/tests/native/probe_millturn_user_m_runtime.sh
|
||
ENABLE_TOOL_DB_RUNTIME_PROBE=1 bash wasm-port/tests/native/probe_tool_db_runtime.sh
|
||
ENABLE_PYTHON_REMAP_RUNTIME_PROBE=1 bash wasm-port/tests/native/probe_python_remap_runtime.sh
|
||
```
|
||
|
||
5. `text9.txt` 最新收敛方向。
|
||
|
||
`text9.txt` 后半段继续沿 browser/OPFS boundary guard 小批量推进,最近完成的重点包括:
|
||
|
||
- browser-random/direct-random saved tool-table expected line groups;
|
||
- browser-random/direct-random tool-table load/save result line groups;
|
||
- browser-interp/direct tool-table load/save result line groups;
|
||
- browser-interp/direct parameter restore/save/readback/backup groups;
|
||
- ini-named/explicit session parameter/tool-table result/backing text groups;
|
||
- invalid INI session reject input/error groups;
|
||
- browser-interp、browser-random、ini-named、explicit session path assertion groups;
|
||
- browser-interp/browser-random saved file staging groups;
|
||
- ini-named/explicit custom session saved file staging groups;
|
||
- ini-named parameter/tool-table readback path groups。
|
||
|
||
这些改动均只收敛 browser/OPFS test glue 与 boundary guard,未改变 OPFS bridge
|
||
behavior、file-service、path-model、SDK planner、interpreter、INI、tool、parameter
|
||
或 LinuxCNC-owned runtime semantics。
|
||
|
||
四、当前必须保持通过的验证入口
|
||
|
||
每批后续改动至少运行:
|
||
|
||
```bash
|
||
git diff --check
|
||
wasm-port/tools/verify_vendor_sync.sh
|
||
wasm-port/tools/verify_no_standalone_cnc_semantics.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_interp_wasm.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_interp_browser.sh
|
||
wasm-port/tests/host/verify_host_smokes.sh
|
||
```
|
||
|
||
涉及 native baseline 或大范围 source/staging 改动时,再运行:
|
||
|
||
```bash
|
||
wasm-port/tests/native/verify_nc_files.sh
|
||
wasm-port/tests/native/verify_sim_configs.sh
|
||
wasm-port/tests/native/verify_native_probes.sh
|
||
```
|
||
|
||
五、下一步执行计划
|
||
|
||
1. 当前第一候选批次。
|
||
|
||
继续小批量 browser test glue guard。优先扫描 explicit session saved readback path groups,
|
||
看是否能像 ini-named session 一样局部常量化:
|
||
|
||
- `loadedIniOverrideSession.parameters.opfsPath`;
|
||
- `savedExplicitParameters.backupOpfsPath`;
|
||
- `loadedIniOverrideSession.toolTable.opfsPath`。
|
||
|
||
执行目标:
|
||
|
||
- 只处理 `wasm-port/tests/browser/interp_smoke.html` 内的 browser/OPFS test glue;
|
||
- 优先让 explicit session saved parameter/tool-table readback path groups 使用局部常量;
|
||
- 保持 expected readback text、OPFS path、WASM path、machine id、filename 与 save/load
|
||
行为不变;
|
||
- 不改变参数值、tool-table 值、INI 内容、OPFS path、WASM path 字符串;
|
||
- 不改变 OPFS bridge behavior、file-service、path-model、SDK planner、interpreter、
|
||
INI、tool、parameter 或 LinuxCNC-owned runtime semantics。
|
||
|
||
2. 第一候选批次验证。
|
||
|
||
执行:
|
||
|
||
```bash
|
||
git diff --check
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_interp_browser.sh
|
||
wasm-port/tools/verify_vendor_sync.sh
|
||
wasm-port/tools/verify_no_standalone_cnc_semantics.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_interp_wasm.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
|
||
wasm-port/tests/host/verify_host_smokes.sh
|
||
```
|
||
|
||
如果通过,提交建议:
|
||
|
||
```text
|
||
继续推进浏览器 explicit readback path 组 guard
|
||
```
|
||
|
||
3. 后续候选。
|
||
|
||
如果 explicit readback path group 收益不明显,转向 machine text store path assertion
|
||
groups,重点检查 `saveMachineTextFiles(...)` 相关输入是否已有可复用局部常量或 helper。
|
||
|
||
继续只选:
|
||
|
||
- browser/OPFS test glue;
|
||
- path/readback/staging/result/expected line 的局部常量化;
|
||
- 已有 helper 的复用;
|
||
- 不改变行为的小批量 guard。
|
||
|
||
避免:
|
||
|
||
- 新增抽象过度包装;
|
||
- 把 save API 输入对象提成无用常量;
|
||
- 触碰 runtime、SDK、OPFS bridge 或 LinuxCNC-owned semantics。
|
||
|
||
二、2026-06-14 继续执行记录:browser OPFS session snapshot manifest helper
|
||
|
||
本轮按“暂停性能测试,进行实质性功能推进”的要求,补充了一个新的 OPFS/runtime
|
||
能力:生成可恢复的机器会话快照清单,范围仍局限在 `runtime/opfs` 与对应 smoke。
|
||
|
||
完成内容:
|
||
|
||
- 在 `wasm-port/runtime/opfs/snapshot-store.js` 新增
|
||
`createMachineSessionSnapshotPayload(machineId, options)`;
|
||
- 该 helper 基于现有 `path-model` 生成机器级 session snapshot payload,默认包含
|
||
`ini`、`parameters`、`toolTable`,可选包含 `gcode`;
|
||
- 支持自定义 `iniOpfsPath`、`parameterOpfsPath`、`toolTableOpfsPath`、`gcodeOpfsPath`;
|
||
- 支持自定义 `iniFilename`、`parameterFilename`、`toolTableFilename`、`gcodeFilename`;
|
||
- 在 Node OPFS smoke 与 browser INI panel smoke 中补了覆盖,验证默认路径、自定义
|
||
文件名和 G-code 路径均能按预期生成;
|
||
- 未改变 session snapshot 的格式、版本、存储位置或既有 save/load 行为;
|
||
- 未改变 OPFS bridge behavior、file-service、SDK planner、interpreter、INI、tool、
|
||
parameter 或 LinuxCNC-owned runtime semantics。
|
||
|
||
验证已通过:
|
||
|
||
```bash
|
||
git diff --check
|
||
wasm-port/tests/opfs/node/verify_file_service.sh
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_ini_panel_browser.sh
|
||
wasm-port/tools/verify_vendor_sync.sh
|
||
wasm-port/tools/verify_no_standalone_cnc_semantics.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_interp_wasm.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
|
||
wasm-port/tests/host/verify_host_smokes.sh
|
||
```
|
||
|
||
关键输出:
|
||
|
||
```text
|
||
opfs_file_service_node_smoke=ok
|
||
browser_ini_opfs_smoke=ok
|
||
vendor sync up to date
|
||
standalone CNC semantics guard complete
|
||
interp_wasm_node_smoke=ok
|
||
sim_configs_wasm_node_inventory_executed=28
|
||
sim_configs_wasm_node_inventory_passed=28
|
||
sim_configs_wasm_node_inventory_skipped=131
|
||
sim_configs_wasm_node_inventory_unexpected_fail=0
|
||
browser_interp_smoke=ok
|
||
host_wasm_opfs_browser_smokes=ok
|
||
```
|
||
|
||
下一步建议:
|
||
|
||
继续把这个 helper 扩到更明确的实际入口,优先扫描 browser/Node 里已有的 session
|
||
snapshot 调用是否能复用它,或者把 machine session 生成入口整理到更显式的 API;
|
||
只做 OPFS/filesystem/browser boundary 相关功能推进,不碰 CNC 语义。
|
||
|
||
一、2026-06-14 继续执行记录:browser explicit readback path groups guard
|
||
|
||
本轮按 `text10.txt` 第一候选批次继续收敛 explicit session saved readback path groups,
|
||
范围仍只触及 `wasm-port/tests/browser/interp_smoke.html` 的 browser/OPFS test glue。
|
||
|
||
完成内容:
|
||
|
||
- 新增 `explicitSavedParameterTextPath` 局部常量,承载 explicit parameter saved text
|
||
readback path;
|
||
- 新增 `explicitSavedParameterBackupPath` 局部常量,承载 explicit parameter backup
|
||
text readback path;
|
||
- 新增 `explicitSavedToolTableTextPath` 局部常量,承载 explicit tool-table saved text
|
||
readback path;
|
||
- explicit parameter/tool-table saved readback 断言改为复用上述 path groups;
|
||
- 保持 explicit saved file expected OPFS path、WASM path、machine id、filename 与
|
||
readback text 不变;
|
||
- 未改变任何 expected 字符串、输入、OPFS path、WASM path 字符串或 load/save/read
|
||
行为;
|
||
- 未改变 staging path 模型、OPFS bridge behavior、file-service、SDK planner、
|
||
interpreter、INI、tool、parameter 或 LinuxCNC-owned runtime semantics。
|
||
|
||
验证已通过:
|
||
|
||
```bash
|
||
git diff --check
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_interp_browser.sh
|
||
wasm-port/tools/verify_vendor_sync.sh
|
||
wasm-port/tools/verify_no_standalone_cnc_semantics.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_interp_wasm.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
|
||
wasm-port/tests/host/verify_host_smokes.sh
|
||
```
|
||
|
||
关键输出:
|
||
|
||
```text
|
||
vendor sync up to date
|
||
standalone CNC semantics guard complete
|
||
interp_wasm_node_smoke=ok
|
||
sim_configs_wasm_node_inventory_executed=28
|
||
sim_configs_wasm_node_inventory_passed=28
|
||
sim_configs_wasm_node_inventory_skipped=131
|
||
sim_configs_wasm_node_inventory_unexpected_fail=0
|
||
browser_interp_smoke=ok
|
||
host_wasm_opfs_browser_smokes=ok
|
||
```
|
||
|
||
下一步建议:
|
||
|
||
继续小批量 browser test glue guard。优先扫描 machine text store path assertion groups
|
||
或剩余 OPFS readback path groups 是否还能进一步局部常量化或复用 existing helpers;
|
||
只改测试胶水,不改变输入、OPFS path、WASM path 字符串或保存/读取行为。
|
||
|
||
三、2026-06-14 继续执行记录:OPFS machine session snapshot save helper
|
||
|
||
本轮先将“加快实质性推进”规则写入 `text10.txt` 的当前项目纪律铁律中,并按该规则
|
||
继续推进 OPFS/session persistence 的实际 API 入口,而不是继续纯 test glue 微整理。
|
||
|
||
完成内容:
|
||
|
||
- 在“当前项目纪律”中新增“加快实质性推进铁律”;
|
||
- 在 `wasm-port/runtime/opfs/snapshot-store.js` 新增
|
||
`saveMachineSessionSnapshot(sessionId, machineId, options)`;
|
||
- 该 helper 组合既有 `createMachineSessionSnapshotPayload(...)` 与
|
||
`saveSessionSnapshot(...)`,让上层能用一个入口生成并保存机器会话快照;
|
||
- 支持沿用既有 `storage`、snapshot `filename`、`createdAt`、`metadata` 以及
|
||
`iniFilename`、`parameterFilename`、`toolTableFilename`、`gcodeFilename`、
|
||
`iniOpfsPath`、`parameterOpfsPath`、`toolTableOpfsPath`、`gcodeOpfsPath`
|
||
选项;
|
||
- 在 Node OPFS smoke 中验证组合 helper 的自定义 snapshot 文件名、G-code path、
|
||
metadata 与 load round trip;
|
||
- 在 browser INI panel smoke 中验证浏览器运行时可直接调用组合 helper,并能加载回
|
||
parameter/tool-table/G-code path 与 metadata;
|
||
- 未改变 session snapshot envelope 格式、版本、path model、file-service 行为或既有
|
||
save/load API;
|
||
- 未改变 OPFS bridge behavior、SDK planner、interpreter、INI、tool、parameter 或
|
||
LinuxCNC-owned runtime semantics。
|
||
|
||
验证已通过:
|
||
|
||
```bash
|
||
git diff --check
|
||
wasm-port/tests/opfs/node/verify_file_service.sh
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_ini_panel_browser.sh
|
||
wasm-port/tools/verify_vendor_sync.sh
|
||
wasm-port/tools/verify_no_standalone_cnc_semantics.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_interp_wasm.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_interp_browser.sh
|
||
wasm-port/tests/host/verify_host_smokes.sh
|
||
```
|
||
|
||
关键输出:
|
||
|
||
```text
|
||
opfs_file_service_node_smoke=ok
|
||
browser_ini_opfs_smoke=ok
|
||
vendor sync up to date
|
||
standalone CNC semantics guard complete
|
||
interp_wasm_node_smoke=ok
|
||
sim_configs_wasm_node_inventory_executed=28
|
||
sim_configs_wasm_node_inventory_passed=28
|
||
sim_configs_wasm_node_inventory_skipped=131
|
||
sim_configs_wasm_node_inventory_unexpected_fail=0
|
||
browser_interp_smoke=ok
|
||
host_wasm_opfs_browser_smokes=ok
|
||
```
|
||
|
||
下一步建议:
|
||
|
||
继续沿 OPFS/session persistence 的实质能力推进。优先新增
|
||
`loadMachineSessionSnapshot(sessionId, machineId, options)`,在读取 generic snapshot
|
||
后校验 `payload.machineId` 与机器文件 path 结构,并补 Node/browser smoke;如果该入口
|
||
已足够清晰,再把 save/load machine session snapshot 接到 INI panel 的实际会话保存/恢复
|
||
workflow。仍只处理 OPFS/filesystem/browser boundary,不引入或重写任何 CNC 语义。
|
||
|
||
四、2026-06-14 继续执行记录:OPFS machine session snapshot load helper
|
||
|
||
本轮继续按“加快实质性推进铁律”推进 OPFS/session persistence 的实际 API 入口,
|
||
补齐 machine session snapshot 的读取校验侧能力。
|
||
|
||
完成内容:
|
||
|
||
- 在 `wasm-port/runtime/opfs/snapshot-store.js` 新增
|
||
`loadMachineSessionSnapshot(sessionId, machineId, options)`;
|
||
- 该 helper 复用既有 `loadSessionSnapshot(...)` envelope 校验,然后校验
|
||
`payload.machineId` 与调用方传入的 `machineId` 一致;
|
||
- 新增内部 machine snapshot payload 校验,要求 `payload.files` 为 plain object,
|
||
且 `ini`、`parameters`、`toolTable` 为合法 OPFS path,`gcode` 如存在也必须是合法
|
||
OPFS path;
|
||
- 校验只覆盖 host-side snapshot/path boundary,不解释 G-code、parameter、tool-table
|
||
内容,不扩大 CNC 语义边界;
|
||
- 在 Node OPFS smoke 中覆盖 machine snapshot load round trip、machine id mismatch
|
||
reject,以及非法 OPFS path reject;
|
||
- 在 browser INI panel smoke 中覆盖浏览器运行时的 checked machine snapshot load 和
|
||
wrong-machine reject;
|
||
- 未改变 generic session snapshot envelope、path model、file-service、save/load API
|
||
兼容性或已有 storage 行为;
|
||
- 未改变 OPFS bridge behavior、SDK planner、interpreter、INI、tool、parameter 或
|
||
LinuxCNC-owned runtime semantics。
|
||
|
||
验证已通过:
|
||
|
||
```bash
|
||
git diff --check
|
||
wasm-port/tests/opfs/node/verify_file_service.sh
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_ini_panel_browser.sh
|
||
wasm-port/tools/verify_vendor_sync.sh
|
||
wasm-port/tools/verify_no_standalone_cnc_semantics.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_interp_wasm.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_interp_browser.sh
|
||
wasm-port/tests/host/verify_host_smokes.sh
|
||
```
|
||
|
||
关键输出:
|
||
|
||
```text
|
||
opfs_file_service_node_smoke=ok
|
||
browser_ini_opfs_smoke=ok
|
||
vendor sync up to date
|
||
standalone CNC semantics guard complete
|
||
interp_wasm_node_smoke=ok
|
||
sim_configs_wasm_node_inventory_executed=28
|
||
sim_configs_wasm_node_inventory_passed=28
|
||
sim_configs_wasm_node_inventory_skipped=131
|
||
sim_configs_wasm_node_inventory_unexpected_fail=0
|
||
browser_interp_smoke=ok
|
||
host_wasm_opfs_browser_smokes=ok
|
||
```
|
||
|
||
下一步建议:
|
||
|
||
继续把 machine session snapshot save/load helper 接到更明确的用户流程。优先扫描
|
||
`wasm-port/runtime/ui/ini-panel/app.js` 和 browser smoke,增加一个最小会话保存/恢复
|
||
workflow:保存当前 INI、parameter/tool-table path 和可选 G-code snapshot,再通过
|
||
`loadMachineSessionSnapshot(...)` 恢复出待加载文件清单。范围仍限定 OPFS/filesystem/UI
|
||
workflow,不解析或重写任何 LinuxCNC-owned CNC 语义。
|
||
|
||
五、2026-06-14 继续执行记录:INI panel session snapshot workflow
|
||
|
||
本轮继续按“加快实质性推进铁律”推进可直接使用的 browser/UI workflow,把 machine
|
||
session snapshot save/load helper 接入 INI panel 的最小会话保存/恢复流程。
|
||
|
||
完成内容:
|
||
|
||
- 在 `wasm-port/runtime/ui/ini-panel/app.js` 引入
|
||
`saveMachineSessionSnapshot(...)` 与 `loadMachineSessionSnapshot(...)`;
|
||
- 新增固定 UI session snapshot id 与 filename:
|
||
`ui-machine-session/ui-machine-session.json`;
|
||
- 新增 `Save Session Snapshot` 控件:
|
||
- 保存当前编辑器 INI 到 OPFS machine files;
|
||
- 保存默认 parameter/tool-table text;
|
||
- 保存默认 G-code program;
|
||
- 生成并保存 machine session snapshot;
|
||
- 回填 INI、parameter、tool-table、G-code 和 snapshot path 字段;
|
||
- 新增 `Restore Session Snapshot` 控件:
|
||
- 通过 `loadMachineSessionSnapshot(...)` 读取并校验 snapshot;
|
||
- 从 OPFS machine files 恢复 INI 到编辑器;
|
||
- 回填 snapshot 中的待加载文件清单;
|
||
- 在 `wasm-port/runtime/ui/ini-panel/index.html` 增加两个按钮和
|
||
`Session Snapshot` 状态字段;
|
||
- 在 browser INI panel smoke 中覆盖保存 snapshot、恢复 snapshot、字段回填和 INI
|
||
文本恢复;
|
||
- 未改变 LinuxCNC INI parser、interpreter、parameter restore/save、tool-table load/save
|
||
或 G-code 执行语义;
|
||
- 未改变 OPFS path model、generic snapshot envelope、file-service、machine-session
|
||
bridge 或 LinuxCNC-owned runtime semantics。
|
||
|
||
验证已通过:
|
||
|
||
```bash
|
||
git diff --check
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_ini_panel_browser.sh
|
||
wasm-port/tests/opfs/node/verify_file_service.sh
|
||
wasm-port/tools/verify_vendor_sync.sh
|
||
wasm-port/tools/verify_no_standalone_cnc_semantics.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_interp_wasm.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_interp_browser.sh
|
||
wasm-port/tests/host/verify_host_smokes.sh
|
||
```
|
||
|
||
关键输出:
|
||
|
||
```text
|
||
browser_ini_opfs_smoke=ok
|
||
opfs_file_service_node_smoke=ok
|
||
vendor sync up to date
|
||
standalone CNC semantics guard complete
|
||
interp_wasm_node_smoke=ok
|
||
sim_configs_wasm_node_inventory_executed=28
|
||
sim_configs_wasm_node_inventory_passed=28
|
||
sim_configs_wasm_node_inventory_skipped=131
|
||
sim_configs_wasm_node_inventory_unexpected_fail=0
|
||
browser_interp_smoke=ok
|
||
host_wasm_opfs_browser_smokes=ok
|
||
```
|
||
|
||
下一步建议:
|
||
|
||
继续推进 browser/UI workflow 的实质能力。优先把 `Restore Session Snapshot` 后的文件清单
|
||
与现有 `Load Machine Session` 串联成单个可执行入口,例如新增
|
||
`Restore And Load Session`:先校验 snapshot,再把 OPFS INI/parameter/tool-table 加载到
|
||
interpreter WASM FS,并保持 G-code path 可运行。范围仍限定 OPFS/session/UI 编排,不
|
||
解析或改写任何 CNC 语义。
|
||
|
||
六、2026-06-14 继续执行记录:INI panel restore-and-load session workflow
|
||
|
||
本轮继续推进 browser/UI workflow 的实质能力,把 snapshot restore 和 machine-session
|
||
load 串成一个可直接执行的入口。
|
||
|
||
完成内容:
|
||
|
||
- 在 `wasm-port/runtime/ui/ini-panel/app.js` 抽出
|
||
`restoreSessionSnapshotToEditor()`,统一执行 checked snapshot load、OPFS machine
|
||
file restore、编辑器回填和 snapshot 文件清单字段回填;
|
||
- 抽出 `loadMachineSessionIntoWasm()`,统一通过既有
|
||
`loadMachineSessionFromOpfs(...)` 把 OPFS INI、parameter、tool-table 加载到
|
||
interpreter WASM FS;
|
||
- 保留既有 `Restore Session Snapshot` 与 `Load Machine Session` 按钮行为,并让它们
|
||
复用上述 workflow helper;
|
||
- 新增 `Restore And Load Session` 控件:
|
||
- 先通过 `loadMachineSessionSnapshot(...)` 校验 snapshot;
|
||
- 再恢复 OPFS machine files 到编辑器;
|
||
- 再把 INI、parameter、tool-table 加载到 interpreter WASM FS;
|
||
- 保留 snapshot G-code path,供后续 `Run G-code` 使用;
|
||
- 在 browser INI panel smoke 中改为通过 `Restore And Load Session` 完成 session
|
||
恢复加载,再继续执行 G-code run,验证 snapshot path、OPFS file mapping、
|
||
LinuxCNC parameter/tool-table load result 和 canonical-event flow;
|
||
- 未改变 LinuxCNC INI parser、interpreter、parameter restore/save、tool-table load/save
|
||
或 G-code 执行语义;
|
||
- 未改变 OPFS path model、generic snapshot envelope、file-service、machine-session
|
||
bridge 或 LinuxCNC-owned runtime semantics。
|
||
|
||
验证已通过:
|
||
|
||
```bash
|
||
git diff --check
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_ini_panel_browser.sh
|
||
wasm-port/tests/opfs/node/verify_file_service.sh
|
||
wasm-port/tools/verify_vendor_sync.sh
|
||
wasm-port/tools/verify_no_standalone_cnc_semantics.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_interp_wasm.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_interp_browser.sh
|
||
wasm-port/tests/host/verify_host_smokes.sh
|
||
```
|
||
|
||
关键输出:
|
||
|
||
```text
|
||
browser_ini_opfs_smoke=ok
|
||
opfs_file_service_node_smoke=ok
|
||
vendor sync up to date
|
||
standalone CNC semantics guard complete
|
||
interp_wasm_node_smoke=ok
|
||
sim_configs_wasm_node_inventory_executed=28
|
||
sim_configs_wasm_node_inventory_passed=28
|
||
sim_configs_wasm_node_inventory_skipped=131
|
||
sim_configs_wasm_node_inventory_unexpected_fail=0
|
||
browser_interp_smoke=ok
|
||
host_wasm_opfs_browser_smokes=ok
|
||
```
|
||
|
||
下一步建议:
|
||
|
||
继续沿 UI workflow 做实质推进。优先把 `Run G-code` 的输入从固定
|
||
`GCODE_FILENAME` 收敛为“优先使用已恢复 snapshot 中的 G-code OPFS path,否则回退默认
|
||
G-code”,并在 browser smoke 中验证 restore-and-load 后运行的程序来自 snapshot 文件清单。
|
||
仍只做 OPFS/session/UI 编排,不解析或改写 G-code 语义。
|
||
|
||
七、2026-06-14 继续执行记录:INI panel snapshot G-code run selection
|
||
|
||
本轮继续推进 browser/UI workflow 的实质能力,让 `Run G-code` 使用已恢复 machine
|
||
session snapshot 中的 G-code 文件清单,而不是始终只使用固定默认 filename。
|
||
|
||
完成内容:
|
||
|
||
- 在 `wasm-port/runtime/ui/ini-panel/app.js` 新增 `restoredSessionSnapshot` 状态,用于
|
||
保存最近一次 checked snapshot restore 结果;
|
||
- 新增 `gcodeFilenameFromSnapshotPath(...)`,将 snapshot 中的
|
||
`linuxcnc/gcode/<filename>` OPFS path 转成 `loadGcodeProgram(...)` 需要的 filename;
|
||
- 新增 `loadSelectedGcodeProgram()`:
|
||
- 优先读取 restored snapshot payload 中的 G-code OPFS path;
|
||
- 无 restored snapshot 或无 G-code path 时回退默认 `GCODE_FILENAME`;
|
||
- 仍通过既有 OPFS G-code store 读取文本;
|
||
- `Run G-code` 改为使用 selected program,并在日志中记录
|
||
`OPFS path -> WASM path`;
|
||
- `Session G-code` 字段在运行后保留 OPFS path,明确反映用户流程使用的 snapshot
|
||
文件清单;
|
||
- browser INI panel smoke 验证 restore-and-load 后运行的程序来自
|
||
`linuxcnc/gcode/ui-session.ngc`,并继续验证 LinuxCNC canonical events 与 run monitor;
|
||
- 未改变 G-code 文本内容、interpreter run API、canonical-event 解析、OPFS path model
|
||
或 LinuxCNC-owned runtime semantics。
|
||
|
||
验证已通过:
|
||
|
||
```bash
|
||
git diff --check
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_ini_panel_browser.sh
|
||
wasm-port/tests/opfs/node/verify_file_service.sh
|
||
wasm-port/tools/verify_vendor_sync.sh
|
||
wasm-port/tools/verify_no_standalone_cnc_semantics.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_interp_wasm.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_interp_browser.sh
|
||
wasm-port/tests/host/verify_host_smokes.sh
|
||
```
|
||
|
||
关键输出:
|
||
|
||
```text
|
||
browser_ini_opfs_smoke=ok
|
||
opfs_file_service_node_smoke=ok
|
||
vendor sync up to date
|
||
standalone CNC semantics guard complete
|
||
interp_wasm_node_smoke=ok
|
||
sim_configs_wasm_node_inventory_executed=28
|
||
sim_configs_wasm_node_inventory_passed=28
|
||
sim_configs_wasm_node_inventory_skipped=131
|
||
sim_configs_wasm_node_inventory_unexpected_fail=0
|
||
browser_interp_smoke=ok
|
||
host_wasm_opfs_browser_smokes=ok
|
||
```
|
||
|
||
下一步建议:
|
||
|
||
继续沿 UI workflow 做实质推进。优先补 fallback 覆盖:在 browser smoke 中增加不恢复
|
||
snapshot、只保存 machine files 并 `Load Machine Session` 后运行 G-code 的路径,验证
|
||
`Run G-code` 会回退默认 `linuxcnc/gcode/ui-session.ngc` 且保持 canonical-event flow。
|
||
仍只做 OPFS/session/UI 编排,不解析或改写 G-code 语义。
|
||
|
||
八、2026-06-14 继续执行记录:INI panel G-code fallback source guard
|
||
|
||
本轮继续推进 browser/UI workflow 的可验证性,补齐 `Run G-code` 在未恢复 snapshot
|
||
时的默认 G-code fallback 覆盖。
|
||
|
||
完成内容:
|
||
|
||
- 在 `wasm-port/runtime/ui/ini-panel/app.js` 的 selected G-code program 中增加
|
||
`source` 标记:
|
||
- restored snapshot 提供 `linuxcnc/gcode/<filename>` 时为 `snapshot`;
|
||
- 未恢复 snapshot 或 snapshot 无可用 G-code path 时为 `default`;
|
||
- `Run G-code` 日志新增 `Program source: ...`,让 browser smoke 能明确区分 default
|
||
fallback 与 snapshot 文件清单路径;
|
||
- 在 browser INI panel smoke 中新增 fallback 流程:
|
||
- 只保存 machine files;
|
||
- 通过既有 `Load Machine Session` 加载到 interpreter WASM FS;
|
||
- 直接 `Run G-code`;
|
||
- 验证程序来自默认 `linuxcnc/gcode/ui-session.ngc -> /work/ui-session.ngc`;
|
||
- 验证 `Program source: default` 与 LinuxCNC canonical-event flow;
|
||
- 原 restore-and-load 后的 snapshot G-code run 继续验证 `Program source: snapshot`;
|
||
- 未改变 G-code 文本内容、interpreter run API、canonical-event 解析、OPFS path model
|
||
或 LinuxCNC-owned runtime semantics。
|
||
|
||
验证已通过:
|
||
|
||
```bash
|
||
git diff --check
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_ini_panel_browser.sh
|
||
wasm-port/tests/opfs/node/verify_file_service.sh
|
||
wasm-port/tools/verify_vendor_sync.sh
|
||
wasm-port/tools/verify_no_standalone_cnc_semantics.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_interp_wasm.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_interp_browser.sh
|
||
wasm-port/tests/host/verify_host_smokes.sh
|
||
```
|
||
|
||
关键输出:
|
||
|
||
```text
|
||
browser_ini_opfs_smoke=ok
|
||
opfs_file_service_node_smoke=ok
|
||
vendor sync up to date
|
||
standalone CNC semantics guard complete
|
||
interp_wasm_node_smoke=ok
|
||
sim_configs_wasm_node_inventory_executed=28
|
||
sim_configs_wasm_node_inventory_passed=28
|
||
sim_configs_wasm_node_inventory_skipped=131
|
||
sim_configs_wasm_node_inventory_unexpected_fail=0
|
||
browser_interp_smoke=ok
|
||
host_wasm_opfs_browser_smokes=ok
|
||
```
|
||
|
||
下一步建议:
|
||
|
||
继续沿 OPFS/session/UI boundary 做小步实质推进。优先把
|
||
`linuxcnc/gcode/<filename>` 到 filename 的转换下沉为 OPFS G-code store 的可复用 helper,
|
||
例如 `gcodeFilenameFromProgramPath(...)`,并在 Node OPFS smoke 与 browser smoke 中覆盖
|
||
合法 path、非 G-code path fallback 或 reject 行为。仍不解析或改写 G-code 语义。
|
||
|
||
九、2026-06-14 继续执行记录:OPFS G-code program path helper
|
||
|
||
本轮继续沿 OPFS/session/UI boundary 做小步实质推进,把 G-code OPFS path 到 filename
|
||
的转换下沉到 OPFS G-code store,避免该 path 规则散落在 UI 层。
|
||
|
||
完成内容:
|
||
|
||
- 在 `wasm-port/runtime/opfs/machine-file-store.js` 新增
|
||
`gcodeFilenameFromProgramPath(path)`;
|
||
- 该 helper 使用既有 `splitOpfsPath(...)` 校验 OPFS path,且只接受
|
||
`linuxcnc/gcode/<filename>` 这种单文件 G-code program path;
|
||
- 非 G-code program path 或嵌套 G-code path 会 reject,避免 browser/UI 调用方静默接受
|
||
错误 session 文件清单;
|
||
- `wasm-port/runtime/ui/ini-panel/app.js` 的 `Run G-code` 选择逻辑改为复用该 helper;
|
||
- UI 仍保持安全 fallback:snapshot 无 G-code path 或 G-code path 非法时回退默认
|
||
`GCODE_FILENAME`,不解释或改写 G-code 内容;
|
||
- Node OPFS smoke 覆盖合法 G-code OPFS path、非 G-code path reject、嵌套 G-code path
|
||
reject;
|
||
- browser INI panel smoke 覆盖合法 G-code OPFS path 转 filename 和非法 OPFS path reject;
|
||
- 修正了 snapshot G-code filename 与默认 filename 相同时的来源判定,helper 成功解析即
|
||
`Program source: snapshot`;
|
||
- 未改变 G-code 文本内容、OPFS file-service、interpreter run API、canonical-event 解析、
|
||
path model 基础语义或 LinuxCNC-owned runtime semantics。
|
||
|
||
验证已通过:
|
||
|
||
```bash
|
||
git diff --check
|
||
wasm-port/tests/opfs/node/verify_file_service.sh
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_ini_panel_browser.sh
|
||
wasm-port/tools/verify_vendor_sync.sh
|
||
wasm-port/tools/verify_no_standalone_cnc_semantics.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_interp_wasm.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_interp_browser.sh
|
||
wasm-port/tests/host/verify_host_smokes.sh
|
||
```
|
||
|
||
关键输出:
|
||
|
||
```text
|
||
opfs_file_service_node_smoke=ok
|
||
browser_ini_opfs_smoke=ok
|
||
vendor sync up to date
|
||
standalone CNC semantics guard complete
|
||
interp_wasm_node_smoke=ok
|
||
sim_configs_wasm_node_inventory_executed=28
|
||
sim_configs_wasm_node_inventory_passed=28
|
||
sim_configs_wasm_node_inventory_skipped=131
|
||
sim_configs_wasm_node_inventory_unexpected_fail=0
|
||
browser_interp_smoke=ok
|
||
host_wasm_opfs_browser_smokes=ok
|
||
```
|
||
|
||
下一步建议:
|
||
|
||
继续沿 OPFS/session/UI boundary 推进。优先把 UI 的 session snapshot 常量
|
||
`SESSION_SNAPSHOT_ID`、`SESSION_SNAPSHOT_FILENAME` 与 G-code fallback metadata 整理成
|
||
一个小的 UI session descriptor/helper,减少按钮 handler 间重复拼接 snapshot label、
|
||
G-code OPFS path 和默认 program source 的逻辑。仍不解析或改写任何 CNC 语义。
|
||
|
||
十、2026-06-14 继续执行记录:INI panel UI session descriptor helper
|
||
|
||
本轮继续沿 OPFS/session/UI boundary 推进,把 INI panel 内部的 session snapshot 常量与
|
||
默认 G-code metadata 收敛成一个小的 UI session descriptor/helper,减少按钮 handler
|
||
之间重复拼接。
|
||
|
||
完成内容:
|
||
|
||
- 在 `wasm-port/runtime/ui/ini-panel/app.js` 新增 `UI_SESSION` descriptor:
|
||
- `snapshotId`;
|
||
- `snapshotFilename`;
|
||
- `defaultGcodeFilename`;
|
||
- `gcodeWasmPath`;
|
||
- 新增 `sessionSnapshotLabel(...)`,统一生成
|
||
`ui-machine-session/ui-machine-session.json` 形式的 UI label;
|
||
- 新增 `defaultGcodeOpfsPath()`,统一生成默认 G-code OPFS path;
|
||
- `save-session-snapshot`、`restore-session-snapshot`、`restore-load-session` 的日志与
|
||
字段回填改为复用 descriptor/helper;
|
||
- `Run G-code` 的 default fallback 与 WASM target path 改为复用 descriptor;
|
||
- 保持现有 UI 文本、按钮行为、snapshot id/filename、G-code filename、WASM path 和
|
||
OPFS path 不变;
|
||
- 未改变 G-code 文本内容、OPFS file-service、machine-session bridge、interpreter run
|
||
API、canonical-event 解析或 LinuxCNC-owned runtime semantics。
|
||
|
||
验证已通过:
|
||
|
||
```bash
|
||
git diff --check
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_ini_panel_browser.sh
|
||
wasm-port/tests/opfs/node/verify_file_service.sh
|
||
wasm-port/tools/verify_vendor_sync.sh
|
||
wasm-port/tools/verify_no_standalone_cnc_semantics.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_interp_wasm.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_interp_browser.sh
|
||
wasm-port/tests/host/verify_host_smokes.sh
|
||
```
|
||
|
||
关键输出:
|
||
|
||
```text
|
||
browser_ini_opfs_smoke=ok
|
||
opfs_file_service_node_smoke=ok
|
||
vendor sync up to date
|
||
standalone CNC semantics guard complete
|
||
interp_wasm_node_smoke=ok
|
||
sim_configs_wasm_node_inventory_executed=28
|
||
sim_configs_wasm_node_inventory_passed=28
|
||
sim_configs_wasm_node_inventory_skipped=131
|
||
sim_configs_wasm_node_inventory_unexpected_fail=0
|
||
browser_interp_smoke=ok
|
||
host_wasm_opfs_browser_smokes=ok
|
||
```
|
||
|
||
下一步建议:
|
||
|
||
继续沿 OPFS/session/UI boundary 推进。优先让 `Save Session Snapshot` 的 metadata 使用
|
||
同一个 `UI_SESSION` descriptor 生成,例如补充 snapshot label、default G-code OPFS path
|
||
和 UI workflow source,方便后续恢复/审计用户会话;并在 browser smoke 中验证 metadata
|
||
可从 saved snapshot round trip 读回。仍不解析或改写任何 CNC 语义。
|
||
|
||
十一、2026-06-14 继续执行记录:INI panel snapshot metadata descriptor
|
||
|
||
本轮继续沿 OPFS/session/UI boundary 推进,让 `Save Session Snapshot` 的 metadata
|
||
由 `UI_SESSION` descriptor 统一生成,并补 browser round-trip 覆盖。
|
||
|
||
完成内容:
|
||
|
||
- 在 `wasm-port/runtime/ui/ini-panel/app.js` 新增 `sessionSnapshotMetadata()`;
|
||
- metadata 现在包含:
|
||
- `source: "ini-panel"`;
|
||
- `workflow: "save-session-snapshot"`;
|
||
- `snapshotLabel: "ui-machine-session/ui-machine-session.json"`;
|
||
- `defaultGcodeOpfsPath: "linuxcnc/gcode/ui-session.ngc"`;
|
||
- `saveMachineSessionSnapshot(...)` 调用改为使用 `sessionSnapshotMetadata()`;
|
||
- browser INI panel smoke 在 UI 保存 snapshot 后,调用
|
||
`loadMachineSessionSnapshot("ui-machine-session", "xyzab-tdr", ...)` 读回 snapshot;
|
||
- browser smoke 验证 source、workflow、snapshot label 和默认 G-code OPFS path metadata
|
||
均可 round trip;
|
||
- 未改变 snapshot envelope 格式、payload 文件清单、OPFS path model、G-code 文本内容、
|
||
interpreter run API 或 LinuxCNC-owned runtime semantics。
|
||
|
||
验证已通过:
|
||
|
||
```bash
|
||
git diff --check
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_ini_panel_browser.sh
|
||
wasm-port/tests/opfs/node/verify_file_service.sh
|
||
wasm-port/tools/verify_vendor_sync.sh
|
||
wasm-port/tools/verify_no_standalone_cnc_semantics.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_interp_wasm.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_interp_browser.sh
|
||
wasm-port/tests/host/verify_host_smokes.sh
|
||
```
|
||
|
||
关键输出:
|
||
|
||
```text
|
||
browser_ini_opfs_smoke=ok
|
||
opfs_file_service_node_smoke=ok
|
||
vendor sync up to date
|
||
standalone CNC semantics guard complete
|
||
interp_wasm_node_smoke=ok
|
||
sim_configs_wasm_node_inventory_executed=28
|
||
sim_configs_wasm_node_inventory_passed=28
|
||
sim_configs_wasm_node_inventory_skipped=131
|
||
sim_configs_wasm_node_inventory_unexpected_fail=0
|
||
browser_interp_smoke=ok
|
||
host_wasm_opfs_browser_smokes=ok
|
||
```
|
||
|
||
下一步建议:
|
||
|
||
继续沿 OPFS/session/UI boundary 推进。优先把 saved/restored snapshot metadata 的关键信息
|
||
显示到 INI panel 日志,例如 `Workflow` 与 `Default G-code`,让用户不用打开 JSON 也能审计
|
||
保存/恢复的会话来源;并在 browser smoke 中验证日志包含这些 metadata。仍不解析或改写
|
||
任何 CNC 语义。
|
||
|
||
十二、2026-06-14 继续执行记录:INI panel snapshot metadata log summary
|
||
|
||
本轮继续沿 OPFS/session/UI boundary 推进,把 saved/restored snapshot metadata 的关键信息
|
||
显示到 INI panel 日志,提升用户可审计性。
|
||
|
||
完成内容:
|
||
|
||
- 在 `wasm-port/runtime/ui/ini-panel/app.js` 新增 `sessionMetadataLogLines(metadata)`;
|
||
- 保存 snapshot 的日志现在显示:
|
||
- `Workflow: save-session-snapshot`;
|
||
- `Default G-code: linuxcnc/gcode/ui-session.ngc`;
|
||
- 恢复 snapshot 的日志同样显示 Workflow 与 Default G-code;
|
||
- `Restore And Load Session` 的组合流程日志也显示同一 metadata 摘要;
|
||
- browser INI panel smoke 验证:
|
||
- 保存 snapshot 日志包含 metadata 摘要;
|
||
- 恢复 snapshot 日志包含 metadata 摘要;
|
||
- restore-and-load 日志包含 metadata 摘要;
|
||
- 未改变 snapshot envelope、payload 文件清单、metadata JSON 内容、OPFS path model、
|
||
G-code 文本内容、interpreter run API 或 LinuxCNC-owned runtime semantics。
|
||
|
||
验证已通过:
|
||
|
||
```bash
|
||
git diff --check
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_ini_panel_browser.sh
|
||
wasm-port/tests/opfs/node/verify_file_service.sh
|
||
wasm-port/tools/verify_vendor_sync.sh
|
||
wasm-port/tools/verify_no_standalone_cnc_semantics.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_interp_wasm.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_interp_browser.sh
|
||
wasm-port/tests/host/verify_host_smokes.sh
|
||
```
|
||
|
||
关键输出:
|
||
|
||
```text
|
||
browser_ini_opfs_smoke=ok
|
||
opfs_file_service_node_smoke=ok
|
||
vendor sync up to date
|
||
standalone CNC semantics guard complete
|
||
interp_wasm_node_smoke=ok
|
||
sim_configs_wasm_node_inventory_executed=28
|
||
sim_configs_wasm_node_inventory_passed=28
|
||
sim_configs_wasm_node_inventory_skipped=131
|
||
sim_configs_wasm_node_inventory_unexpected_fail=0
|
||
browser_interp_smoke=ok
|
||
host_wasm_opfs_browser_smokes=ok
|
||
```
|
||
|
||
下一步建议:
|
||
|
||
继续沿 OPFS/session/UI boundary 推进。优先把 machine session snapshot 的 metadata 摘要
|
||
也带入 `Run G-code` 成功日志,例如显示 `Snapshot`、`Program source`、`Workflow`,
|
||
让用户能从一次运行日志中确认程序来源与会话来源;并在 browser smoke 中验证 snapshot
|
||
run 与 default fallback run 的日志差异。仍不解析或改写任何 CNC 语义。
|
||
|
||
十三、2026-06-14 继续执行记录:INI panel run snapshot context log
|
||
|
||
本轮继续沿 OPFS/session/UI boundary 推进,把 machine session snapshot 的上下文摘要
|
||
带入 `Run G-code` 成功日志,便于用户从一次运行记录中审计程序来源与会话来源。
|
||
|
||
完成内容:
|
||
|
||
- 在 `wasm-port/runtime/ui/ini-panel/app.js` 新增 `runSessionContextLogLines(...)`;
|
||
- `Run G-code` 成功日志现在统一显示:
|
||
- `Program: <opfs> -> <wasm>`;
|
||
- `Program source: default|snapshot`;
|
||
- `Snapshot: <session>/<file>` 或 `-`;
|
||
- `Workflow` 与 `Default G-code` metadata 摘要;
|
||
- default fallback run 明确显示没有 snapshot context;
|
||
- snapshot run 显示 `ui-machine-session/ui-machine-session.json`、
|
||
`save-session-snapshot` 与默认 G-code OPFS path;
|
||
- browser INI panel smoke 验证 fallback run 与 snapshot run 的日志差异;
|
||
- 未改变 snapshot envelope、payload 文件清单、metadata JSON 内容、OPFS path model、
|
||
G-code 文本内容、interpreter run API、canonical-event 输出或 LinuxCNC-owned runtime
|
||
semantics。
|
||
|
||
验证已通过:
|
||
|
||
```bash
|
||
git diff --check
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_ini_panel_browser.sh
|
||
wasm-port/tests/opfs/node/verify_file_service.sh
|
||
wasm-port/tools/verify_vendor_sync.sh
|
||
wasm-port/tools/verify_no_standalone_cnc_semantics.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_interp_wasm.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_interp_browser.sh
|
||
wasm-port/tests/host/verify_host_smokes.sh
|
||
```
|
||
|
||
关键输出:
|
||
|
||
```text
|
||
browser_ini_opfs_smoke=ok
|
||
opfs_file_service_node_smoke=ok
|
||
vendor sync up to date
|
||
standalone CNC semantics guard complete
|
||
interp_wasm_node_smoke=ok
|
||
sim_configs_wasm_node_inventory_executed=28
|
||
sim_configs_wasm_node_inventory_passed=28
|
||
sim_configs_wasm_node_inventory_skipped=131
|
||
sim_configs_wasm_node_inventory_unexpected_fail=0
|
||
browser_interp_smoke=ok
|
||
host_wasm_opfs_browser_smokes=ok
|
||
```
|
||
|
||
下一步建议:
|
||
|
||
继续沿 OPFS/session/UI boundary 推进。优先让 `Run G-code` 日志中的 session context
|
||
同步落到一个可复用的 UI 状态字段或机器可读 run summary,例如保存最近一次 run 的
|
||
`programSource`、`snapshotLabel`、`workflow`、`programOpfsPath`、`programWasmPath`,
|
||
供后续 SDK/API 或 UI panel 读取;先只做 UI/测试边界,不改变 interpreter、OPFS bridge
|
||
或 LinuxCNC-owned runtime semantics。
|
||
|
||
十四、2026-06-14 继续执行记录:INI panel run summary state
|
||
|
||
本轮继续沿 OPFS/session/UI boundary 推进,把最近一次 `Run G-code` 的 session context
|
||
同步到可见 UI 状态字段和机器可读 run summary,避免后续 UI/API 从日志文本反解析。
|
||
|
||
完成内容:
|
||
|
||
- 在 `wasm-port/runtime/ui/ini-panel/index.html` 增加最近一次 run 的可见状态字段:
|
||
- `Run Source`;
|
||
- `Run Snapshot`;
|
||
- `Run Workflow`;
|
||
- `Run OPFS Path`;
|
||
- `Run WASM Path`;
|
||
- 在 `wasm-port/runtime/ui/ini-panel/app.js` 新增:
|
||
- `clearLastRunSummary()`;
|
||
- `setLastRunSummary(program, snapshot)`;
|
||
- 成功运行 G-code 后,UI 写入 `window.linuxCncIniPanelLastRunSummary`,字段包括:
|
||
- `programSource`;
|
||
- `snapshotLabel`;
|
||
- `workflow`;
|
||
- `programOpfsPath`;
|
||
- `programWasmPath`;
|
||
- fallback run 的 summary 明确为 `programSource: "default"`,snapshot/workflow 为 `null`;
|
||
- snapshot run 的 summary 明确为 `programSource: "snapshot"`,并包含
|
||
`ui-machine-session/ui-machine-session.json` 与 `save-session-snapshot`;
|
||
- browser INI panel smoke 同时验证可见字段与 `window.linuxCncIniPanelLastRunSummary`;
|
||
- 未改变日志格式以外的 runtime 行为、snapshot envelope、OPFS path model、G-code 文本、
|
||
interpreter run API、canonical-event 输出或 LinuxCNC-owned runtime semantics。
|
||
|
||
验证已通过:
|
||
|
||
```bash
|
||
git diff --check
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_ini_panel_browser.sh
|
||
wasm-port/tests/opfs/node/verify_file_service.sh
|
||
wasm-port/tools/verify_vendor_sync.sh
|
||
wasm-port/tools/verify_no_standalone_cnc_semantics.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_interp_wasm.sh
|
||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
|
||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_interp_browser.sh
|
||
wasm-port/tests/host/verify_host_smokes.sh
|
||
```
|
||
|
||
关键输出:
|
||
|
||
```text
|
||
browser_ini_opfs_smoke=ok
|
||
opfs_file_service_node_smoke=ok
|
||
vendor sync up to date
|
||
standalone CNC semantics guard complete
|
||
interp_wasm_node_smoke=ok
|
||
sim_configs_wasm_node_inventory_executed=28
|
||
sim_configs_wasm_node_inventory_passed=28
|
||
sim_configs_wasm_node_inventory_skipped=131
|
||
sim_configs_wasm_node_inventory_unexpected_fail=0
|
||
browser_interp_smoke=ok
|
||
host_wasm_opfs_browser_smokes=ok
|
||
```
|
||
|
||
下一步建议:
|
||
|
||
继续沿 OPFS/session/UI boundary 推进。优先把 `Run G-code` 的机器可读 summary 扩展为
|
||
包含轻量 runtime result 摘要,例如 `canonicalEventCount`、`motionSnapshotCount`、
|
||
`runStatus` 和 `iniWasmPath`,方便 UI/API 判断运行是否真的产生 LinuxCNC canonical output;
|
||
仍只统计 LinuxCNC-owned runtime 输出,不解析或改写 G-code、tool、parameter、planner 等
|
||
CNC 语义。
|