继续推进浏览器 direct fixture 路径 guard

This commit is contained in:
2026-06-14 08:41:30 +08:00
parent 68afff0806
commit 62620ffc76
2 changed files with 61 additions and 3 deletions

View File

@@ -1475,3 +1475,55 @@ host_wasm_opfs_browser_smokes=ok
WASM path 字符串是否能抽为局部 constants 并继续经
`writeGeneratedParameterFixture(...)` / `writeGeneratedToolTableFixture(...)` 的 path guard
校验只改测试胶水不改变输入、OPFS path、WASM path 字符串或保存/读取行为。
二十九、2026-06-14 继续执行记录browser direct fixture WASM path local guard
本轮按上一条下一步建议继续收敛 direct browser fixture WASM path 字符串,范围仍只触及
`wasm-port/tests/browser/interp_smoke.html` 的 browser test glue。
完成内容:
- 新增 `browserDirectParameterWasmPath`,承载 direct parameter fixture 的
`/work/browser-direct.var` WASM path
- 新增 `browserDirectToolTableWasmPath`,承载 direct ordinary tool-table fixture 的
`/work/browser-direct-tool.tbl` WASM path
- 新增 `browserDirectRandomToolTableWasmPath`,承载 direct random tool-table fixture 的
`/work/browser-direct-random-tool.tbl` WASM path
- `writeGeneratedParameterFixture(...)` 与 `writeGeneratedToolTableFixture(...)` 调用继续传入
显式 expected path保留现有 path drift guard
- 未改变任何 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
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
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_interp_browser.sh
wasm-port/tests/host/verify_host_smokes.sh
```
关键输出:
```text
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
browser_interp_smoke=ok
host_wasm_opfs_browser_smokes=ok
```
下一步建议:
继续小批量 browser test glue guard。优先扫描 direct generated/random tool-table input
lines 是否还能统一为 text 常量并继续由 existing tool objects 校验读回;只改测试胶水,
不改变输入、OPFS path、WASM path 字符串或保存/读取行为。

View File

@@ -9302,11 +9302,13 @@
].join("\n"),
);
const browserDirectParameterWasmPath = "/work/browser-direct.var";
const browserDirectParameterInputText = browserDirectParameterSeedLines(true).join("\n");
const browserParameterFilePath = writeGeneratedParameterFixture(
interp,
"/work/browser-direct.var",
browserDirectParameterWasmPath,
browserDirectParameterInputText,
"/work/browser-direct.var",
);
const browserDirectInitialParameterValues = opfsParameterValueSet("10.5", "20.25", "2.25", "44");
verifyExpectedOutput(
@@ -9352,10 +9354,12 @@
"T5 P9 X1 Y2 Z3 ;browser direct rough tool",
"",
];
const browserDirectToolTableWasmPath = "/work/browser-direct-tool.tbl";
const browserToolTablePath = writeGeneratedToolTableFixture(
interp,
"/work/browser-direct-tool.tbl",
browserDirectToolTableWasmPath,
browserDirectToolTableInputLines.join("\n"),
"/work/browser-direct-tool.tbl",
);
const browserDirectFinishTool = {
toolNo: "2",
@@ -9417,10 +9421,12 @@
"T5 P9 X1 Y2 Z3 ;browser direct random rough tool",
"",
];
const browserDirectRandomToolTableWasmPath = "/work/browser-direct-random-tool.tbl";
const browserRandomToolTablePath = writeGeneratedToolTableFixture(
interp,
"/work/browser-direct-random-tool.tbl",
browserDirectRandomToolTableWasmPath,
browserDirectRandomToolTableInputLines.join("\n"),
"/work/browser-direct-random-tool.tbl",
);
const browserDirectRandomFinishTool = {
toolNo: "2",