Compare commits

...

16 Commits

Author SHA1 Message Date
e0f7ebec4f Guard browser OPFS explicit session file group 2026-06-14 06:12:19 +08:00
ee4c4e10af Guard browser OPFS INI-named session file group 2026-06-14 02:41:05 +08:00
bc70d026bd Guard browser OPFS custom session tool-table value locals 2026-06-14 02:35:19 +08:00
bc130d9685 Guard browser OPFS custom session initial parameter locals 2026-06-14 02:30:29 +08:00
232546d92d Guard browser OPFS custom session parameter value locals 2026-06-14 02:25:44 +08:00
b6397b71ee Guard browser OPFS custom session parameter values 2026-06-14 02:21:12 +08:00
3e45302a14 Guard browser OPFS custom session save options 2026-06-14 02:17:15 +08:00
3c5945f42f Guard browser OPFS custom session load options 2026-06-14 02:13:05 +08:00
55541fae26 Guard browser OPFS custom session INI seed 2026-06-14 02:08:56 +08:00
d2affc0235 Guard browser OPFS custom session tool seed 2026-06-14 02:04:54 +08:00
707f412f46 Guard browser OPFS custom session parameter seed 2026-06-14 02:01:31 +08:00
dcc9a2b111 Guard browser OPFS custom session tool text 2026-06-14 01:58:12 +08:00
8866fd1fdf Guard browser OPFS custom session parameter text 2026-06-14 01:55:01 +08:00
a3e2ff66f9 Guard browser OPFS custom session result lines 2026-06-14 01:51:27 +08:00
aaa8105cf3 Guard browser OPFS custom session readback helper 2026-06-14 01:47:40 +08:00
25d8672f57 Guard browser OPFS custom session path locals 2026-06-14 01:44:29 +08:00
2 changed files with 1055 additions and 197 deletions

836
text8.txt
View File

@@ -848,3 +848,839 @@ host_wasm_opfs_browser_smokes=ok
继续小批量 browser staging path literal guard。优先扫描 `interp_smoke.html` 中
OPFS custom session load/save blocks 是否还有重复的 OPFS path locals 可收敛;
只改测试胶水,不改变 custom filename 输入、OPFS path 或 WASM path 字符串。
二十、2026-06-14 继续执行记录browser OPFS custom session path locals guard
本轮按上一条下一步建议继续扫描 OPFS custom session load/save blocks 中的重复 path
派生,范围仍只触及 `wasm-port/tests/browser/interp_smoke.html` 的 browser/OPFS test
glue。
完成内容:
- 扩展 `opfsCustomSessionPaths(...)`,让它接收调用方已经计算好的
parameter/tool-table WASM path
- INI-named session 与 explicit session 的 staging 断言均复用现有
`iniFileParameterWasmPath` / `iniFileToolTableWasmPath` 与
`explicitParameterWasmPath` / `explicitToolTableWasmPath`
- 收敛 custom session path helper 内重复的 `opfsCustomSessionWasmPath(...)`
filename-derived WASM path 派生;
- custom parameter/tool-table filename 输入、OPFS path、WASM path 字符串均未改变;
- 未改变 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
browser_interp_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
host_wasm_opfs_browser_smokes=ok
```
下一步建议:
继续小批量 browser OPFS test glue guard。优先扫描 `interp_smoke.html` 中
custom session saved parameter/tool-table readback blocks 是否还能统一为
`verifyOpfsReadback(...)` 或已有 saved-text helper 调用;只改测试胶水,不改变
custom filename 输入、OPFS path、WASM path 字符串或保存/读取行为。
二十一、2026-06-14 继续执行记录browser OPFS custom session readback helper guard
本轮按上一条下一步建议继续收敛 custom session saved parameter/tool-table readback
blocks范围仍只触及 `wasm-port/tests/browser/interp_smoke.html` 的 browser/OPFS test
glue。
完成内容:
- 将 INI-named session 的 saved parameter backup readback 改为复用
`verifyOpfsReadback(...)`
- 将 INI-named session 的 saved tool-table readback 改为复用
`verifyOpfsReadback(...)`
- 将 explicit session 的 saved parameter、parameter backup、tool-table readback
改为复用 `verifyOpfsReadback(...)`
- 所有 readback 仍通过 `verifyExpectedOutput(...)` 做精确文本校验;
- custom parameter/tool-table filename 输入、OPFS path、WASM path 字符串与
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
browser_interp_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
host_wasm_opfs_browser_smokes=ok
```
下一步建议:
继续小批量 browser OPFS test glue guard。优先扫描 `interp_smoke.html` 中
custom session load/save blocks 的 expected output arrays 是否还有重复的
parameter/tool-table key lines 可安全抽成局部常量或小 helper只改测试胶水保持
精确文本校验,不改变 custom filename 输入、OPFS path、WASM path 字符串或保存/读取行为。
二十二、2026-06-14 继续执行记录browser OPFS custom session result lines helper guard
本轮按上一条下一步建议继续收敛 custom session load/save blocks 的 expected output
arrays范围仍只触及 `wasm-port/tests/browser/interp_smoke.html` 的 browser/OPFS test
glue。
完成内容:
- 新增 `opfsParameterResultLines(...)`,统一 custom session parameter
restore/save result 中 5161、5162、5221、5399 的 expected lines
- 新增 `opfsToolTableResultLines(...)`,统一 custom session tool-table
load/save result 中 toolno/pocketno 以及可选附加字段的 expected lines
- INI-named session 与 explicit session 的 parameter load/save 校验改为复用
`opfsParameterResultLines(...)`
- INI-named session 与 explicit session 的 tool-table load/save 校验改为复用
`opfsToolTableResultLines(...)`
- 所有 load/save result 仍通过 `verifyExpectedOutput(...)` 做精确文本校验;
- custom parameter/tool-table filename 输入、OPFS path、WASM path 字符串与
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
browser_interp_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
host_wasm_opfs_browser_smokes=ok
```
下一步建议:
继续小批量 browser OPFS test glue guard。优先扫描 custom session saved parameter
readback 与 backup readback expected text 是否还能用只读 expected-lines helper 收敛;
只改测试胶水,保持精确文本校验,不改变 custom filename 输入、OPFS path、WASM path
字符串或保存/读取行为。
二十三、2026-06-14 继续执行记录browser OPFS custom session parameter text helper guard
本轮按上一条下一步建议继续收敛 custom session saved parameter readback 与 backup
readback expected text范围仍只触及 `wasm-port/tests/browser/interp_smoke.html` 的
browser/OPFS test glue。
完成内容:
- 新增 `opfsParameterTextLines(...)`,统一 custom session saved parameter text 中
5161、5162、5221、5399 的 expected lines
- INI-named session 的 saved parameter readback 与 backup readback 均复用
`opfsParameterTextLines(...)`
- explicit session 的 saved parameter readback 与 backup readback 均复用
`opfsParameterTextLines(...)`
- tab 分隔的 saved parameter text 与 space 分隔的 backup text 仍在调用处显式区分;
- 所有 readback 仍通过 `verifyExpectedOutput(...)` 做精确文本校验;
- custom parameter/tool-table filename 输入、OPFS path、WASM path 字符串与
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
browser_interp_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
host_wasm_opfs_browser_smokes=ok
```
下一步建议:
继续小批量 browser OPFS test glue guard。优先扫描 custom session tool-table saved
text expected lines 是否还能用只读 expected-lines helper 收敛;只改测试胶水,保持
精确文本校验,不改变 custom filename 输入、OPFS path、WASM path 字符串或保存/读取行为。
二十四、2026-06-14 继续执行记录browser OPFS custom session tool text helper guard
本轮按上一条下一步建议继续收敛 custom session saved tool-table readback expected
text范围仍只触及 `wasm-port/tests/browser/interp_smoke.html` 的 browser/OPFS test
glue。
完成内容:
- 新增 `opfsToolTableTextLines(...)`,统一 custom session saved tool-table text 中
tool、pocket、Z offset、diameter、comment 的 expected lines
- INI-named session 的 saved tool-table readback 复用
`opfsToolTableTextLines(...)`
- explicit session 的 saved tool-table readback 复用
`opfsToolTableTextLines(...)`
- 所有 readback 仍通过 `verifyExpectedOutput(...)` 做精确文本校验;
- custom parameter/tool-table filename 输入、OPFS path、WASM path 字符串与
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
browser_interp_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
host_wasm_opfs_browser_smokes=ok
```
下一步建议:
继续小批量 browser OPFS test glue guard。优先扫描 custom session fixture input text
写入处是否还能用只读 expected-lines/helper 收敛,例如 parameter seed text 或
tool-table seed text只改测试胶水保持精确文本校验不改变 custom filename 输入、
OPFS path、WASM path 字符串或保存/读取行为。
二十五、2026-06-14 继续执行记录browser OPFS custom session parameter seed helper guard
本轮按上一条下一步建议继续收敛 custom session fixture input text 写入处,范围仍只
触及 `wasm-port/tests/browser/interp_smoke.html` 的 browser/OPFS test glue。
完成内容:
- 新增 `opfsParameterSeedText(...)`,统一 custom session parameter seed text 中
5161、5162、5220、5221、5399 的写入文本;
- INI-named session 的 custom parameter seed 写入复用
`opfsParameterSeedText(...)`
- explicit session 的 custom parameter seed 写入复用
`opfsParameterSeedText(...)`
- seed text 仍保留 `5220 1` 和末尾空行,实际写入内容不变;
- custom parameter/tool-table filename 输入、OPFS path、WASM path 字符串与
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
browser_interp_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
host_wasm_opfs_browser_smokes=ok
```
下一步建议:
继续小批量 browser OPFS test glue guard。优先扫描 custom session fixture input text
写入处的 tool-table seed text 是否还能用只读 helper 收敛;只改测试胶水,保持精确
文本校验,不改变 custom filename 输入、OPFS path、WASM path 字符串或保存/读取行为。
二十六、2026-06-14 继续执行记录browser OPFS custom session tool seed helper guard
本轮按上一条下一步建议继续收敛 custom session fixture input text 写入处的
tool-table seed text范围仍只触及 `wasm-port/tests/browser/interp_smoke.html` 的
browser/OPFS test glue。
完成内容:
- 新增 `opfsToolTableSeedText(...)`,统一 custom session tool-table seed text 中
tool、pocket、Z offset、diameter、comment 的写入文本;
- INI-named session 的 custom tool-table seed 写入复用
`opfsToolTableSeedText(...)`
- explicit session 的 custom tool-table seed 写入复用
`opfsToolTableSeedText(...)`
- seed text 仍保留单行 LinuxCNC tool-table 输入格式和末尾换行,实际写入内容不变;
- custom parameter/tool-table filename 输入、OPFS path、WASM path 字符串与
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
browser_interp_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
host_wasm_opfs_browser_smokes=ok
```
下一步建议:
继续小批量 browser OPFS test glue guard。优先扫描 custom session INI seed text 是否
还能用只读 helper 收敛,例如 MACHINE、PARAMETER_FILE、TOOL_TABLE 的 INI lines
只改测试胶水,保持精确文本校验,不改变 custom filename 输入、OPFS path、WASM path
字符串或保存/读取行为。
二十七、2026-06-14 继续执行记录browser OPFS custom session INI seed helper guard
本轮按上一条下一步建议继续收敛 custom session INI seed text范围仍只触及
`wasm-port/tests/browser/interp_smoke.html` 的 browser/OPFS test glue。
完成内容:
- 新增 `opfsCustomSessionIniText(...)`,统一 custom session INI seed text 中
`[EMC]`、`MACHINE`、`[RS274NGC]`、`PARAMETER_FILE`、`[EMCIO]`、
`TOOL_TABLE` 的写入文本;
- INI-named session 的 custom INI seed 写入复用
`opfsCustomSessionIniText(...)`
- explicit override session 的 ignored INI filename seed 写入复用
`opfsCustomSessionIniText(...)`
- INI seed text 仍保留各 section 间空行和末尾空行,实际写入内容不变;
- custom parameter/tool-table filename 输入、OPFS path、WASM path 字符串与
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
browser_interp_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
host_wasm_opfs_browser_smokes=ok
```
下一步建议:
继续小批量 browser OPFS test glue guard。优先扫描 custom session 中
`loadMachineSessionFromOpfs(...)` options object 是否还能用 helper/locals 收敛;
只改测试胶水,不改变 custom filename 输入、OPFS path、WASM path 字符串或保存/读取行为。
二十八、2026-06-14 继续执行记录browser OPFS custom session load options helper guard
本轮按上一条下一步建议继续收敛 custom session 的
`loadMachineSessionFromOpfs(...)` options object范围仍只触及
`wasm-port/tests/browser/interp_smoke.html` 的 browser/OPFS test glue。
完成内容:
- 新增 `opfsCustomSessionLoadOptions(...)`,统一 custom session load options 中
`iniSdk`、`iniWasmPath`、`parameterWasmPath`、`toolTableWasmPath` 的构造;
- INI-named session 的 load options 复用 `opfsCustomSessionLoadOptions(...)`
- explicit override session 的 load options 复用 `opfsCustomSessionLoadOptions(...)`
并继续显式传入 `parameterFilename` 与 `toolTableFilename` overrides
- custom parameter/tool-table filename 输入、OPFS path、WASM path 字符串与
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
browser_interp_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
host_wasm_opfs_browser_smokes=ok
```
下一步建议:
继续小批量 browser OPFS test glue guard。优先扫描 custom session 的 save
parameter/tool-table options object 是否还能用 locals/helper 收敛;只改测试胶水,
不改变 custom filename 输入、OPFS path、WASM path 字符串或保存/读取行为。
二十九、2026-06-14 继续执行记录browser OPFS custom session save options helper guard
本轮按上一条下一步建议继续收敛 custom session 的 save parameter/tool-table options
object范围仍只触及 `wasm-port/tests/browser/interp_smoke.html` 的 browser/OPFS test
glue。
完成内容:
- 新增 `opfsLoadedFileSaveOptions(...)`,统一从 loaded session file entry 派生
`{ opfsPath, wasmPath }` save options
- INI-named session 的 parameter save options 复用 `opfsLoadedFileSaveOptions(...)`
- INI-named session 的 tool-table save options 复用 `opfsLoadedFileSaveOptions(...)`
- explicit override session 的 parameter save options 复用
`opfsLoadedFileSaveOptions(...)`
- explicit override session 的 tool-table save options 复用
`opfsLoadedFileSaveOptions(...)`
- custom parameter/tool-table filename 输入、OPFS path、WASM path 字符串与
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
browser_interp_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
host_wasm_opfs_browser_smokes=ok
```
下一步建议:
继续小批量 browser OPFS test glue guard。优先扫描 custom session 中 saved
parameter value object 是否还能用 helper/locals 收敛;只改测试胶水,不改变参数值、
custom filename 输入、OPFS path、WASM path 字符串或保存/读取行为。
三十、2026-06-14 继续执行记录browser OPFS custom session parameter values helper guard
本轮按上一条下一步建议继续收敛 custom session 中 saved parameter value object
范围仍只触及 `wasm-port/tests/browser/interp_smoke.html` 的 browser/OPFS test glue。
完成内容:
- 新增 `opfsParameterValues(...)`,统一 custom session save parameter 时
5161、5162、5220、5221、5399 的 value object 构造;
- INI-named session 的 saved parameter value object 复用
`opfsParameterValues(...)`
- explicit override session 的 saved parameter value object 复用
`opfsParameterValues(...)`
- `5220` 仍固定为 `1.0`,实际保存参数值不变;
- custom parameter/tool-table filename 输入、OPFS path、WASM path 字符串与
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
browser_interp_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
host_wasm_opfs_browser_smokes=ok
```
下一步建议:
继续小批量 browser OPFS test glue guard。优先扫描 custom session 中 repeated
parameter value groups 是否还能和 result/readback expected helper 对齐为 locals
只改测试胶水不改变参数值、custom filename 输入、OPFS path、WASM path 字符串或
保存/读取行为。
三十一、2026-06-14 继续执行记录browser OPFS custom session parameter value locals guard
本轮按上一条下一步建议继续收敛 custom session 中 repeated parameter value groups
范围仍只触及 `wasm-port/tests/browser/interp_smoke.html` 的 browser/OPFS test glue。
完成内容:
- 为 INI-named session 增加 `iniNamedParameterValues`、
`iniNamedParameterExpectedValues`、`iniNamedParameterReadbackValues` 局部常量;
- INI-named session 的 save value object、save result expected lines、saved
parameter readback expected lines 均复用这些局部常量;
- 为 explicit override session 增加 `explicitParameterValues`、
`explicitParameterExpectedValues`、`explicitParameterReadbackValues` 局部常量;
- explicit override session 的 save value object、save result expected lines、saved
parameter readback expected lines 均复用这些局部常量;
- 数字保存值与字符串 expected/readback 值仍分开显式声明,未新增格式转换逻辑;
- `5220` 仍固定为 `1.0`,实际保存参数值不变;
- custom parameter/tool-table filename 输入、OPFS path、WASM path 字符串与
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
browser_interp_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
host_wasm_opfs_browser_smokes=ok
```
下一步建议:
继续小批量 browser OPFS test glue guard。优先扫描 custom session 中 initial
parameter seed/load/backup expected value groups 是否还能对齐为 locals只改测试胶水
不改变参数值、custom filename 输入、OPFS path、WASM path 字符串或保存/读取行为。
三十二、2026-06-14 继续执行记录browser OPFS custom session initial parameter locals guard
本轮按上一条下一步建议继续收敛 custom session 中 initial parameter
seed/load/backup expected value groups范围仍只触及
`wasm-port/tests/browser/interp_smoke.html` 的 browser/OPFS test glue。
完成内容:
- 为 INI-named session 增加 `iniNamedInitialParameterValues` 局部常量;
- INI-named session 的 parameter seed text、restore result expected lines、backup
readback expected lines 均复用 `iniNamedInitialParameterValues`
- 为 explicit override session 增加 `explicitInitialParameterValues` 局部常量;
- explicit override session 的 parameter seed text、restore result expected lines、
backup readback expected lines 均复用 `explicitInitialParameterValues`
- initial values 仍保持字符串形式显式声明,未新增格式转换逻辑;
- custom parameter/tool-table filename 输入、OPFS path、WASM path 字符串与
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
browser_interp_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
host_wasm_opfs_browser_smokes=ok
```
下一步建议:
继续小批量 browser OPFS test glue guard。优先扫描 custom session 中 tool-table
value groups 是否还能和 load/save/readback helper 对齐为 locals只改测试胶水
不改变 tool-table 输入、custom filename 输入、OPFS path、WASM path 字符串或保存/读取行为。
三十三、2026-06-14 继续执行记录browser OPFS custom session tool-table value locals guard
本轮按上一条下一步建议继续收敛 custom session 中 tool-table value groups范围仍只
触及 `wasm-port/tests/browser/interp_smoke.html` 的 browser/OPFS test glue。
完成内容:
- 为 INI-named session 增加 `iniNamedToolTableValues`、
`iniNamedToolTableLoadValues`、`iniNamedToolTableReadbackValues` 局部常量;
- INI-named session 的 tool-table seed text、load result expected lines、save
result expected lines、saved tool-table readback expected lines 均复用这些局部常量;
- 为 explicit override session 增加 `explicitToolTableValues`、
`explicitToolTableLoadValues`、`explicitToolTableReadbackValues` 局部常量;
- explicit override session 的 tool-table seed text、load result expected lines、
save result expected lines、saved tool-table readback expected lines 均复用这些局部常量;
- seed、load、readback 的 tool-table value 字符串仍分开显式声明,未新增格式转换逻辑;
- custom parameter/tool-table filename 输入、OPFS path、WASM path 字符串与
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
browser_interp_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
host_wasm_opfs_browser_smokes=ok
```
下一步建议:
继续小批量 browser OPFS test glue guard。优先扫描 custom session 中 filename groups
是否还能和 path/load/staging helper 对齐为 locals只改测试胶水不改变 custom
filename 输入、OPFS path、WASM path 字符串或保存/读取行为。
三十四、2026-06-14 继续执行记录browser OPFS INI-named session file group helper guard
本轮按上一条下一步建议继续收敛 custom session filename groups范围仍只触及
`wasm-port/tests/browser/interp_smoke.html` 的 browser/OPFS test glue。
完成内容:
- 新增 `opfsCustomSessionFiles(...)`,统一 custom session parameter/tool-table
filename 与对应 WASM path 的派生;
- INI-named session 的 `browser-custom.var` 与 `browser-custom-tool.tbl` 改为通过
`opfsCustomSessionFiles(...)` 生成 filename group
- INI-named session 的 parameter/tool-table WASM paths 改为复用该 filename group
派生出的 `/work/<filename>` paths
- 实际 custom filename 输入、OPFS path、WASM path 字符串与 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
browser_interp_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
host_wasm_opfs_browser_smokes=ok
```
下一步建议:
继续小批量 browser OPFS test glue guard。优先扫描 explicit override session 的
filename group 是否也能复用 `opfsCustomSessionFiles(...)`;只改测试胶水,不改变
custom filename 输入、OPFS path、WASM path 字符串或保存/读取行为。
三十五、2026-06-14 继续执行记录browser OPFS explicit session file group helper guard
本轮按上一条下一步建议继续收敛 explicit override session filename groups范围仍只
触及 `wasm-port/tests/browser/interp_smoke.html` 的 browser/OPFS test glue。
完成内容:
- explicit override session 的 `browser-explicit.var` 与
`browser-explicit-tool.tbl` 改为通过 `opfsCustomSessionFiles(...)` 生成
filename group
- explicit override session 的 parameter/tool-table filename locals 改为复用
该 filename group
- explicit override session 的 parameter/tool-table WASM paths 改为复用该
filename group 派生出的 `/work/<filename>` paths
- 实际 custom filename 输入、OPFS path、WASM path 字符串与 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
browser_interp_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
host_wasm_opfs_browser_smokes=ok
```
下一步建议:
继续小批量 browser OPFS test glue guard。优先扫描 OPFS save result
`verifyExpectedOutput(...)` 的重复 result verification 是否还能收敛为小 helper
只改测试胶水不改变保存结果内容、OPFS path、WASM path 字符串或保存/读取行为。

View File

@@ -4547,6 +4547,106 @@
verifyExpectedOutput(label, loadResult.result, expectedLines.join("\n"));
}
function opfsParameterResultLines(operation, parameter5161, parameter5162, parameter5221, parameter5399) {
return [
`${operation}_parameters=0`,
`parameter_5161=${parameter5161}`,
`parameter_5162=${parameter5162}`,
`parameter_5221=${parameter5221}`,
`parameter_5399=${parameter5399}`,
];
}
function opfsParameterTextLines(separator, parameter5161, parameter5162, parameter5221, parameter5399) {
return [
`5161${separator}${parameter5161}`,
`5162${separator}${parameter5162}`,
`5221${separator}${parameter5221}`,
`5399${separator}${parameter5399}`,
];
}
function opfsParameterSeedText(parameter5161, parameter5162, parameter5221, parameter5399) {
return [
`5161 ${parameter5161}`,
`5162 ${parameter5162}`,
"5220 1",
`5221 ${parameter5221}`,
`5399 ${parameter5399}`,
"",
].join("\n");
}
function opfsParameterValues(parameter5161, parameter5162, parameter5221, parameter5399) {
return {
5161: parameter5161,
5162: parameter5162,
5220: 1.0,
5221: parameter5221,
5399: parameter5399,
};
}
function opfsToolTableResultLines(operation, toolNo, pocketNo, extraLines = []) {
return [
`tooldata_${operation}=0`,
`tool_1.toolno=${toolNo}`,
`tool_1.pocketno=${pocketNo}`,
...extraLines,
];
}
function opfsToolTableTextLines(toolNo, pocketNo, zOffset, diameter, comment) {
return [
`T${toolNo}`,
`P${pocketNo}`,
`Z${zOffset}`,
`D${diameter}`,
comment,
];
}
function opfsToolTableSeedText(toolNo, pocketNo, zOffset, diameter, comment) {
return `T${toolNo} P${pocketNo} Z${zOffset} D${diameter} ${comment}\n`;
}
function opfsCustomSessionIniText(machineId, parameterFilename, toolTableFilename) {
return [
"[EMC]",
`MACHINE = ${machineId}`,
"",
"[RS274NGC]",
`PARAMETER_FILE = ${parameterFilename}`,
"",
"[EMCIO]",
`TOOL_TABLE = ${toolTableFilename}`,
"",
].join("\n");
}
function opfsCustomSessionLoadOptions(
iniSdk,
iniWasmPath,
parameterWasmPath,
toolTableWasmPath,
filenameOverrides = {},
) {
return {
iniSdk,
iniWasmPath,
...filenameOverrides,
parameterWasmPath,
toolTableWasmPath,
};
}
function opfsLoadedFileSaveOptions(loadedFile) {
return {
opfsPath: loadedFile.opfsPath,
wasmPath: loadedFile.wasmPath,
};
}
async function verifyOpfsSavedText(label, loadActualText, expectedLines) {
verifyExpectedOutput(label, await loadActualText(), expectedLines.join("\n"));
}
@@ -4572,6 +4672,19 @@
return `/work/${filename}`;
}
function opfsCustomSessionFiles(parameterFilename, toolTableFilename) {
return {
filenames: {
parameters: parameterFilename,
toolTable: toolTableFilename,
},
wasm: {
parameters: opfsCustomSessionWasmPath(parameterFilename),
toolTable: opfsCustomSessionWasmPath(toolTableFilename),
},
};
}
function opfsMachineIniWasmPath(machineId) {
return `/work/${machineId}.ini`;
}
@@ -4588,7 +4701,14 @@
);
}
function opfsCustomSessionPaths(machineId, parameterFilename, toolTableFilename, iniWasmPath) {
function opfsCustomSessionPaths(
machineId,
parameterFilename,
toolTableFilename,
iniWasmPath,
parameterWasmPath,
toolTableWasmPath,
) {
return {
opfs: {
parameters: opfsMachineFilePath(machineId, parameterFilename),
@@ -4596,8 +4716,8 @@
},
wasm: {
ini: iniWasmPath,
parameters: opfsCustomSessionWasmPath(parameterFilename),
toolTable: opfsCustomSessionWasmPath(toolTableFilename),
parameters: parameterWasmPath,
toolTable: toolTableWasmPath,
},
};
}
@@ -9436,55 +9556,47 @@
);
const iniFileMachineId = "browser-ini-file-session";
const iniFileParameterFilename = "browser-custom.var";
const iniFileToolTableFilename = "browser-custom-tool.tbl";
const iniFileSessionFiles = opfsCustomSessionFiles("browser-custom.var", "browser-custom-tool.tbl");
const iniFileIniWasmPath = opfsMachineIniWasmPath(iniFileMachineId);
const iniFileParameterWasmPath = opfsCustomSessionWasmPath(iniFileParameterFilename);
const iniFileToolTableWasmPath = opfsCustomSessionWasmPath(iniFileToolTableFilename);
const iniFileParameterFilename = iniFileSessionFiles.filenames.parameters;
const iniFileToolTableFilename = iniFileSessionFiles.filenames.toolTable;
const iniFileParameterWasmPath = iniFileSessionFiles.wasm.parameters;
const iniFileToolTableWasmPath = iniFileSessionFiles.wasm.toolTable;
const browserIniFileTextPaths = await saveMachineTextFiles(iniFileMachineId, {
ini: [
"[EMC]",
`MACHINE = ${iniFileMachineId}`,
"",
"[RS274NGC]",
`PARAMETER_FILE = ${iniFileParameterFilename}`,
"",
"[EMCIO]",
`TOOL_TABLE = ${iniFileToolTableFilename}`,
"",
].join("\n"),
ini: opfsCustomSessionIniText(
iniFileMachineId,
iniFileParameterFilename,
iniFileToolTableFilename,
),
});
assertMachineTextStorePaths(
"opfs_save_ini_named_machine_text_files_staging",
browserIniFileTextPaths,
iniFileMachineId,
);
const iniNamedInitialParameterValues = ["31.25", "62.5", "4.5", "99"];
await writeOpfsMachineFile(
iniFileMachineId,
iniFileParameterFilename,
[
"5161 31.25",
"5162 62.5",
"5220 1",
"5221 4.5",
"5399 99",
"",
].join("\n"),
opfsParameterSeedText(...iniNamedInitialParameterValues),
);
const iniNamedToolTableValues = ["8", "8", "4.5", "0.5", ";browser custom tool"];
const iniNamedToolTableLoadValues = ["8", "8", "4.5", "0.5", "browser custom tool"];
const iniNamedToolTableReadbackValues = ["8", "8", "+4.500000", "+0.500000", ";browser custom tool"];
await writeOpfsMachineFile(
iniFileMachineId,
iniFileToolTableFilename,
"T8 P8 Z4.5 D0.5 ;browser custom tool\n",
opfsToolTableSeedText(...iniNamedToolTableValues),
);
const loadedIniFileSession = await loadMachineSessionFromOpfs(
interp,
iniFileMachineId,
{
iniSdk: ini,
iniWasmPath: iniFileIniWasmPath,
parameterWasmPath: iniFileParameterWasmPath,
toolTableWasmPath: iniFileToolTableWasmPath,
},
opfsCustomSessionLoadOptions(
ini,
iniFileIniWasmPath,
iniFileParameterWasmPath,
iniFileToolTableWasmPath,
),
);
assertOpfsSessionStaging(
"opfs_load_ini_named_session_staging",
@@ -9495,33 +9607,23 @@
iniFileParameterFilename,
iniFileToolTableFilename,
iniFileIniWasmPath,
iniFileParameterWasmPath,
iniFileToolTableWasmPath,
),
);
verifyOpfsLoadResult(
"opfs_load_ini_named_parameter_file",
loadedIniFileSession.parameters,
[
"restore_parameters=0",
"parameter_5161=31.25",
"parameter_5162=62.5",
"parameter_5221=4.5",
"parameter_5399=99",
],
opfsParameterResultLines("restore", ...iniNamedInitialParameterValues),
);
const iniNamedParameterValues = [33.75, 67.5, 5.25, 199];
const iniNamedParameterExpectedValues = ["33.75", "67.5", "5.25", "199"];
const iniNamedParameterReadbackValues = ["33.750000", "67.500000", "5.250000", "199.000000"];
const savedIniNamedParameters = await saveMachineParametersToOpfs(
interp,
iniFileMachineId,
{
5161: 33.75,
5162: 67.5,
5220: 1.0,
5221: 5.25,
5399: 199,
},
{
opfsPath: loadedIniFileSession.parameters.opfsPath,
wasmPath: loadedIniFileSession.parameters.wasmPath,
},
opfsParameterValues(...iniNamedParameterValues),
opfsLoadedFileSaveOptions(loadedIniFileSession.parameters),
);
assertOpfsSavedParameterStaging(
"opfs_save_ini_named_parameters_staging",
@@ -9533,53 +9635,31 @@
verifyOpfsSaveResult(
"opfs_save_ini_named_parameter_file",
savedIniNamedParameters,
[
"save_parameters=0",
"parameter_5161=33.75",
"parameter_5162=67.5",
"parameter_5221=5.25",
"parameter_5399=199",
],
opfsParameterResultLines("save", ...iniNamedParameterExpectedValues),
);
await verifyOpfsReadback(
"opfs_saved_ini_named_parameter_text",
loadedIniFileSession.parameters.opfsPath,
[
"5161\t33.750000",
"5162\t67.500000",
"5221\t5.250000",
"5399\t199.000000",
],
opfsParameterTextLines("\t", ...iniNamedParameterReadbackValues),
);
await verifyOpfsSavedText(
await verifyOpfsReadback(
"opfs_saved_ini_named_parameter_backup_text",
() => loadTextFile(savedIniNamedParameters.backupOpfsPath),
[
"5161 31.25",
"5162 62.5",
"5221 4.5",
"5399 99",
],
savedIniNamedParameters.backupOpfsPath,
opfsParameterTextLines(" ", ...iniNamedInitialParameterValues),
);
verifyOpfsLoadResult(
"opfs_load_ini_named_tool_table",
loadedIniFileSession.toolTable,
[
"tooldata_load=0",
"tool_1.toolno=8",
"tool_1.pocketno=8",
"tool_1.z=4.5",
"tool_1.diameter=0.5",
"tool_1.comment=browser custom tool",
],
opfsToolTableResultLines("load", iniNamedToolTableLoadValues[0], iniNamedToolTableLoadValues[1], [
`tool_1.z=${iniNamedToolTableLoadValues[2]}`,
`tool_1.diameter=${iniNamedToolTableLoadValues[3]}`,
`tool_1.comment=${iniNamedToolTableLoadValues[4]}`,
]),
);
const savedIniNamedToolTable = await saveMachineToolTableToOpfs(
interp,
iniFileMachineId,
{
opfsPath: loadedIniFileSession.toolTable.opfsPath,
wasmPath: loadedIniFileSession.toolTable.wasmPath,
},
opfsLoadedFileSaveOptions(loadedIniFileSession.toolTable),
);
assertOpfsSavedToolTableStaging(
"opfs_save_ini_named_tool_table_staging",
@@ -9591,76 +9671,60 @@
verifyOpfsSaveResult(
"opfs_save_ini_named_tool_table",
savedIniNamedToolTable,
[
"tooldata_save=0",
"tool_1.toolno=8",
"tool_1.pocketno=8",
],
opfsToolTableResultLines("save", iniNamedToolTableValues[0], iniNamedToolTableValues[1]),
);
await verifyOpfsSavedText(
await verifyOpfsReadback(
"opfs_saved_ini_named_tool_table_text",
() => loadTextFile(loadedIniFileSession.toolTable.opfsPath),
[
"T8",
"P8",
"Z+4.500000",
"D+0.500000",
";browser custom tool",
],
loadedIniFileSession.toolTable.opfsPath,
opfsToolTableTextLines(...iniNamedToolTableReadbackValues),
);
const iniOverrideMachineId = "browser-ini-override-session";
const explicitParameterFilename = "browser-explicit.var";
const explicitToolTableFilename = "browser-explicit-tool.tbl";
const explicitSessionFiles = opfsCustomSessionFiles("browser-explicit.var", "browser-explicit-tool.tbl");
const iniOverrideIniWasmPath = opfsMachineIniWasmPath(iniOverrideMachineId);
const explicitParameterWasmPath = opfsCustomSessionWasmPath(explicitParameterFilename);
const explicitToolTableWasmPath = opfsCustomSessionWasmPath(explicitToolTableFilename);
const explicitParameterFilename = explicitSessionFiles.filenames.parameters;
const explicitToolTableFilename = explicitSessionFiles.filenames.toolTable;
const explicitParameterWasmPath = explicitSessionFiles.wasm.parameters;
const explicitToolTableWasmPath = explicitSessionFiles.wasm.toolTable;
const browserIniOverrideTextPaths = await saveMachineTextFiles(iniOverrideMachineId, {
ini: [
"[EMC]",
`MACHINE = ${iniOverrideMachineId}`,
"",
"[RS274NGC]",
"PARAMETER_FILE = browser-ignored.var",
"",
"[EMCIO]",
"TOOL_TABLE = browser-ignored-tool.tbl",
"",
].join("\n"),
ini: opfsCustomSessionIniText(
iniOverrideMachineId,
"browser-ignored.var",
"browser-ignored-tool.tbl",
),
});
assertMachineTextStorePaths(
"opfs_save_ini_override_machine_text_files_staging",
browserIniOverrideTextPaths,
iniOverrideMachineId,
);
const explicitInitialParameterValues = ["41.25", "82.5", "6.5", "101"];
await writeOpfsMachineFile(
iniOverrideMachineId,
explicitParameterFilename,
[
"5161 41.25",
"5162 82.5",
"5220 1",
"5221 6.5",
"5399 101",
"",
].join("\n"),
opfsParameterSeedText(...explicitInitialParameterValues),
);
const explicitToolTableValues = ["9", "9", "5.5", "0.625", ";browser explicit tool"];
const explicitToolTableLoadValues = ["9", "9", "5.5", "0.625", "browser explicit tool"];
const explicitToolTableReadbackValues = ["9", "9", "+5.500000", "+0.625000", ";browser explicit tool"];
await writeOpfsMachineFile(
iniOverrideMachineId,
explicitToolTableFilename,
"T9 P9 Z5.5 D0.625 ;browser explicit tool\n",
opfsToolTableSeedText(...explicitToolTableValues),
);
const loadedIniOverrideSession = await loadMachineSessionFromOpfs(
interp,
iniOverrideMachineId,
{
iniSdk: ini,
iniWasmPath: iniOverrideIniWasmPath,
parameterFilename: explicitParameterFilename,
parameterWasmPath: explicitParameterWasmPath,
toolTableFilename: explicitToolTableFilename,
toolTableWasmPath: explicitToolTableWasmPath,
},
opfsCustomSessionLoadOptions(
ini,
iniOverrideIniWasmPath,
explicitParameterWasmPath,
explicitToolTableWasmPath,
{
parameterFilename: explicitParameterFilename,
toolTableFilename: explicitToolTableFilename,
},
),
);
assertOpfsSessionStaging(
"opfs_load_explicit_session_staging",
@@ -9671,45 +9735,32 @@
explicitParameterFilename,
explicitToolTableFilename,
iniOverrideIniWasmPath,
explicitParameterWasmPath,
explicitToolTableWasmPath,
),
);
verifyOpfsLoadResult(
"opfs_load_explicit_parameter_file",
loadedIniOverrideSession.parameters,
[
"restore_parameters=0",
"parameter_5161=41.25",
"parameter_5162=82.5",
"parameter_5221=6.5",
"parameter_5399=101",
],
opfsParameterResultLines("restore", ...explicitInitialParameterValues),
);
verifyOpfsLoadResult(
"opfs_load_explicit_tool_table",
loadedIniOverrideSession.toolTable,
[
"tooldata_load=0",
"tool_1.toolno=9",
"tool_1.pocketno=9",
"tool_1.z=5.5",
"tool_1.diameter=0.625",
"tool_1.comment=browser explicit tool",
],
opfsToolTableResultLines("load", explicitToolTableLoadValues[0], explicitToolTableLoadValues[1], [
`tool_1.z=${explicitToolTableLoadValues[2]}`,
`tool_1.diameter=${explicitToolTableLoadValues[3]}`,
`tool_1.comment=${explicitToolTableLoadValues[4]}`,
]),
);
const explicitParameterValues = [51.25, 102.5, 7.5, 202];
const explicitParameterExpectedValues = ["51.25", "102.5", "7.5", "202"];
const explicitParameterReadbackValues = ["51.250000", "102.500000", "7.500000", "202.000000"];
const savedExplicitParameters = await saveMachineParametersToOpfs(
interp,
iniOverrideMachineId,
{
5161: 51.25,
5162: 102.5,
5220: 1.0,
5221: 7.5,
5399: 202,
},
{
opfsPath: loadedIniOverrideSession.parameters.opfsPath,
wasmPath: loadedIniOverrideSession.parameters.wasmPath,
},
opfsParameterValues(...explicitParameterValues),
opfsLoadedFileSaveOptions(loadedIniOverrideSession.parameters),
);
assertOpfsSavedParameterStaging(
"opfs_save_explicit_parameters_staging",
@@ -9721,41 +9772,22 @@
verifyOpfsSaveResult(
"opfs_save_explicit_parameter_file",
savedExplicitParameters,
[
"save_parameters=0",
"parameter_5161=51.25",
"parameter_5162=102.5",
"parameter_5221=7.5",
"parameter_5399=202",
],
opfsParameterResultLines("save", ...explicitParameterExpectedValues),
);
await verifyOpfsSavedText(
await verifyOpfsReadback(
"opfs_saved_explicit_parameter_text",
() => loadTextFile(loadedIniOverrideSession.parameters.opfsPath),
[
"5161\t51.250000",
"5162\t102.500000",
"5221\t7.500000",
"5399\t202.000000",
],
loadedIniOverrideSession.parameters.opfsPath,
opfsParameterTextLines("\t", ...explicitParameterReadbackValues),
);
await verifyOpfsSavedText(
await verifyOpfsReadback(
"opfs_saved_explicit_parameter_backup_text",
() => loadTextFile(savedExplicitParameters.backupOpfsPath),
[
"5161 41.25",
"5162 82.5",
"5221 6.5",
"5399 101",
],
savedExplicitParameters.backupOpfsPath,
opfsParameterTextLines(" ", ...explicitInitialParameterValues),
);
const savedExplicitToolTable = await saveMachineToolTableToOpfs(
interp,
iniOverrideMachineId,
{
opfsPath: loadedIniOverrideSession.toolTable.opfsPath,
wasmPath: loadedIniOverrideSession.toolTable.wasmPath,
},
opfsLoadedFileSaveOptions(loadedIniOverrideSession.toolTable),
);
assertOpfsSavedToolTableStaging(
"opfs_save_explicit_tool_table_staging",
@@ -9767,22 +9799,12 @@
verifyOpfsSaveResult(
"opfs_save_explicit_tool_table",
savedExplicitToolTable,
[
"tooldata_save=0",
"tool_1.toolno=9",
"tool_1.pocketno=9",
],
opfsToolTableResultLines("save", explicitToolTableValues[0], explicitToolTableValues[1]),
);
await verifyOpfsSavedText(
await verifyOpfsReadback(
"opfs_saved_explicit_tool_table_text",
() => loadTextFile(loadedIniOverrideSession.toolTable.opfsPath),
[
"T9",
"P9",
"Z+5.500000",
"D+0.625000",
";browser explicit tool",
],
loadedIniOverrideSession.toolTable.opfsPath,
opfsToolTableTextLines(...explicitToolTableReadbackValues),
);
await verifyOpfsInvalidIniSessionRejects(