Guard browser OPFS default filename constants

This commit is contained in:
2026-06-14 01:16:39 +08:00
parent febab4c20e
commit 0f5d31b088
2 changed files with 61 additions and 10 deletions

View File

@@ -564,3 +564,50 @@ host_wasm_opfs_browser_smokes=ok
`machine.ini`、`linuxcnc.var`、`tool.tbl` 是否值得抽成局部常量,只限
`interp_smoke.html` test glue如果收益不明显转向其它 browser staging path
literal guard。
十四、2026-06-14 继续执行记录browser OPFS default filename constants guard
本轮按上一条下一步建议扫描 OPFS default filename 重复形态,确认收益明确后继续在
`wasm-port/tests/browser/interp_smoke.html` 内做小范围 test glue 收敛。
完成内容:
- 新增 `OPFS_DEFAULT_INI_FILENAME`、`OPFS_DEFAULT_PARAMETER_FILENAME`、
`OPFS_DEFAULT_TOOL_TABLE_FILENAME` 三个局部常量;
- 将默认 machine file path helper、default session staging helper、invalid INI
path guard、default save staging 调用改为复用这些常量;
- custom fixture filename 仍保持在测试输入处外显;
- 未改变 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
```
关键输出:
```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 staging path literal guard。优先扫描 `interp_smoke.html` 中
`/work/browser-*` WASM path 常量是否还有成组重复可收敛;只做测试胶水 helper 或
常量,不改变 staging path 模型、OPFS bridge 或 LinuxCNC 语义。