Guard browser invalid INI staging
This commit is contained in:
66
text7.txt
66
text7.txt
@@ -1359,3 +1359,69 @@ INI validation、path-model 或 session 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 invalid INI staging guard
|
||||||
|
|
||||||
|
1. 本批目标。
|
||||||
|
|
||||||
|
继续 staged path guard inventory 第十九轮,处理 browser OPFS/session invalid INI
|
||||||
|
negative cases 的 INI boundary path:
|
||||||
|
|
||||||
|
```text
|
||||||
|
/work/browser-invalid-param-file-session.ini
|
||||||
|
/work/browser-invalid-tool-file-session.ini
|
||||||
|
```
|
||||||
|
|
||||||
|
2. 已完成改动。
|
||||||
|
|
||||||
|
- invalid `PARAMETER_FILE = ../escape.var` negative case 改为先构造 options;
|
||||||
|
- invalid parameter-file negative case 复用 `assertOpfsIniStaging(...)` 检查 INI OPFS
|
||||||
|
path 与 WASM path;
|
||||||
|
- invalid `TOOL_TABLE = nested/tool.tbl` negative case 改为先构造 options;
|
||||||
|
- invalid tool-table negative case 复用 `assertOpfsIniStaging(...)` 检查 INI OPFS path
|
||||||
|
与 WASM path;
|
||||||
|
- `verifyRejects(...)` 的 expected error pattern 保持不变;
|
||||||
|
- 未修改 INI validation、path-model、invalid fixture 内容、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 invalid INI staging
|
||||||
|
```
|
||||||
|
|
||||||
|
5. 下一步工作建议。
|
||||||
|
|
||||||
|
继续 staged path guard inventory 第二十轮,优先扫描 browser OPFS/machine text store
|
||||||
|
边界,例如 `saveMachineTextFiles(...)` / `loadMachineTextFiles(...)` 中 machine 文件的
|
||||||
|
默认 OPFS path 对账;仍只加 filesystem/OPFS path guard,不改变 OPFS file-service、
|
||||||
|
machine-file-store 或 session runtime semantics。
|
||||||
|
|
||||||
|
下一轮第一条命令仍保持:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git status --short && git log -5 --oneline && tail -n 120 text7.txt && awk '/^[一二三四五六七八九十百]+、/ {print}' text7.txt | sort | uniq -d
|
||||||
|
```
|
||||||
|
|||||||
@@ -9589,15 +9589,25 @@
|
|||||||
"",
|
"",
|
||||||
].join("\n"),
|
].join("\n"),
|
||||||
});
|
});
|
||||||
|
const invalidParamFileSessionOptions = {
|
||||||
|
iniSdk: ini,
|
||||||
|
iniWasmPath: "/work/browser-invalid-param-file-session.ini",
|
||||||
|
};
|
||||||
|
assertOpfsIniStaging(
|
||||||
|
"opfs_reject_invalid_ini_parameter_file_staging",
|
||||||
|
{
|
||||||
|
opfsPath: "linuxcnc/machines/browser-invalid-param-file-session/machine.ini",
|
||||||
|
wasmPath: invalidParamFileSessionOptions.iniWasmPath,
|
||||||
|
},
|
||||||
|
"linuxcnc/machines/browser-invalid-param-file-session/machine.ini",
|
||||||
|
"/work/browser-invalid-param-file-session.ini",
|
||||||
|
);
|
||||||
await verifyRejects(
|
await verifyRejects(
|
||||||
"opfs_reject_invalid_ini_parameter_file",
|
"opfs_reject_invalid_ini_parameter_file",
|
||||||
() => loadMachineSessionFromOpfs(
|
() => loadMachineSessionFromOpfs(
|
||||||
interp,
|
interp,
|
||||||
"browser-invalid-param-file-session",
|
"browser-invalid-param-file-session",
|
||||||
{
|
invalidParamFileSessionOptions,
|
||||||
iniSdk: ini,
|
|
||||||
iniWasmPath: "/work/browser-invalid-param-file-session.ini",
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
/Invalid parameter filename/,
|
/Invalid parameter filename/,
|
||||||
);
|
);
|
||||||
@@ -9612,15 +9622,25 @@
|
|||||||
"",
|
"",
|
||||||
].join("\n"),
|
].join("\n"),
|
||||||
});
|
});
|
||||||
|
const invalidToolFileSessionOptions = {
|
||||||
|
iniSdk: ini,
|
||||||
|
iniWasmPath: "/work/browser-invalid-tool-file-session.ini",
|
||||||
|
};
|
||||||
|
assertOpfsIniStaging(
|
||||||
|
"opfs_reject_invalid_ini_tool_table_staging",
|
||||||
|
{
|
||||||
|
opfsPath: "linuxcnc/machines/browser-invalid-tool-file-session/machine.ini",
|
||||||
|
wasmPath: invalidToolFileSessionOptions.iniWasmPath,
|
||||||
|
},
|
||||||
|
"linuxcnc/machines/browser-invalid-tool-file-session/machine.ini",
|
||||||
|
"/work/browser-invalid-tool-file-session.ini",
|
||||||
|
);
|
||||||
await verifyRejects(
|
await verifyRejects(
|
||||||
"opfs_reject_invalid_ini_tool_table",
|
"opfs_reject_invalid_ini_tool_table",
|
||||||
() => loadMachineSessionFromOpfs(
|
() => loadMachineSessionFromOpfs(
|
||||||
interp,
|
interp,
|
||||||
"browser-invalid-tool-file-session",
|
"browser-invalid-tool-file-session",
|
||||||
{
|
invalidToolFileSessionOptions,
|
||||||
iniSdk: ini,
|
|
||||||
iniWasmPath: "/work/browser-invalid-tool-file-session.ini",
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
/Invalid tool table filename/,
|
/Invalid tool table filename/,
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user