按建议,继续完成后续工作

结论:已新增 Chromium headless 浏览器 smoke,验证 INI WASM SDK 可在真实浏览器运行并完成 OPFS 文本文件往返,继续保持 OPFS 在 host-side、LinuxCNC INI 解析来自 vendored inifile.cc。
This commit is contained in:
2026-06-08 03:19:44 +08:00
parent 0d78849d80
commit cb1901d4c4
5 changed files with 158 additions and 9 deletions

View File

@@ -24,6 +24,12 @@ The current OPFS host-boundary validation command is:
wasm-port/tests/opfs/node/verify_file_service.sh
```
The current browser smoke validation command is:
```bash
wasm-port/tests/browser/verify_ini_panel_browser.sh
```
## Validation Chain
The native validation script runs these checks in order:
@@ -57,6 +63,11 @@ with a Node mock of the browser File System Access handles. It covers nested
directory creation, text save/load, missing file behavior, invalid relative
paths, and unavailable OPFS storage.
The browser smoke script serves `wasm-port/` over localhost and runs Chromium
headless against a test page that imports the JS SDK, loads the INI WASM
module, queries vendored LinuxCNC INI parsing through the SDK, and performs an
OPFS text-file round trip.
## Source Coverage
Every `.c` and `.cc` entry in `tools/source-manifest.txt` must have a
@@ -105,6 +116,7 @@ The validation fails if:
| --- | --- |
| `tests/wasm/node/verify_ini_wasm.sh` | Validates the browser-facing INI WASM module can be built from vendored LinuxCNC `inifile.cc`, loaded through the JS SDK in Node, and queried through the exported C ABI. |
| `tests/opfs/node/verify_file_service.sh` | Validates the host-owned OPFS text-file adapter used by the browser INI panel without moving file persistence into the WASM core. |
| `tests/browser/verify_ini_panel_browser.sh` | Validates the INI SDK, WASM module loading, and OPFS text-file round trip in a real browser runtime. |
## Fixture Coverage
@@ -149,8 +161,9 @@ Negative fixtures currently cover:
Current full-core validation is native-only. WASM/SDK validation is limited to
the INI parser smoke harness. OPFS validation is limited to the JavaScript
host-boundary adapter. Browser-level validation, full SDK coverage, and full
machine-session validation remain future work.
host-boundary adapter plus the INI browser smoke harness. Full browser
coverage, full SDK coverage, and full machine-session validation remain future
work.
The current fixture expectations validate standalone behavior against both the
vendored LinuxCNC source path and an upstream `rs274` side-by-side baseline for