Guard browser OPFS INI staging
This commit is contained in:
67
text7.txt
67
text7.txt
@@ -1292,3 +1292,70 @@ runtime semantics。
|
|||||||
```bash
|
```bash
|
||||||
git status --short && git log -5 --oneline && tail -n 120 text7.txt && awk '/^[一二三四五六七八九十百]+、/ {print}' text7.txt | sort | uniq -d
|
git status --short && git log -5 --oneline && tail -n 120 text7.txt && awk '/^[一二三四五六七八九十百]+、/ {print}' text7.txt | sort | uniq -d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
二十三、2026-06-13 继续执行记录:browser OPFS INI staging guard
|
||||||
|
|
||||||
|
1. 本批目标。
|
||||||
|
|
||||||
|
继续 staged path guard inventory 第十八轮,处理 browser OPFS/session INI boundary
|
||||||
|
path:
|
||||||
|
|
||||||
|
```text
|
||||||
|
/work/browser-machine.ini
|
||||||
|
/work/browser-random-machine.ini
|
||||||
|
/work/browser-ini-file-session.ini
|
||||||
|
/work/browser-ini-override-session.ini
|
||||||
|
```
|
||||||
|
|
||||||
|
2. 已完成改动。
|
||||||
|
|
||||||
|
- browser 侧新增 `assertOpfsIniStaging(...)`;
|
||||||
|
- 默认 machine session 的 INI OPFS path 与 WASM path 增加显式 guard;
|
||||||
|
- random toolchanger session 的 INI OPFS path 与 WASM path 增加显式 guard;
|
||||||
|
- INI `PARAMETER_FILE`/`TOOL_TABLE` 命名 session 的 INI OPFS path 与 WASM path 增加
|
||||||
|
显式 guard;
|
||||||
|
- explicit override session 的 INI OPFS path 与 WASM path 增加显式 guard;
|
||||||
|
- 未修改 INI 内容、INI parsing、parameter/tool table staging、OPFS 存储内容或
|
||||||
|
session 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
|
||||||
|
```
|
||||||
|
|
||||||
|
4. 本批剩余建议验证。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
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 INI staging
|
||||||
|
```
|
||||||
|
|
||||||
|
5. 下一步工作建议。
|
||||||
|
|
||||||
|
继续 staged path guard inventory 第十九轮,优先扫描 browser OPFS/session invalid
|
||||||
|
INI-path negative cases,例如 `/work/browser-invalid-param-file-session.ini` 与
|
||||||
|
`/work/browser-invalid-tool-file-session.ini`;仍只加 filesystem/OPFS path guard,不改变
|
||||||
|
INI validation、path-model 或 session runtime semantics。
|
||||||
|
|
||||||
|
下一轮第一条命令仍保持:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git status --short && git log -5 --oneline && tail -n 120 text7.txt && awk '/^[一二三四五六七八九十百]+、/ {print}' text7.txt | sort | uniq -d
|
||||||
|
```
|
||||||
|
|||||||
@@ -4469,6 +4469,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function assertOpfsIniStaging(label, iniFile, expectedOpfsPath, expectedWasmPath) {
|
||||||
|
if (iniFile.opfsPath !== expectedOpfsPath) {
|
||||||
|
throw new Error(`${label}: unexpected INI OPFS path ${iniFile.opfsPath}`);
|
||||||
|
}
|
||||||
|
if (iniFile.wasmPath !== expectedWasmPath) {
|
||||||
|
throw new Error(`${label}: unexpected INI WASM path ${iniFile.wasmPath}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function generatedToolTablePath(wasmPath, expectedWasmPath) {
|
function generatedToolTablePath(wasmPath, expectedWasmPath) {
|
||||||
if (wasmPath !== expectedWasmPath) {
|
if (wasmPath !== expectedWasmPath) {
|
||||||
throw new Error(`browser_tool_table_fixture_${expectedWasmPath}: path drift`);
|
throw new Error(`browser_tool_table_fixture_${expectedWasmPath}: path drift`);
|
||||||
@@ -8994,6 +9003,12 @@
|
|||||||
toolTableWasmPath: "/work/browser-tool.tbl",
|
toolTableWasmPath: "/work/browser-tool.tbl",
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
assertOpfsIniStaging(
|
||||||
|
"opfs_load_ini_staging",
|
||||||
|
loadedSession.ini,
|
||||||
|
"linuxcnc/machines/browser-interp/machine.ini",
|
||||||
|
"/work/browser-machine.ini",
|
||||||
|
);
|
||||||
assertOpfsToolTableStaging(
|
assertOpfsToolTableStaging(
|
||||||
"opfs_load_tool_table_staging",
|
"opfs_load_tool_table_staging",
|
||||||
loadedSession.toolTable,
|
loadedSession.toolTable,
|
||||||
@@ -9155,6 +9170,12 @@
|
|||||||
toolTableWasmPath: "/work/browser-random-tool.tbl",
|
toolTableWasmPath: "/work/browser-random-tool.tbl",
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
assertOpfsIniStaging(
|
||||||
|
"opfs_load_random_ini_staging",
|
||||||
|
loadedRandomSession.ini,
|
||||||
|
"linuxcnc/machines/browser-random-toolchanger/machine.ini",
|
||||||
|
"/work/browser-random-machine.ini",
|
||||||
|
);
|
||||||
assertOpfsToolTableStaging(
|
assertOpfsToolTableStaging(
|
||||||
"opfs_load_random_tool_table_staging",
|
"opfs_load_random_tool_table_staging",
|
||||||
loadedRandomSession.toolTable,
|
loadedRandomSession.toolTable,
|
||||||
@@ -9260,6 +9281,12 @@
|
|||||||
toolTableWasmPath: "/work/browser-custom-tool.tbl",
|
toolTableWasmPath: "/work/browser-custom-tool.tbl",
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
assertOpfsIniStaging(
|
||||||
|
"opfs_load_ini_named_ini_staging",
|
||||||
|
loadedIniFileSession.ini,
|
||||||
|
"linuxcnc/machines/browser-ini-file-session/machine.ini",
|
||||||
|
"/work/browser-ini-file-session.ini",
|
||||||
|
);
|
||||||
assertOpfsToolTableStaging(
|
assertOpfsToolTableStaging(
|
||||||
"opfs_load_ini_named_tool_table_staging",
|
"opfs_load_ini_named_tool_table_staging",
|
||||||
loadedIniFileSession.toolTable,
|
loadedIniFileSession.toolTable,
|
||||||
@@ -9423,6 +9450,12 @@
|
|||||||
toolTableWasmPath: "/work/browser-explicit-tool.tbl",
|
toolTableWasmPath: "/work/browser-explicit-tool.tbl",
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
assertOpfsIniStaging(
|
||||||
|
"opfs_load_explicit_ini_staging",
|
||||||
|
loadedIniOverrideSession.ini,
|
||||||
|
"linuxcnc/machines/browser-ini-override-session/machine.ini",
|
||||||
|
"/work/browser-ini-override-session.ini",
|
||||||
|
);
|
||||||
assertOpfsToolTableStaging(
|
assertOpfsToolTableStaging(
|
||||||
"opfs_load_explicit_tool_table_staging",
|
"opfs_load_explicit_tool_table_staging",
|
||||||
loadedIniOverrideSession.toolTable,
|
loadedIniOverrideSession.toolTable,
|
||||||
|
|||||||
Reference in New Issue
Block a user