补充 OPFS 会话默认路径覆盖
结论:Node OPFS smoke 现在验证 INI 缺失参数文件和刀具表文件名时,会话桥接回落到 host path model 默认路径,保持文件边界策略不进入 CNC 语义。
This commit is contained in:
@@ -110,6 +110,7 @@ parameter semantics, and that INI-derived machine file names are still
|
|||||||
rejected by the OPFS path model when they contain traversal or nested path
|
rejected by the OPFS path model when they contain traversal or nested path
|
||||||
segments. The same Node smoke also validates that explicit session file-name
|
segments. The same Node smoke also validates that explicit session file-name
|
||||||
options take precedence over INI-derived parameter and tool-table file names,
|
options take precedence over INI-derived parameter and tool-table file names,
|
||||||
|
and that missing INI file-name values fall back to the host path model defaults,
|
||||||
keeping host override policy outside CNC semantics.
|
keeping host override policy outside CNC semantics.
|
||||||
|
|
||||||
The browser INI/OPFS smoke script serves `wasm-port/` over localhost and runs
|
The browser INI/OPFS smoke script serves `wasm-port/` over localhost and runs
|
||||||
@@ -273,7 +274,8 @@ derived from vendored LinuxCNC INI boolean parsing, INI-derived
|
|||||||
`[RS274NGC]PARAMETER_FILE` and `[EMCIO]TOOL_TABLE` file names mapped to OPFS
|
`[RS274NGC]PARAMETER_FILE` and `[EMCIO]TOOL_TABLE` file names mapped to OPFS
|
||||||
machine files, OPFS path-model rejection of invalid INI-derived file names,
|
machine files, OPFS path-model rejection of invalid INI-derived file names,
|
||||||
explicit host session file-name overrides taking precedence over INI-derived
|
explicit host session file-name overrides taking precedence over INI-derived
|
||||||
names, session snapshot custom filename handling plus envelope/path rejection
|
names, default host path fallback when INI file-name values are absent,
|
||||||
|
session snapshot custom filename handling plus envelope/path rejection
|
||||||
for unsupported format/version, wrong session id, and invalid snapshot
|
for unsupported format/version, wrong session id, and invalid snapshot
|
||||||
filenames, and a browser interpreter smoke that uses the same session bridge
|
filenames, and a browser interpreter smoke that uses the same session bridge
|
||||||
with real LinuxCNC INI WASM parsing before saving OPFS-backed parameter and
|
with real LinuxCNC INI WASM parsing before saving OPFS-backed parameter and
|
||||||
|
|||||||
@@ -441,6 +441,14 @@ assert.equal(
|
|||||||
loadedIniDerivedRandomSession.toolTable.result,
|
loadedIniDerivedRandomSession.toolTable.result,
|
||||||
"tooldata_load=0\nload_tool_path=/work/ini-derived-session-tool.tbl\nrandom_toolchanger=1\n",
|
"tooldata_load=0\nload_tool_path=/work/ini-derived-session-tool.tbl\nrandom_toolchanger=1\n",
|
||||||
);
|
);
|
||||||
|
assert.equal(
|
||||||
|
loadedIniDerivedRandomSession.parameters.opfsPath,
|
||||||
|
"linuxcnc/machines/xyzab-tdr/linuxcnc.var",
|
||||||
|
);
|
||||||
|
assert.equal(
|
||||||
|
loadedIniDerivedRandomSession.toolTable.opfsPath,
|
||||||
|
"linuxcnc/machines/xyzab-tdr/tool.tbl",
|
||||||
|
);
|
||||||
|
|
||||||
await saveMachineTextFiles("ini-file-session", {
|
await saveMachineTextFiles("ini-file-session", {
|
||||||
ini: [
|
ini: [
|
||||||
|
|||||||
Reference in New Issue
Block a user