Guard browser OPFS custom session INI seed
This commit is contained in:
52
text8.txt
52
text8.txt
@@ -1218,3 +1218,55 @@ host_wasm_opfs_browser_smokes=ok
|
|||||||
还能用只读 helper 收敛,例如 MACHINE、PARAMETER_FILE、TOOL_TABLE 的 INI lines;
|
还能用只读 helper 收敛,例如 MACHINE、PARAMETER_FILE、TOOL_TABLE 的 INI lines;
|
||||||
只改测试胶水,保持精确文本校验,不改变 custom filename 输入、OPFS path、WASM path
|
只改测试胶水,保持精确文本校验,不改变 custom filename 输入、OPFS path、WASM path
|
||||||
字符串或保存/读取行为。
|
字符串或保存/读取行为。
|
||||||
|
|
||||||
|
二十七、2026-06-14 继续执行记录:browser OPFS custom session INI seed helper guard
|
||||||
|
|
||||||
|
本轮按上一条下一步建议继续收敛 custom session INI seed text,范围仍只触及
|
||||||
|
`wasm-port/tests/browser/interp_smoke.html` 的 browser/OPFS test glue。
|
||||||
|
|
||||||
|
完成内容:
|
||||||
|
|
||||||
|
- 新增 `opfsCustomSessionIniText(...)`,统一 custom session INI seed text 中
|
||||||
|
`[EMC]`、`MACHINE`、`[RS274NGC]`、`PARAMETER_FILE`、`[EMCIO]`、
|
||||||
|
`TOOL_TABLE` 的写入文本;
|
||||||
|
- INI-named session 的 custom INI seed 写入复用
|
||||||
|
`opfsCustomSessionIniText(...)`;
|
||||||
|
- explicit override session 的 ignored INI filename seed 写入复用
|
||||||
|
`opfsCustomSessionIniText(...)`;
|
||||||
|
- INI seed text 仍保留各 section 间空行和末尾空行,实际写入内容不变;
|
||||||
|
- 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 中
|
||||||
|
`loadMachineSessionFromOpfs(...)` options object 是否还能用 helper/locals 收敛;
|
||||||
|
只改测试胶水,不改变 custom filename 输入、OPFS path、WASM path 字符串或保存/读取行为。
|
||||||
|
|||||||
@@ -4600,6 +4600,20 @@
|
|||||||
return `T${toolNo} P${pocketNo} Z${zOffset} D${diameter} ${comment}\n`;
|
return `T${toolNo} P${pocketNo} Z${zOffset} D${diameter} ${comment}\n`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function opfsCustomSessionIniText(machineId, parameterFilename, toolTableFilename) {
|
||||||
|
return [
|
||||||
|
"[EMC]",
|
||||||
|
`MACHINE = ${machineId}`,
|
||||||
|
"",
|
||||||
|
"[RS274NGC]",
|
||||||
|
`PARAMETER_FILE = ${parameterFilename}`,
|
||||||
|
"",
|
||||||
|
"[EMCIO]",
|
||||||
|
`TOOL_TABLE = ${toolTableFilename}`,
|
||||||
|
"",
|
||||||
|
].join("\n");
|
||||||
|
}
|
||||||
|
|
||||||
async function verifyOpfsSavedText(label, loadActualText, expectedLines) {
|
async function verifyOpfsSavedText(label, loadActualText, expectedLines) {
|
||||||
verifyExpectedOutput(label, await loadActualText(), expectedLines.join("\n"));
|
verifyExpectedOutput(label, await loadActualText(), expectedLines.join("\n"));
|
||||||
}
|
}
|
||||||
@@ -9502,17 +9516,11 @@
|
|||||||
const iniFileParameterWasmPath = opfsCustomSessionWasmPath(iniFileParameterFilename);
|
const iniFileParameterWasmPath = opfsCustomSessionWasmPath(iniFileParameterFilename);
|
||||||
const iniFileToolTableWasmPath = opfsCustomSessionWasmPath(iniFileToolTableFilename);
|
const iniFileToolTableWasmPath = opfsCustomSessionWasmPath(iniFileToolTableFilename);
|
||||||
const browserIniFileTextPaths = await saveMachineTextFiles(iniFileMachineId, {
|
const browserIniFileTextPaths = await saveMachineTextFiles(iniFileMachineId, {
|
||||||
ini: [
|
ini: opfsCustomSessionIniText(
|
||||||
"[EMC]",
|
iniFileMachineId,
|
||||||
`MACHINE = ${iniFileMachineId}`,
|
iniFileParameterFilename,
|
||||||
"",
|
iniFileToolTableFilename,
|
||||||
"[RS274NGC]",
|
),
|
||||||
`PARAMETER_FILE = ${iniFileParameterFilename}`,
|
|
||||||
"",
|
|
||||||
"[EMCIO]",
|
|
||||||
`TOOL_TABLE = ${iniFileToolTableFilename}`,
|
|
||||||
"",
|
|
||||||
].join("\n"),
|
|
||||||
});
|
});
|
||||||
assertMachineTextStorePaths(
|
assertMachineTextStorePaths(
|
||||||
"opfs_save_ini_named_machine_text_files_staging",
|
"opfs_save_ini_named_machine_text_files_staging",
|
||||||
@@ -9636,17 +9644,11 @@
|
|||||||
const explicitParameterWasmPath = opfsCustomSessionWasmPath(explicitParameterFilename);
|
const explicitParameterWasmPath = opfsCustomSessionWasmPath(explicitParameterFilename);
|
||||||
const explicitToolTableWasmPath = opfsCustomSessionWasmPath(explicitToolTableFilename);
|
const explicitToolTableWasmPath = opfsCustomSessionWasmPath(explicitToolTableFilename);
|
||||||
const browserIniOverrideTextPaths = await saveMachineTextFiles(iniOverrideMachineId, {
|
const browserIniOverrideTextPaths = await saveMachineTextFiles(iniOverrideMachineId, {
|
||||||
ini: [
|
ini: opfsCustomSessionIniText(
|
||||||
"[EMC]",
|
iniOverrideMachineId,
|
||||||
`MACHINE = ${iniOverrideMachineId}`,
|
"browser-ignored.var",
|
||||||
"",
|
"browser-ignored-tool.tbl",
|
||||||
"[RS274NGC]",
|
),
|
||||||
"PARAMETER_FILE = browser-ignored.var",
|
|
||||||
"",
|
|
||||||
"[EMCIO]",
|
|
||||||
"TOOL_TABLE = browser-ignored-tool.tbl",
|
|
||||||
"",
|
|
||||||
].join("\n"),
|
|
||||||
});
|
});
|
||||||
assertMachineTextStorePaths(
|
assertMachineTextStorePaths(
|
||||||
"opfs_save_ini_override_machine_text_files_staging",
|
"opfs_save_ini_override_machine_text_files_staging",
|
||||||
|
|||||||
Reference in New Issue
Block a user