Guard browser OPFS random session path constants
This commit is contained in:
55
text7.txt
55
text7.txt
@@ -2575,3 +2575,58 @@ browser/OPFS boundary guard,不改变 LinuxCNC-owned interpreter、INI、tool
|
|||||||
```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 random session path constants guard
|
||||||
|
|
||||||
|
1. 本批目标。
|
||||||
|
|
||||||
|
继续 staged path guard inventory 第三十九轮,收敛 OPFS random toolchanger session
|
||||||
|
的 machine id 与 WASM path 重复 literal。
|
||||||
|
|
||||||
|
2. 已完成改动。
|
||||||
|
|
||||||
|
- random OPFS session block 新增 `browserRandomMachineId`;
|
||||||
|
- 新增 `browserRandomIniWasmPath`、`browserRandomParameterWasmPath`、
|
||||||
|
`browserRandomToolTableWasmPath`;
|
||||||
|
- machine text save、session load、session staging、save tool-table、readback 均改为
|
||||||
|
复用对应局部 constants;
|
||||||
|
- ordinary/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 random session path constants
|
||||||
|
```
|
||||||
|
|
||||||
|
4. 下一步工作建议。
|
||||||
|
|
||||||
|
继续 staged path guard inventory 第四十轮,优先扫描 ordinary/random OPFS session
|
||||||
|
是否还能共用一个 session path map helper,或转向 OPFS saved machine-file readback 的
|
||||||
|
重复 text verification;仍只加 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
|
||||||
|
```
|
||||||
|
|||||||
@@ -9293,10 +9293,14 @@
|
|||||||
].join("\n"),
|
].join("\n"),
|
||||||
);
|
);
|
||||||
|
|
||||||
const browserRandomTextPaths = await saveMachineTextFiles("browser-random-toolchanger", {
|
const browserRandomMachineId = "browser-random-toolchanger";
|
||||||
|
const browserRandomIniWasmPath = "/work/browser-random-machine.ini";
|
||||||
|
const browserRandomParameterWasmPath = "/work/browser-random-linuxcnc.var";
|
||||||
|
const browserRandomToolTableWasmPath = "/work/browser-random-tool.tbl";
|
||||||
|
const browserRandomTextPaths = await saveMachineTextFiles(browserRandomMachineId, {
|
||||||
ini: [
|
ini: [
|
||||||
"[EMC]",
|
"[EMC]",
|
||||||
"MACHINE = browser-random-toolchanger",
|
`MACHINE = ${browserRandomMachineId}`,
|
||||||
"",
|
"",
|
||||||
"[EMCIO]",
|
"[EMCIO]",
|
||||||
"RANDOM_TOOLCHANGER = yes",
|
"RANDOM_TOOLCHANGER = yes",
|
||||||
@@ -9319,27 +9323,27 @@
|
|||||||
assertMachineTextStorePaths(
|
assertMachineTextStorePaths(
|
||||||
"opfs_save_random_machine_text_files_staging",
|
"opfs_save_random_machine_text_files_staging",
|
||||||
browserRandomTextPaths,
|
browserRandomTextPaths,
|
||||||
"browser-random-toolchanger",
|
browserRandomMachineId,
|
||||||
);
|
);
|
||||||
const loadedRandomSession = await loadMachineSessionFromOpfs(
|
const loadedRandomSession = await loadMachineSessionFromOpfs(
|
||||||
interp,
|
interp,
|
||||||
"browser-random-toolchanger",
|
browserRandomMachineId,
|
||||||
{
|
{
|
||||||
iniSdk: ini,
|
iniSdk: ini,
|
||||||
iniWasmPath: "/work/browser-random-machine.ini",
|
iniWasmPath: browserRandomIniWasmPath,
|
||||||
parameterWasmPath: "/work/browser-random-linuxcnc.var",
|
parameterWasmPath: browserRandomParameterWasmPath,
|
||||||
toolTableWasmPath: "/work/browser-random-tool.tbl",
|
toolTableWasmPath: browserRandomToolTableWasmPath,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
assertOpfsSessionStaging(
|
assertOpfsSessionStaging(
|
||||||
"opfs_load_random_session_staging",
|
"opfs_load_random_session_staging",
|
||||||
loadedRandomSession,
|
loadedRandomSession,
|
||||||
"browser-random-toolchanger",
|
browserRandomMachineId,
|
||||||
{
|
{
|
||||||
wasm: {
|
wasm: {
|
||||||
ini: "/work/browser-random-machine.ini",
|
ini: browserRandomIniWasmPath,
|
||||||
parameters: "/work/browser-random-linuxcnc.var",
|
parameters: browserRandomParameterWasmPath,
|
||||||
toolTable: "/work/browser-random-tool.tbl",
|
toolTable: browserRandomToolTableWasmPath,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@@ -9364,15 +9368,15 @@
|
|||||||
);
|
);
|
||||||
const savedRandomToolTable = await saveMachineToolTableToOpfs(
|
const savedRandomToolTable = await saveMachineToolTableToOpfs(
|
||||||
interp,
|
interp,
|
||||||
"browser-random-toolchanger",
|
browserRandomMachineId,
|
||||||
{ wasmPath: "/work/browser-random-tool.tbl" },
|
{ wasmPath: browserRandomToolTableWasmPath },
|
||||||
);
|
);
|
||||||
assertOpfsSavedToolTableStaging(
|
assertOpfsSavedToolTableStaging(
|
||||||
"opfs_save_random_tool_table_staging",
|
"opfs_save_random_tool_table_staging",
|
||||||
savedRandomToolTable,
|
savedRandomToolTable,
|
||||||
"browser-random-toolchanger",
|
browserRandomMachineId,
|
||||||
"tool.tbl",
|
"tool.tbl",
|
||||||
"/work/browser-random-tool.tbl",
|
browserRandomToolTableWasmPath,
|
||||||
);
|
);
|
||||||
verifyExpectedOutput(
|
verifyExpectedOutput(
|
||||||
"opfs_save_random_tool_table",
|
"opfs_save_random_tool_table",
|
||||||
@@ -9384,7 +9388,7 @@
|
|||||||
].join("\n"),
|
].join("\n"),
|
||||||
);
|
);
|
||||||
const savedRandomMachineFiles = await loadMachineTextFiles(
|
const savedRandomMachineFiles = await loadMachineTextFiles(
|
||||||
"browser-random-toolchanger",
|
browserRandomMachineId,
|
||||||
);
|
);
|
||||||
verifyExpectedOutput(
|
verifyExpectedOutput(
|
||||||
"opfs_saved_random_tool_table_text",
|
"opfs_saved_random_tool_table_text",
|
||||||
|
|||||||
Reference in New Issue
Block a user