From 06f4316685f87c25a1bd1071dc8c1599193e038b Mon Sep 17 00:00:00 2001 From: wangdequan Date: Sun, 14 Jun 2026 00:01:20 +0800 Subject: [PATCH] Guard browser OPFS custom session INI wasm paths --- text7.txt | 54 +++++++++++++++++++++++ wasm-port/tests/browser/interp_smoke.html | 10 +++-- 2 files changed, 60 insertions(+), 4 deletions(-) diff --git a/text7.txt b/text7.txt index 4b68e3a..e7d5491 100644 --- a/text7.txt +++ b/text7.txt @@ -2466,3 +2466,57 @@ semantics。 ```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 INI wasm path constants guard + +1. 本批目标。 + +继续 staged path guard inventory 第三十七轮,收敛 browser OPFS smoke 中 custom +session 的 INI WASM path 重复 literal。 + +2. 已完成改动。 + +- INI-derived custom session block 新增 `iniFileIniWasmPath`; +- explicit override custom session block 新增 `iniOverrideIniWasmPath`; +- `loadMachineSessionFromOpfs(...)` runtime input 与 `opfsCustomSessionPaths(...)` + staging expected path 均改为复用对应局部 constant; +- 未修改 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 INI wasm paths +``` + +4. 下一步工作建议。 + +继续 staged path guard inventory 第三十八轮,优先扫描 browser OPFS smoke 中 custom +session block 是否还有 path-only 重复;如果已基本收敛,转向 OPFS ordinary/random +session 的 machine id、file names、WASM paths 是否也能用同样小范围 helper 收敛; +仍只加 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 758bd4f..cbe4578 100644 --- a/wasm-port/tests/browser/interp_smoke.html +++ b/wasm-port/tests/browser/interp_smoke.html @@ -9398,6 +9398,7 @@ const iniFileMachineId = "browser-ini-file-session"; const iniFileParameterFilename = "browser-custom.var"; const iniFileToolTableFilename = "browser-custom-tool.tbl"; + const iniFileIniWasmPath = "/work/browser-ini-file-session.ini"; const browserIniFileTextPaths = await saveMachineTextFiles(iniFileMachineId, { ini: [ "[EMC]", @@ -9438,7 +9439,7 @@ iniFileMachineId, { iniSdk: ini, - iniWasmPath: "/work/browser-ini-file-session.ini", + iniWasmPath: iniFileIniWasmPath, parameterWasmPath: opfsCustomSessionWasmPath(iniFileParameterFilename), toolTableWasmPath: opfsCustomSessionWasmPath(iniFileToolTableFilename), }, @@ -9451,7 +9452,7 @@ iniFileMachineId, iniFileParameterFilename, iniFileToolTableFilename, - "/work/browser-ini-file-session.ini", + iniFileIniWasmPath, ), ); verifyExpectedOutput( @@ -9569,6 +9570,7 @@ const iniOverrideMachineId = "browser-ini-override-session"; const explicitParameterFilename = "browser-explicit.var"; const explicitToolTableFilename = "browser-explicit-tool.tbl"; + const iniOverrideIniWasmPath = "/work/browser-ini-override-session.ini"; const browserIniOverrideTextPaths = await saveMachineTextFiles(iniOverrideMachineId, { ini: [ "[EMC]", @@ -9609,7 +9611,7 @@ iniOverrideMachineId, { iniSdk: ini, - iniWasmPath: "/work/browser-ini-override-session.ini", + iniWasmPath: iniOverrideIniWasmPath, parameterFilename: explicitParameterFilename, parameterWasmPath: opfsCustomSessionWasmPath(explicitParameterFilename), toolTableFilename: explicitToolTableFilename, @@ -9624,7 +9626,7 @@ iniOverrideMachineId, explicitParameterFilename, explicitToolTableFilename, - "/work/browser-ini-override-session.ini", + iniOverrideIniWasmPath, ), ); verifyExpectedOutput(