Guard browser OPFS ordinary session path constants
This commit is contained in:
55
text7.txt
55
text7.txt
@@ -2520,3 +2520,58 @@ parameter 或 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-14 继续执行记录:browser OPFS ordinary session path constants guard
|
||||||
|
|
||||||
|
1. 本批目标。
|
||||||
|
|
||||||
|
继续 staged path guard inventory 第三十八轮,转向 ordinary OPFS session,收敛
|
||||||
|
`browser-interp` 的 machine id 与 WASM path 重复 literal。
|
||||||
|
|
||||||
|
2. 已完成改动。
|
||||||
|
|
||||||
|
- ordinary OPFS session block 新增 `browserInterpMachineId`;
|
||||||
|
- 新增 `browserInterpIniWasmPath`、`browserInterpParameterWasmPath`、
|
||||||
|
`browserInterpToolTableWasmPath`;
|
||||||
|
- machine text save、session load、session staging、save parameter/tool-table、readback
|
||||||
|
均改为复用对应局部 constants;
|
||||||
|
- custom session block 未改动;
|
||||||
|
- 未修改 OPFS bridge behavior、file-service、path-model、SDK planner、interpreter 或
|
||||||
|
LinuxCNC-owned 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
|
||||||
|
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 ordinary session path constants
|
||||||
|
```
|
||||||
|
|
||||||
|
4. 下一步工作建议。
|
||||||
|
|
||||||
|
继续 staged path guard inventory 第三十九轮,优先扫描 OPFS random toolchanger session
|
||||||
|
的 machine id、INI/parameter/tool-table WASM path 是否同样局部常量化;仍只加
|
||||||
|
browser/OPFS boundary guard,不改变 LinuxCNC-owned interpreter、INI、tool、parameter
|
||||||
|
或 runtime semantics。
|
||||||
|
|
||||||
|
下一轮第一条命令仍保持:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git status --short && git log -5 --oneline && tail -n 120 text7.txt && awk '/^[一二三四五六七八九十百]+、/ {print}' text7.txt | sort | uniq -d
|
||||||
|
```
|
||||||
|
|||||||
@@ -9133,8 +9133,12 @@
|
|||||||
].join("\n"),
|
].join("\n"),
|
||||||
);
|
);
|
||||||
|
|
||||||
const browserInterpTextPaths = await saveMachineTextFiles("browser-interp", {
|
const browserInterpMachineId = "browser-interp";
|
||||||
ini: "[EMC]\nMACHINE = browser-interp\n",
|
const browserInterpIniWasmPath = "/work/browser-machine.ini";
|
||||||
|
const browserInterpParameterWasmPath = "/work/browser-linuxcnc.var";
|
||||||
|
const browserInterpToolTableWasmPath = "/work/browser-tool.tbl";
|
||||||
|
const browserInterpTextPaths = await saveMachineTextFiles(browserInterpMachineId, {
|
||||||
|
ini: `[EMC]\nMACHINE = ${browserInterpMachineId}\n`,
|
||||||
toolTable: "T2 P7 Z3.125 D1.5 I12 J34 Q4 ;browser finish tool\n",
|
toolTable: "T2 P7 Z3.125 D1.5 I12 J34 Q4 ;browser finish tool\n",
|
||||||
parameters: [
|
parameters: [
|
||||||
"5161 10.5",
|
"5161 10.5",
|
||||||
@@ -9149,26 +9153,26 @@
|
|||||||
assertMachineTextStorePaths(
|
assertMachineTextStorePaths(
|
||||||
"opfs_save_machine_text_files_staging",
|
"opfs_save_machine_text_files_staging",
|
||||||
browserInterpTextPaths,
|
browserInterpTextPaths,
|
||||||
"browser-interp",
|
browserInterpMachineId,
|
||||||
);
|
);
|
||||||
const loadedSession = await loadMachineSessionFromOpfs(
|
const loadedSession = await loadMachineSessionFromOpfs(
|
||||||
interp,
|
interp,
|
||||||
"browser-interp",
|
browserInterpMachineId,
|
||||||
{
|
{
|
||||||
iniWasmPath: "/work/browser-machine.ini",
|
iniWasmPath: browserInterpIniWasmPath,
|
||||||
parameterWasmPath: "/work/browser-linuxcnc.var",
|
parameterWasmPath: browserInterpParameterWasmPath,
|
||||||
toolTableWasmPath: "/work/browser-tool.tbl",
|
toolTableWasmPath: browserInterpToolTableWasmPath,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
assertOpfsSessionStaging(
|
assertOpfsSessionStaging(
|
||||||
"opfs_load_session_staging",
|
"opfs_load_session_staging",
|
||||||
loadedSession,
|
loadedSession,
|
||||||
"browser-interp",
|
browserInterpMachineId,
|
||||||
{
|
{
|
||||||
wasm: {
|
wasm: {
|
||||||
ini: "/work/browser-machine.ini",
|
ini: browserInterpIniWasmPath,
|
||||||
parameters: "/work/browser-linuxcnc.var",
|
parameters: browserInterpParameterWasmPath,
|
||||||
toolTable: "/work/browser-tool.tbl",
|
toolTable: browserInterpToolTableWasmPath,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@@ -9201,7 +9205,7 @@
|
|||||||
);
|
);
|
||||||
const savedParameters = await saveMachineParametersToOpfs(
|
const savedParameters = await saveMachineParametersToOpfs(
|
||||||
interp,
|
interp,
|
||||||
"browser-interp",
|
browserInterpMachineId,
|
||||||
{
|
{
|
||||||
5161: 12.34,
|
5161: 12.34,
|
||||||
5162: 56.78,
|
5162: 56.78,
|
||||||
@@ -9209,14 +9213,14 @@
|
|||||||
5221: 9.87,
|
5221: 9.87,
|
||||||
5399: 66.6,
|
5399: 66.6,
|
||||||
},
|
},
|
||||||
{ wasmPath: "/work/browser-linuxcnc.var" },
|
{ wasmPath: browserInterpParameterWasmPath },
|
||||||
);
|
);
|
||||||
assertOpfsSavedParameterStaging(
|
assertOpfsSavedParameterStaging(
|
||||||
"opfs_save_parameters_staging",
|
"opfs_save_parameters_staging",
|
||||||
savedParameters,
|
savedParameters,
|
||||||
"browser-interp",
|
browserInterpMachineId,
|
||||||
"linuxcnc.var",
|
"linuxcnc.var",
|
||||||
"/work/browser-linuxcnc.var",
|
browserInterpParameterWasmPath,
|
||||||
);
|
);
|
||||||
verifyExpectedOutput(
|
verifyExpectedOutput(
|
||||||
"opfs_save_parameters",
|
"opfs_save_parameters",
|
||||||
@@ -9229,7 +9233,7 @@
|
|||||||
"parameter_5399=66.6",
|
"parameter_5399=66.6",
|
||||||
].join("\n"),
|
].join("\n"),
|
||||||
);
|
);
|
||||||
const machineFiles = await loadMachineTextFiles("browser-interp");
|
const machineFiles = await loadMachineTextFiles(browserInterpMachineId);
|
||||||
verifyExpectedOutput(
|
verifyExpectedOutput(
|
||||||
"opfs_saved_parameter_text",
|
"opfs_saved_parameter_text",
|
||||||
machineFiles.parameters,
|
machineFiles.parameters,
|
||||||
@@ -9254,15 +9258,15 @@
|
|||||||
);
|
);
|
||||||
const savedToolTable = await saveMachineToolTableToOpfs(
|
const savedToolTable = await saveMachineToolTableToOpfs(
|
||||||
interp,
|
interp,
|
||||||
"browser-interp",
|
browserInterpMachineId,
|
||||||
{ wasmPath: "/work/browser-tool.tbl" },
|
{ wasmPath: browserInterpToolTableWasmPath },
|
||||||
);
|
);
|
||||||
assertOpfsSavedToolTableStaging(
|
assertOpfsSavedToolTableStaging(
|
||||||
"opfs_save_tool_table_staging",
|
"opfs_save_tool_table_staging",
|
||||||
savedToolTable,
|
savedToolTable,
|
||||||
"browser-interp",
|
browserInterpMachineId,
|
||||||
"tool.tbl",
|
"tool.tbl",
|
||||||
"/work/browser-tool.tbl",
|
browserInterpToolTableWasmPath,
|
||||||
);
|
);
|
||||||
verifyExpectedOutput(
|
verifyExpectedOutput(
|
||||||
"opfs_save_tool_table",
|
"opfs_save_tool_table",
|
||||||
@@ -9273,7 +9277,7 @@
|
|||||||
"tool_1.pocketno=7",
|
"tool_1.pocketno=7",
|
||||||
].join("\n"),
|
].join("\n"),
|
||||||
);
|
);
|
||||||
const savedMachineFiles = await loadMachineTextFiles("browser-interp");
|
const savedMachineFiles = await loadMachineTextFiles(browserInterpMachineId);
|
||||||
verifyExpectedOutput(
|
verifyExpectedOutput(
|
||||||
"opfs_saved_tool_table_text",
|
"opfs_saved_tool_table_text",
|
||||||
savedMachineFiles.toolTable,
|
savedMachineFiles.toolTable,
|
||||||
|
|||||||
Reference in New Issue
Block a user