按建议,继续完成后续工作
结论:已新增 Chromium headless 浏览器 smoke,验证 INI WASM SDK 可在真实浏览器运行并完成 OPFS 文本文件往返,继续保持 OPFS 在 host-side、LinuxCNC INI 解析来自 vendored inifile.cc。
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -56,12 +56,12 @@ semantic rewrites:
|
||||
|
||||
## Known Gaps
|
||||
|
||||
- No browser/full-core WASM parity tests yet. The INI parser now has a Node
|
||||
WASM smoke harness against vendored LinuxCNC `inifile.cc`.
|
||||
- No browser/full-core WASM parity tests yet. The INI parser now has Node and
|
||||
Chromium smoke harnesses against vendored LinuxCNC `inifile.cc`.
|
||||
- JS SDK validation is currently limited to the INI WASM wrapper around
|
||||
vendored LinuxCNC `inifile.cc`.
|
||||
- OPFS validation is currently limited to a Node mock of the browser
|
||||
file-service adapter; browser-level OPFS validation is not yet established.
|
||||
- OPFS validation covers a Node mock of the file-service adapter and a
|
||||
Chromium localhost round trip for INI text-file persistence.
|
||||
- Identity/trivial, `5axiskins`, TRT `xyzac`/`xyzbc`, delta, SCARA, PUMA,
|
||||
serial, hexapod, pentapod, and related kinematics sources now have native
|
||||
source-probe coverage.
|
||||
|
||||
@@ -31,7 +31,7 @@ Current validation is intentionally mechanical:
|
||||
|
||||
| Capability | LinuxCNC source files | Port classification | Standalone boundary | Current validation |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| INI parsing | `src/emc/ini/inifile.cc`, `inifile.h`, `inifile.hh` | Copy unchanged | Native file IO remains LinuxCNC-style in the vendored parser; browser OPFS integration remains outside this layer; `runtime/sdk/src/linuxcnc-ini.js` only wraps the exported WASM C ABI | Vendor byte sync, `linuxcnc_ini_probe`, `linuxcnc_inifile_source_probe`, `tests/wasm/node/verify_ini_wasm.sh` |
|
||||
| INI parsing | `src/emc/ini/inifile.cc`, `inifile.h`, `inifile.hh` | Copy unchanged | Native file IO remains LinuxCNC-style in the vendored parser; browser OPFS integration remains outside this layer; `runtime/sdk/src/linuxcnc-ini.js` only wraps the exported WASM C ABI | Vendor byte sync, `linuxcnc_ini_probe`, `linuxcnc_inifile_source_probe`, `tests/wasm/node/verify_ini_wasm.sh`, `tests/browser/verify_ini_panel_browser.sh` |
|
||||
| RTAPI compatibility headers | `src/rtapi/rtapi_*.h` in the manifest | Copy unchanged plus standalone shim include path | `runtime/core/shims/rtapi.h` supplies the minimal standalone RTAPI surface needed by vendored code | Vendor byte sync, compile coverage through dependent source probes |
|
||||
| Canon/NML-facing interpreter types | `src/emc/nml_intf/canon*.hh`, `emctool.h`, `interp_return.hh`, `motion_types.h`, `emcpose.*`, `emcpos.h`, `debugflags.h`, `src/emc/linuxcnc.h` | Copy unchanged plus narrow standalone status shim | NML transport is not ported; `runtime/core/shims/nml_intf/emc.hh` exposes only the `emcStatus` machine-units status edge currently needed by vendored interpreter conversion and initialization code | Vendor byte sync, dependent source probes, `linuxcnc_emc_status_probe`, `linuxcnc_tp_api_probe`, interpreter harnesses |
|
||||
| Motion state headers | `src/emc/motion/state_tag.h`, `emcmotcfg.h`, `simple_tp.h`, `motion.h`, `mot_priv.h`, `axis.h` | Copy unchanged | Realtime motion process is not ported; standalone probes seed the small motion status/config state required by TP calls | Vendor byte sync, `linuxcnc_tp_api_probe` |
|
||||
@@ -70,8 +70,9 @@ Current validation is intentionally mechanical:
|
||||
fixture-covered through vendored `interp_convert.cc` and `interp_queue.cc`.
|
||||
- Browser/WASM C ABI and JS SDK layers are not yet built for the full
|
||||
interpreter/planner core. The INI parser has a minimal JS SDK wrapper and
|
||||
Node WASM smoke harness.
|
||||
Node/browser WASM smoke harnesses.
|
||||
- OPFS persistence is connected to the INI panel through the host-side
|
||||
`runtime/opfs/file-service.js` adapter; tool table, parameter file, G-code
|
||||
program loading, and browser-level OPFS validation remain future work.
|
||||
program loading, and broader browser-level OPFS validation remain future
|
||||
work.
|
||||
- Native LinuxCNC GUI code remains out of scope for implementation.
|
||||
|
||||
Reference in New Issue
Block a user