按建议,继续完成后续工作
结论:已将 INI 面板的 OPFS 文本文件读写抽为 host-side file-service,并新增 Node mock 验证,确认 OPFS 边界不进入 WASM core 且可覆盖保存、读取、缺失路径和非法路径行为。
This commit is contained in:
@@ -18,6 +18,12 @@ The current WASM smoke validation command is:
|
||||
wasm-port/tests/wasm/node/verify_ini_wasm.sh
|
||||
```
|
||||
|
||||
The current OPFS host-boundary validation command is:
|
||||
|
||||
```bash
|
||||
wasm-port/tests/opfs/node/verify_file_service.sh
|
||||
```
|
||||
|
||||
## Validation Chain
|
||||
|
||||
The native validation script runs these checks in order:
|
||||
@@ -46,6 +52,11 @@ The WASM INI smoke script builds `runtime/ui/ini-panel/linuxcnc_ini.js` and
|
||||
module in Node and verifies `lcini_get_string()` against an in-memory INI file
|
||||
written to the Emscripten filesystem.
|
||||
|
||||
The OPFS host-boundary script validates the JavaScript file-service adapter
|
||||
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.
|
||||
|
||||
## Source Coverage
|
||||
|
||||
Every `.c` and `.cc` entry in `tools/source-manifest.txt` must have a
|
||||
@@ -93,6 +104,7 @@ The validation fails if:
|
||||
| Harness | Purpose |
|
||||
| --- | --- |
|
||||
| `tests/wasm/node/verify_ini_wasm.sh` | Validates the browser-facing INI WASM module can be built from vendored LinuxCNC `inifile.cc`, loaded 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. |
|
||||
|
||||
## Fixture Coverage
|
||||
|
||||
@@ -136,8 +148,9 @@ Negative fixtures currently cover:
|
||||
## Validation Boundaries
|
||||
|
||||
Current full-core validation is native-only. WASM validation is limited to the
|
||||
INI parser smoke harness. Browser, SDK, OPFS, and full machine-session
|
||||
validation remain future work.
|
||||
INI parser smoke harness. OPFS validation is limited to the JavaScript
|
||||
host-boundary adapter. Browser, SDK, 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
|
||||
|
||||
Reference in New Issue
Block a user