From 327f86804c58520948f9260428a3037cb17dbcc7 Mon Sep 17 00:00:00 2001 From: wangdequan Date: Sat, 13 Jun 2026 23:41:50 +0800 Subject: [PATCH] Guard browser OPFS custom session wasm paths --- text7.txt | 54 +++++++++++++++++++++++ wasm-port/tests/browser/interp_smoke.html | 20 ++++----- 2 files changed, 62 insertions(+), 12 deletions(-) diff --git a/text7.txt b/text7.txt index c11eca8..e7f5054 100644 --- a/text7.txt +++ b/text7.txt @@ -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/` 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 +``` diff --git a/wasm-port/tests/browser/interp_smoke.html b/wasm-port/tests/browser/interp_smoke.html index c7b0efa..601a879 100644 --- a/wasm-port/tests/browser/interp_smoke.html +++ b/wasm-port/tests/browser/interp_smoke.html @@ -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(