Guard browser OPFS custom session load options
This commit is contained in:
50
text8.txt
50
text8.txt
@@ -1270,3 +1270,53 @@ host_wasm_opfs_browser_smokes=ok
|
||||
继续小批量 browser OPFS test glue guard。优先扫描 custom session 中
|
||||
`loadMachineSessionFromOpfs(...)` options object 是否还能用 helper/locals 收敛;
|
||||
只改测试胶水,不改变 custom filename 输入、OPFS path、WASM path 字符串或保存/读取行为。
|
||||
|
||||
二十八、2026-06-14 继续执行记录:browser OPFS custom session load options helper guard
|
||||
|
||||
本轮按上一条下一步建议继续收敛 custom session 的
|
||||
`loadMachineSessionFromOpfs(...)` options object,范围仍只触及
|
||||
`wasm-port/tests/browser/interp_smoke.html` 的 browser/OPFS test glue。
|
||||
|
||||
完成内容:
|
||||
|
||||
- 新增 `opfsCustomSessionLoadOptions(...)`,统一 custom session load options 中
|
||||
`iniSdk`、`iniWasmPath`、`parameterWasmPath`、`toolTableWasmPath` 的构造;
|
||||
- INI-named session 的 load options 复用 `opfsCustomSessionLoadOptions(...)`;
|
||||
- explicit override session 的 load options 复用 `opfsCustomSessionLoadOptions(...)`,
|
||||
并继续显式传入 `parameterFilename` 与 `toolTableFilename` overrides;
|
||||
- custom parameter/tool-table filename 输入、OPFS path、WASM path 字符串与
|
||||
save/read 行为均未改变;
|
||||
- 未改变 staging path 模型、OPFS bridge behavior、file-service、SDK planner、
|
||||
interpreter、INI、tool、parameter 或 LinuxCNC-owned runtime semantics。
|
||||
|
||||
验证已通过:
|
||||
|
||||
```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
|
||||
browser_interp_smoke=ok
|
||||
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
|
||||
host_wasm_opfs_browser_smokes=ok
|
||||
```
|
||||
|
||||
下一步建议:
|
||||
|
||||
继续小批量 browser OPFS test glue guard。优先扫描 custom session 的 save
|
||||
parameter/tool-table options object 是否还能用 locals/helper 收敛;只改测试胶水,
|
||||
不改变 custom filename 输入、OPFS path、WASM path 字符串或保存/读取行为。
|
||||
|
||||
@@ -4614,6 +4614,22 @@
|
||||
].join("\n");
|
||||
}
|
||||
|
||||
function opfsCustomSessionLoadOptions(
|
||||
iniSdk,
|
||||
iniWasmPath,
|
||||
parameterWasmPath,
|
||||
toolTableWasmPath,
|
||||
filenameOverrides = {},
|
||||
) {
|
||||
return {
|
||||
iniSdk,
|
||||
iniWasmPath,
|
||||
...filenameOverrides,
|
||||
parameterWasmPath,
|
||||
toolTableWasmPath,
|
||||
};
|
||||
}
|
||||
|
||||
async function verifyOpfsSavedText(label, loadActualText, expectedLines) {
|
||||
verifyExpectedOutput(label, await loadActualText(), expectedLines.join("\n"));
|
||||
}
|
||||
@@ -9540,12 +9556,12 @@
|
||||
const loadedIniFileSession = await loadMachineSessionFromOpfs(
|
||||
interp,
|
||||
iniFileMachineId,
|
||||
{
|
||||
iniSdk: ini,
|
||||
iniWasmPath: iniFileIniWasmPath,
|
||||
parameterWasmPath: iniFileParameterWasmPath,
|
||||
toolTableWasmPath: iniFileToolTableWasmPath,
|
||||
},
|
||||
opfsCustomSessionLoadOptions(
|
||||
ini,
|
||||
iniFileIniWasmPath,
|
||||
iniFileParameterWasmPath,
|
||||
iniFileToolTableWasmPath,
|
||||
),
|
||||
);
|
||||
assertOpfsSessionStaging(
|
||||
"opfs_load_ini_named_session_staging",
|
||||
@@ -9668,14 +9684,16 @@
|
||||
const loadedIniOverrideSession = await loadMachineSessionFromOpfs(
|
||||
interp,
|
||||
iniOverrideMachineId,
|
||||
opfsCustomSessionLoadOptions(
|
||||
ini,
|
||||
iniOverrideIniWasmPath,
|
||||
explicitParameterWasmPath,
|
||||
explicitToolTableWasmPath,
|
||||
{
|
||||
iniSdk: ini,
|
||||
iniWasmPath: iniOverrideIniWasmPath,
|
||||
parameterFilename: explicitParameterFilename,
|
||||
parameterWasmPath: explicitParameterWasmPath,
|
||||
toolTableFilename: explicitToolTableFilename,
|
||||
toolTableWasmPath: explicitToolTableWasmPath,
|
||||
},
|
||||
),
|
||||
);
|
||||
assertOpfsSessionStaging(
|
||||
"opfs_load_explicit_session_staging",
|
||||
|
||||
Reference in New Issue
Block a user