Guard browser OPFS machine INI wasm path helper
This commit is contained in:
46
text8.txt
46
text8.txt
@@ -611,3 +611,49 @@ host_wasm_opfs_browser_smokes=ok
|
|||||||
转向其它 browser staging path literal guard。优先扫描 `interp_smoke.html` 中
|
转向其它 browser staging path literal guard。优先扫描 `interp_smoke.html` 中
|
||||||
`/work/browser-*` WASM path 常量是否还有成组重复可收敛;只做测试胶水 helper 或
|
`/work/browser-*` WASM path 常量是否还有成组重复可收敛;只做测试胶水 helper 或
|
||||||
常量,不改变 staging path 模型、OPFS bridge 或 LinuxCNC 语义。
|
常量,不改变 staging path 模型、OPFS bridge 或 LinuxCNC 语义。
|
||||||
|
|
||||||
|
十五、2026-06-14 继续执行记录:browser OPFS machine INI wasm path helper guard
|
||||||
|
|
||||||
|
本轮按上一条下一步建议扫描 browser WASM staging path literal,优先选择最小且明确的
|
||||||
|
重复形态:invalid INI rejection helper 内部的 `/work/${machineId}.ini`。
|
||||||
|
|
||||||
|
完成内容:
|
||||||
|
|
||||||
|
- 新增 `opfsMachineIniWasmPath(machineId)`,统一 machine-id derived INI WASM path;
|
||||||
|
- 将 `verifyOpfsInvalidIniSessionRejects(...)` 内的 session option 与 staging guard
|
||||||
|
expected path 改为复用该 helper;
|
||||||
|
- 未改变 `/work/...` staging path 内容、reject label、expected regex 或 invalid INI fixture;
|
||||||
|
- 未改变 staging path 模型、OPFS bridge behavior、file-service、SDK planner、
|
||||||
|
interpreter、INI、tool、parameter 或 LinuxCNC-owned runtime semantics。
|
||||||
|
|
||||||
|
验证已通过:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git diff --check
|
||||||
|
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
|
||||||
|
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_interp_browser.sh
|
||||||
|
wasm-port/tests/host/verify_host_smokes.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
关键输出:
|
||||||
|
|
||||||
|
```text
|
||||||
|
vendor sync up to date
|
||||||
|
standalone CNC semantics guard complete
|
||||||
|
interp_wasm_node_smoke=ok
|
||||||
|
sim_configs_wasm_node_inventory_executed=28
|
||||||
|
sim_configs_wasm_node_inventory_passed=28
|
||||||
|
sim_configs_wasm_node_inventory_skipped=131
|
||||||
|
sim_configs_wasm_node_inventory_unexpected_fail=0
|
||||||
|
browser_interp_smoke=ok
|
||||||
|
host_wasm_opfs_browser_smokes=ok
|
||||||
|
```
|
||||||
|
|
||||||
|
下一步建议:
|
||||||
|
|
||||||
|
继续扫描 `/work/browser-*` staging literal。优先看 direct parameter/tool-table fixture
|
||||||
|
的 `writeGenerated*Fixture(..., wasmPath, expectedWasmPath, ...)` 双参数重复是否还能
|
||||||
|
用小 helper 或局部常量收敛;只改 browser test glue,不改变 generated file path。
|
||||||
|
|||||||
@@ -4572,6 +4572,10 @@
|
|||||||
return `/work/${filename}`;
|
return `/work/${filename}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function opfsMachineIniWasmPath(machineId) {
|
||||||
|
return `/work/${machineId}.ini`;
|
||||||
|
}
|
||||||
|
|
||||||
function opfsSessionWasmPaths(ini, parameters, toolTable) {
|
function opfsSessionWasmPaths(ini, parameters, toolTable) {
|
||||||
return { ini, parameters, toolTable };
|
return { ini, parameters, toolTable };
|
||||||
}
|
}
|
||||||
@@ -4628,7 +4632,7 @@
|
|||||||
|
|
||||||
const sessionOptions = {
|
const sessionOptions = {
|
||||||
iniSdk,
|
iniSdk,
|
||||||
iniWasmPath: `/work/${machineId}.ini`,
|
iniWasmPath: opfsMachineIniWasmPath(machineId),
|
||||||
};
|
};
|
||||||
const expectedIniOpfsPath = opfsMachineFilePath(machineId, OPFS_DEFAULT_INI_FILENAME);
|
const expectedIniOpfsPath = opfsMachineFilePath(machineId, OPFS_DEFAULT_INI_FILENAME);
|
||||||
assertOpfsIniStaging(
|
assertOpfsIniStaging(
|
||||||
@@ -4638,7 +4642,7 @@
|
|||||||
wasmPath: sessionOptions.iniWasmPath,
|
wasmPath: sessionOptions.iniWasmPath,
|
||||||
},
|
},
|
||||||
expectedIniOpfsPath,
|
expectedIniOpfsPath,
|
||||||
`/work/${machineId}.ini`,
|
opfsMachineIniWasmPath(machineId),
|
||||||
);
|
);
|
||||||
await verifyRejects(
|
await verifyRejects(
|
||||||
label,
|
label,
|
||||||
|
|||||||
Reference in New Issue
Block a user