Guard browser OPFS custom session path helper
This commit is contained in:
59
text7.txt
59
text7.txt
@@ -2240,3 +2240,62 @@ Guard browser OPFS machine file write helper
|
|||||||
```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-13 继续执行记录:browser OPFS custom session path helper guard
|
||||||
|
|
||||||
|
1. 本批目标。
|
||||||
|
|
||||||
|
继续 staged path guard inventory 第三十三轮,收敛 browser OPFS smoke 中 custom
|
||||||
|
session 的 session path/backup path 组合重复:
|
||||||
|
|
||||||
|
```text
|
||||||
|
browser-ini-file-session
|
||||||
|
browser-ini-override-session
|
||||||
|
```
|
||||||
|
|
||||||
|
2. 已完成改动。
|
||||||
|
|
||||||
|
- browser smoke 新增 `opfsCustomSessionPaths(...)`;
|
||||||
|
- INI-derived custom session 和 explicit override session 的 session staging path
|
||||||
|
map 改为走 helper;
|
||||||
|
- helper 统一生成 custom parameter/tool-table OPFS path 与对应 WASM path map;
|
||||||
|
- 保留 `browser-custom.var` / `browser-explicit.var` 等文件名显式可见;
|
||||||
|
- 未修改 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 custom session path helper
|
||||||
|
```
|
||||||
|
|
||||||
|
4. 下一步工作建议。
|
||||||
|
|
||||||
|
继续 staged path guard inventory 第三十四轮,优先扫描 browser OPFS smoke 中
|
||||||
|
saved parameter/tool-table readback 的 backup path 命名、以及 custom session session-path
|
||||||
|
组合是否还能进一步分层为更小的 path helper;仍只加 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
|
||||||
|
```
|
||||||
|
|||||||
@@ -4545,6 +4545,16 @@
|
|||||||
return opfsPath;
|
return opfsPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function opfsCustomSessionPaths(machineId, parameterFilename, toolTableFilename, wasmPaths) {
|
||||||
|
return {
|
||||||
|
opfs: {
|
||||||
|
parameters: opfsMachineFilePath(machineId, parameterFilename),
|
||||||
|
toolTable: opfsMachineFilePath(machineId, toolTableFilename),
|
||||||
|
},
|
||||||
|
wasm: wasmPaths,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
function assertOpfsSessionStaging(label, session, machineId, expectedPaths) {
|
function assertOpfsSessionStaging(label, session, machineId, expectedPaths) {
|
||||||
if (session.machineId !== machineId) {
|
if (session.machineId !== machineId) {
|
||||||
throw new Error(`${label}: unexpected machine id ${session.machineId}`);
|
throw new Error(`${label}: unexpected machine id ${session.machineId}`);
|
||||||
@@ -9426,17 +9436,16 @@
|
|||||||
"opfs_load_ini_named_session_staging",
|
"opfs_load_ini_named_session_staging",
|
||||||
loadedIniFileSession,
|
loadedIniFileSession,
|
||||||
"browser-ini-file-session",
|
"browser-ini-file-session",
|
||||||
|
opfsCustomSessionPaths(
|
||||||
|
"browser-ini-file-session",
|
||||||
|
"browser-custom.var",
|
||||||
|
"browser-custom-tool.tbl",
|
||||||
{
|
{
|
||||||
opfs: {
|
|
||||||
parameters: "linuxcnc/machines/browser-ini-file-session/browser-custom.var",
|
|
||||||
toolTable: "linuxcnc/machines/browser-ini-file-session/browser-custom-tool.tbl",
|
|
||||||
},
|
|
||||||
wasm: {
|
|
||||||
ini: "/work/browser-ini-file-session.ini",
|
ini: "/work/browser-ini-file-session.ini",
|
||||||
parameters: "/work/browser-custom.var",
|
parameters: "/work/browser-custom.var",
|
||||||
toolTable: "/work/browser-custom-tool.tbl",
|
toolTable: "/work/browser-custom-tool.tbl",
|
||||||
},
|
},
|
||||||
},
|
),
|
||||||
);
|
);
|
||||||
verifyExpectedOutput(
|
verifyExpectedOutput(
|
||||||
"opfs_load_ini_named_parameter_file",
|
"opfs_load_ini_named_parameter_file",
|
||||||
@@ -9601,17 +9610,16 @@
|
|||||||
"opfs_load_explicit_session_staging",
|
"opfs_load_explicit_session_staging",
|
||||||
loadedIniOverrideSession,
|
loadedIniOverrideSession,
|
||||||
"browser-ini-override-session",
|
"browser-ini-override-session",
|
||||||
|
opfsCustomSessionPaths(
|
||||||
|
"browser-ini-override-session",
|
||||||
|
"browser-explicit.var",
|
||||||
|
"browser-explicit-tool.tbl",
|
||||||
{
|
{
|
||||||
opfs: {
|
|
||||||
parameters: "linuxcnc/machines/browser-ini-override-session/browser-explicit.var",
|
|
||||||
toolTable: "linuxcnc/machines/browser-ini-override-session/browser-explicit-tool.tbl",
|
|
||||||
},
|
|
||||||
wasm: {
|
|
||||||
ini: "/work/browser-ini-override-session.ini",
|
ini: "/work/browser-ini-override-session.ini",
|
||||||
parameters: "/work/browser-explicit.var",
|
parameters: "/work/browser-explicit.var",
|
||||||
toolTable: "/work/browser-explicit-tool.tbl",
|
toolTable: "/work/browser-explicit-tool.tbl",
|
||||||
},
|
},
|
||||||
},
|
),
|
||||||
);
|
);
|
||||||
verifyExpectedOutput(
|
verifyExpectedOutput(
|
||||||
"opfs_load_explicit_parameter_file",
|
"opfs_load_explicit_parameter_file",
|
||||||
|
|||||||
Reference in New Issue
Block a user