Guard browser explicit parameter object adapters
This commit is contained in:
61
text9.txt
61
text9.txt
@@ -964,3 +964,64 @@ host_wasm_opfs_browser_smokes=ok
|
||||
value groups,把 `explicit*Parameter*` 数组也收敛到
|
||||
`opfsParameterValueSet(...)` object adapter;只改测试胶水,不改变输入、OPFS path、
|
||||
WASM path 字符串或保存/读取行为。
|
||||
|
||||
二十、2026-06-14 继续执行记录:browser explicit parameter object adapter guard
|
||||
|
||||
本轮按上一条下一步建议继续收敛 explicit custom session parameter result/text helper
|
||||
调用点的参数展开,范围仍只触及
|
||||
`wasm-port/tests/browser/interp_smoke.html` 的 browser/OPFS test glue。
|
||||
|
||||
完成内容:
|
||||
|
||||
- `explicitInitialParameterValues` 改为 `opfsParameterValueSet(...)`;
|
||||
- `explicitParameterValues`、`explicitParameterExpectedValues` 与
|
||||
`explicitParameterReadbackValues` 改为 `opfsParameterValueSet(...)`;
|
||||
- explicit custom session parameter restore/save/readback/backup 调用点改为复用
|
||||
`opfsParameterResultLinesForValues(...)`、
|
||||
`opfsParameterTextLinesForValues(...)` 与
|
||||
`opfsParameterValuesForValueSet(...)`;
|
||||
- seed file 写入仍显式展开 `parameter5161/5162/5221/5399` 字段,不推导
|
||||
LinuxCNC-owned parameter 文件格式;
|
||||
- 未改变任何 expected 字符串、输入、OPFS path、WASM path 字符串或 save/read/load
|
||||
行为;
|
||||
- 未改变 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
|
||||
```
|
||||
|
||||
备注:
|
||||
|
||||
- 当前 sandbox 会拦截本地 HTTP server socket bind;browser smoke 与
|
||||
`verify_host_smokes.sh` 的 browser 阶段需授权运行;
|
||||
- 本轮 browser smoke 与 host smoke 均已授权运行并通过。
|
||||
|
||||
下一步建议:
|
||||
|
||||
继续小批量 browser test glue guard。优先扫描是否值得新增
|
||||
`opfsParameterSeedTextForValues(...)` object adapter,收敛 direct、INI-named 与
|
||||
explicit parameter seed file 写入的字段展开;只改测试胶水,不改变输入、OPFS path、
|
||||
WASM path 字符串或保存/读取行为。
|
||||
|
||||
@@ -9834,11 +9834,16 @@
|
||||
browserIniOverrideTextPaths,
|
||||
iniOverrideMachineId,
|
||||
);
|
||||
const explicitInitialParameterValues = ["41.25", "82.5", "6.5", "101"];
|
||||
const explicitInitialParameterValues = opfsParameterValueSet("41.25", "82.5", "6.5", "101");
|
||||
await writeOpfsMachineFile(
|
||||
iniOverrideMachineId,
|
||||
explicitParameterFilename,
|
||||
opfsParameterSeedText(...explicitInitialParameterValues),
|
||||
opfsParameterSeedText(
|
||||
explicitInitialParameterValues.parameter5161,
|
||||
explicitInitialParameterValues.parameter5162,
|
||||
explicitInitialParameterValues.parameter5221,
|
||||
explicitInitialParameterValues.parameter5399,
|
||||
),
|
||||
);
|
||||
const explicitToolTable = opfsToolTableToolValues(
|
||||
"9",
|
||||
@@ -9885,7 +9890,7 @@
|
||||
verifyOpfsLoadResult(
|
||||
"opfs_load_explicit_parameter_file",
|
||||
loadedIniOverrideSession.parameters,
|
||||
opfsParameterResultLines("restore", ...explicitInitialParameterValues),
|
||||
opfsParameterResultLinesForValues("restore", explicitInitialParameterValues),
|
||||
);
|
||||
verifyOpfsLoadResult(
|
||||
"opfs_load_explicit_tool_table",
|
||||
@@ -9896,13 +9901,18 @@
|
||||
`tool_1.comment=${explicitToolTable.loadComment}`,
|
||||
]),
|
||||
);
|
||||
const explicitParameterValues = [51.25, 102.5, 7.5, 202];
|
||||
const explicitParameterExpectedValues = ["51.25", "102.5", "7.5", "202"];
|
||||
const explicitParameterReadbackValues = ["51.250000", "102.500000", "7.500000", "202.000000"];
|
||||
const explicitParameterValues = opfsParameterValueSet(51.25, 102.5, 7.5, 202);
|
||||
const explicitParameterExpectedValues = opfsParameterValueSet("51.25", "102.5", "7.5", "202");
|
||||
const explicitParameterReadbackValues = opfsParameterValueSet(
|
||||
"51.250000",
|
||||
"102.500000",
|
||||
"7.500000",
|
||||
"202.000000",
|
||||
);
|
||||
const savedExplicitParameters = await saveMachineParametersToOpfs(
|
||||
interp,
|
||||
iniOverrideMachineId,
|
||||
opfsParameterValues(...explicitParameterValues),
|
||||
opfsParameterValuesForValueSet(explicitParameterValues),
|
||||
opfsLoadedFileSaveOptions(loadedIniOverrideSession.parameters),
|
||||
);
|
||||
assertOpfsSavedParameterStaging(
|
||||
@@ -9915,17 +9925,17 @@
|
||||
verifyOpfsSaveResult(
|
||||
"opfs_save_explicit_parameter_file",
|
||||
savedExplicitParameters,
|
||||
opfsParameterResultLines("save", ...explicitParameterExpectedValues),
|
||||
opfsParameterResultLinesForValues("save", explicitParameterExpectedValues),
|
||||
);
|
||||
await verifyOpfsReadback(
|
||||
"opfs_saved_explicit_parameter_text",
|
||||
loadedIniOverrideSession.parameters.opfsPath,
|
||||
opfsParameterTextLines("\t", ...explicitParameterReadbackValues),
|
||||
opfsParameterTextLinesForValues("\t", explicitParameterReadbackValues),
|
||||
);
|
||||
await verifyOpfsReadback(
|
||||
"opfs_saved_explicit_parameter_backup_text",
|
||||
savedExplicitParameters.backupOpfsPath,
|
||||
opfsParameterTextLines(" ", ...explicitInitialParameterValues),
|
||||
opfsParameterTextLinesForValues(" ", explicitInitialParameterValues),
|
||||
);
|
||||
const savedExplicitToolTable = await saveMachineToolTableToOpfs(
|
||||
interp,
|
||||
|
||||
Reference in New Issue
Block a user