Guard browser shared tool-table result helper
This commit is contained in:
51
text9.txt
51
text9.txt
@@ -573,3 +573,54 @@ host_wasm_opfs_browser_smokes=ok
|
|||||||
不改变输出的 shared `tool.resultLines` flatten helper,或者转向 custom session
|
不改变输出的 shared `tool.resultLines` flatten helper,或者转向 custom session
|
||||||
tool-table load value groups 的局部常量收敛;只改测试胶水,不改变输入、OPFS path、
|
tool-table load value groups 的局部常量收敛;只改测试胶水,不改变输入、OPFS path、
|
||||||
WASM path 字符串或保存/读取行为。
|
WASM path 字符串或保存/读取行为。
|
||||||
|
|
||||||
|
十三、2026-06-14 继续执行记录:browser shared tool-table result helper guard
|
||||||
|
|
||||||
|
本轮按上一条下一步建议继续收敛 tool-table result helper 的重复
|
||||||
|
`tool.resultLines` flatten 逻辑,范围仍只触及
|
||||||
|
`wasm-port/tests/browser/interp_smoke.html` 的 browser test glue。
|
||||||
|
|
||||||
|
完成内容:
|
||||||
|
|
||||||
|
- 新增 `toolTableResultLines(...)`,统一 tool object 到 load/save result expected
|
||||||
|
lines 的 flatten 逻辑;
|
||||||
|
- `directToolTableResultLines(...)` 改为复用 `toolTableResultLines(...)`;
|
||||||
|
- `opfsRandomToolTableResultLines(...)` 改为复用 `toolTableResultLines(...)`;
|
||||||
|
- 保留 direct 与 random wrapper 的输出前缀、extra lines 顺序和调用点不变;
|
||||||
|
- 未改变任何 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
|
||||||
|
```
|
||||||
|
|
||||||
|
下一步建议:
|
||||||
|
|
||||||
|
继续小批量 browser test glue guard。优先扫描 custom session tool-table load/save
|
||||||
|
value groups,看是否能像 direct session 一样用 tool object locals 表达 load、
|
||||||
|
save、readback 三组 expected lines;只改测试胶水,不改变输入、OPFS path、WASM path
|
||||||
|
字符串或保存/读取行为。
|
||||||
|
|||||||
@@ -4619,11 +4619,15 @@
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toolTableResultLines(tools) {
|
||||||
|
return tools.flatMap((tool) => tool.resultLines);
|
||||||
|
}
|
||||||
|
|
||||||
function directToolTableResultLines(operation, tools, extraLines = []) {
|
function directToolTableResultLines(operation, tools, extraLines = []) {
|
||||||
return [
|
return [
|
||||||
`tooldata_${operation}=0`,
|
`tooldata_${operation}=0`,
|
||||||
...extraLines,
|
...extraLines,
|
||||||
...tools.flatMap((tool) => tool.resultLines),
|
...toolTableResultLines(tools),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4644,7 +4648,7 @@
|
|||||||
return [
|
return [
|
||||||
...(operation === "load" ? ["tooldata_random_toolchanger=1"] : []),
|
...(operation === "load" ? ["tooldata_random_toolchanger=1"] : []),
|
||||||
`tooldata_${operation}=0`,
|
`tooldata_${operation}=0`,
|
||||||
...tools.flatMap((tool) => tool.resultLines),
|
...toolTableResultLines(tools),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user