Guard browser OPFS custom session wasm paths

This commit is contained in:
2026-06-13 23:41:50 +08:00
parent 4f174cb0c2
commit 327f86804c
2 changed files with 62 additions and 12 deletions

View File

@@ -2299,3 +2299,57 @@ saved parameter/tool-table readback 的 backup path 命名、以及 custom sessi
```bash
git status --short && git log -5 --oneline && tail -n 120 text7.txt && awk '/^[一二三四五六七八九十百]+、/ {print}' text7.txt | sort | uniq -d
```
三十九、2026-06-13 继续执行记录browser OPFS custom session wasm path helper guard
1. 本批目标。
继续 staged path guard inventory 第三十四轮,进一步收敛 browser OPFS smoke 中 custom
session 的 session-path 组合,让 helper 同时生成 custom file 的 WASM path。
2. 已完成改动。
- 扩展 `opfsCustomSessionPaths(...)`,由 helper 根据 custom filename 生成
`/work/<filename>` WASM path
- INI-derived custom session 和 explicit override session 的 staging map 调用改为只传
`machineId`、custom parameter filename、custom tool-table filename 和 INI WASM path
- 保留 `parameterWasmPath`、`toolTableWasmPath` 的 runtime input 显式可见;
- 未修改 OPFS bridge behavior、file-service、path-model、SDK planner、interpreter 或
LinuxCNC-owned runtime semantics。
涉及文件:
```text
wasm-port/tests/browser/interp_smoke.html
```
3. 已完成验证。
```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
Guard browser OPFS custom session wasm paths
```
4. 下一步工作建议。
继续 staged path guard inventory 第三十五轮,优先扫描 browser OPFS smoke 中
custom session 的 `parameterWasmPath`、`toolTableWasmPath` runtime input 和 helper
生成 path 是否还能通过 shared constants 小范围收敛;仍只加 browser/OPFS boundary
guard不改变 LinuxCNC-owned interpreter、INI、tool、parameter 或 runtime semantics。
下一轮第一条命令仍保持:
```bash
git status --short && git log -5 --oneline && tail -n 120 text7.txt && awk '/^[一二三四五六七八九十百]+、/ {print}' text7.txt | sort | uniq -d
```

View File

@@ -4545,13 +4545,17 @@
return opfsPath;
}
function opfsCustomSessionPaths(machineId, parameterFilename, toolTableFilename, wasmPaths) {
function opfsCustomSessionPaths(machineId, parameterFilename, toolTableFilename, iniWasmPath) {
return {
opfs: {
parameters: opfsMachineFilePath(machineId, parameterFilename),
toolTable: opfsMachineFilePath(machineId, toolTableFilename),
},
wasm: wasmPaths,
wasm: {
ini: iniWasmPath,
parameters: `/work/${parameterFilename}`,
toolTable: `/work/${toolTableFilename}`,
},
};
}
@@ -9440,11 +9444,7 @@
"browser-ini-file-session",
"browser-custom.var",
"browser-custom-tool.tbl",
{
ini: "/work/browser-ini-file-session.ini",
parameters: "/work/browser-custom.var",
toolTable: "/work/browser-custom-tool.tbl",
},
"/work/browser-ini-file-session.ini",
),
);
verifyExpectedOutput(
@@ -9614,11 +9614,7 @@
"browser-ini-override-session",
"browser-explicit.var",
"browser-explicit-tool.tbl",
{
ini: "/work/browser-ini-override-session.ini",
parameters: "/work/browser-explicit.var",
toolTable: "/work/browser-explicit-tool.tbl",
},
"/work/browser-ini-override-session.ini",
),
);
verifyExpectedOutput(