继续完成 web-rtcp-5axis-sim-plan

结论:完成 LinuxCNC kinematics WASM ABI 覆盖,并将 web-rtcp-5axis-sim-plan 的 RTCP frame/boundary adapter 接到 xyzac-trt kinematics SDK;Node、build、browser smoke 验证通过。
This commit is contained in:
2026-06-21 16:44:29 +08:00
parent a6eda3fbff
commit 626bcfe8e3
101 changed files with 101586 additions and 770 deletions

View File

@@ -210,6 +210,7 @@ wasm-port/build/wasm/sim-configs-inventory/runtime-boundary-native-alignment-sum
wasm-port/build/wasm/sim-configs-inventory/native-runtime-probe-execution-plan.tsv
wasm-port/build/wasm/sim-configs-inventory/promotion-candidates.tsv
wasm-port/build/wasm/sim-configs-inventory/remaining-skip-main-program-promotion-audit.tsv
wasm-port/build/wasm/sim-configs-inventory/remaining-skip-simulation-implementation-coverage.tsv
wasm-port/build/wasm/sim-configs-inventory/blocked-runtime-promotion-lock.tsv
wasm-port/build/wasm/sim-configs-inventory/next-boundary-worklist.tsv
wasm-port/build/wasm/sim-configs-inventory/next-boundary-recommendations.tsv
@@ -250,6 +251,12 @@ virtual HAL state-transition proof for `M429 -> M129` and `M428 -> M128`, but
still lacks the LinuxCNC-owned native runtime pass and promotion-gate proof
required to leave `L4-USER-M-PROCESS`. The upstream demo row remains
non-promotable upstream demo evidence.
`remaining-skip-simulation-implementation-coverage.tsv` is the full 77-row
source-derived implementation ledger for the skipped set. It records each
skipped row's LinuxCNC source path, implementation mode, implementation
status, main-program eligibility, and remaining promotion block so the entire
skip set is treated as implemented simulation coverage without falsely
claiming standalone main-program PASS coverage.
The project release readiness artifact and URL workflow publish the same
candidate artifact summary for callers: `evidence-ready=8`,
`inventory-ready=2`, total candidates `10`, and `promotion_allowed=0`.
@@ -414,10 +421,10 @@ coverage: every TSV emitted under
`full-process-boundary-design.md`. New gate artifacts must therefore be
documented before the inventory can pass.
The Node coverage gate also requires the generated WASM inventory artifact list
to remain the exact duplicate-free 60-entry baseline and the native generated
to remain the exact duplicate-free 61-entry baseline and the native generated
TSV token list to remain the exact duplicate-free 8-token baseline. It also
requires the corresponding `boundary-phase-completion-summary.tsv`
documentation-coverage counts to remain `60` and `8`, respectively. It also
documentation-coverage counts to remain `61` and `8`, respectively. It also
checks that the browser smoke source lists the same generated WASM and native
artifact tokens and preserves the same fixed-count, duplicate-free,
fetchability/header, documentation-missing, and completion count-parity guards
@@ -1051,6 +1058,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 through the JS SDK in Node, and queried through the exported C ABI, including LinuxCNC-backed boolean conversion and machine-session file-name string lookup. |
| `tests/wasm/node/verify_kinematics_wasm.sh` | Validates standalone kinematics WASM modules built from vendored LinuxCNC `src/emc/kinematics` plus required posemath/gomath sources for `trivkins`, `5axiskins`, `xyzac-trt`, `xyzbc-trt`, `corexy`, `rotate`, `rose`, `max`, `lineardelta`, `rotarydelta`, `scorbot`, `tripod`, `scara`, `puma`, `genser`, `genhex`, and `pentakins`. It loads each module through `createLinuxCncKinematicsSdk()`, checks the exported `lckins_*` ABI, validates forward/inverse or inverse/forward round trips using each module's LinuxCNC-native probe pattern, covers switchkins identity/alternate paths where valid, and verifies seed joint/pose buffer handling for iterative kinematics without adding JavaScript-owned kinematics math. |
| `tests/wasm/node/verify_interp_wasm.sh` | Validates the interpreter-core WASM module can be built from vendored LinuxCNC interpreter/remap source, loaded through the interpreter JS SDK, run the first fixture group through `Interp::execute()` and selected file fixtures plus vendored upstream `tests/interp` regression files through `Interp::open()`/`read()`/`execute()`, match the native canonical event plus required state readback fixtures, emit `run_step` execution-status records with LinuxCNC line number, encoded source statement, return code, and interpreter axis positions for file execution, cover vendored `tests/interp/flowsnake` recursive O-word file execution, `tests/interp/g6164` path-control and naive-cam tolerance execution, `tests/interp/oword-unwind` continue-on-error stack unwind behavior through planner-staged INI context, selected `tests/interp/bad` file-error paths, and `tests/interp/g33.1` rigid-tap file execution, run vendored `xyzac-trt`/`xyzbc-trt` table-rotary-tilting and `xyzab-tdr` table-dual-rotary switchkins remap demo files through the WASM C ABI/SDK path, and run parameter-file restore/save through vendored LinuxCNC `Interp::restore_parameters()` and `Interp::save_parameters()`. |
| `tests/wasm/node/verify_sim_configs_wasm.sh` | Validates representative vendored LinuxCNC `configs/sim` programs in Node WASM through `planSimConfigStaging()` plus `runSimConfigProgram()`. The generic `planIniFileContextStaging()` planner and its sim-config wrapper use INI text and `tools/source-manifest.txt` to collect the program, INI, tool table, parameter file when vendored, `SUBROUTINE_PATH` files, `USER_M_PATH` files, and remap-NGC files before forwarding to `runFileWithIni()` or `runFiveAxisRemapFile()`. This covers INI-driven `U/V/W` axis mask handling, real `USER_M_PATH` registration for executable `M110`/`M111`, all four current external-offset M111 expected-failure programs, deterministic `woodpecker/on_abort.ngc` file execution, plain INI/tool-table execution through `axis/gladevcp/probe.ngc`, `SUBROUTINE_PATH` staging for `opa_demo.ngc -> circles.ngc`, bridge-mill remap-subroutine staging, vendored LinuxCNC bridge-mill and `melfa-sim` NGC remap execution, and PUMA machine-context execution without spawning host processes. The same smoke includes synthetic staging-plan assertions for generic `TOOL_TABLE`, `PARAMETER_FILE`, multi-directory `SUBROUTINE_PATH`, `USER_M_PATH`, and `REMAP ... ngc=...` file collection. |
| `tests/wasm/node/verify_sim_configs_inventory_wasm.sh` | Validates the first machine-readable Node inventory layer for `configs/sim`. It ensures native `build/native/sim-configs/summary.tsv`, generated `class-summary.tsv`, and generated `path-matrix.tsv` exist; verifies that generated `path-matrix.tsv` and tracked `docs/sim-configs-coverage-matrix.md` contain the same 159 paths as native `summary.tsv`; checks tracked matrix fields for class, native status, expected-failure reason, and blocked kind drift against generated `path-matrix.tsv`; and checks that generated `class-summary.tsv` matches class/status/expected-failure counts derived from `summary.tsv`. It then executes only entries that are currently vendored and have a defined standalone/WASM runtime path, and writes the sim-config inventory TSV artifacts. The boundary summary records one row per native inventory path with the matrix block, SDK classifier recommendation, declared HAL/UI/HALUI/Python process dependencies, `[EMCIO]DB_PROGRAM`, and execution-chain user-M codes; vendored INI rows must have an available classifier report, vendored hard blocks fail on classifier/matrix drift, safe process-declaring representatives must remain Node/browser `REP` rows with the expected process flag combinations rather than full-process promotions, and the designed full-process blocked rows must remain non-`REP` until their proof criteria are met. The generated inventory summary also requires all hard-blocked rows to remain `SKIP` with matching reasons, and `skip-summary.tsv` must match the matrix-derived skip counts. The blocked-dependency and boundary summaries record hard blocked Python-remap, tool-database, and external user-M rows from source `linuxcnc/configs/sim` INI files for dependency accounting only, including LinuxCNC source/config ownership fields, user-M script side effects, tool DB protocol evidence, Python runtime owner evidence, and completion criteria that all remain non-executing. Current gate: `executed=82`, `passed=82`, `skipped=77`, `unexpected_fail=0`; current skip/block counts are `ASSET_ONLY=65`, `L4_USER_M_PROCESS=1`, `NON_MAIN_CLASS=10`, and `UPSTREAM_DEMO=1`. The executed set now includes the deterministic `woodpecker` plus `qtdragon` / `qtdragon_hd` / `qtvcp_screens` `on_abort.ngc` family, `axis/gladevcp/probe.ngc`, `axis/rose_engine/rcone_demo.ngc`, `axis/vismach/melfa-sim/example.ngc`, and the `axis/vismach/puma` sample programs after vendoring the required machine INI, tool-table, and remap-subroutine inputs. When an upstream INI declares a missing local tool table but the native harness resolved a valid fallback table, the Node inventory stages that native-selected table at the INI-declared path so WASM execution uses the same machine context. The skip reasons are explicit: `NON_MAIN_CLASS`, `L4-TOOL-DB`, `L4-USER-M-PROCESS`, `L4-PYTHON-REMAP`, and `UPSTREAM-DEMO`; an eligible row that lacks vendored machine context is reported as an inventory failure. This runner is an inventory source-of-truth for Node WASM and is intentionally narrower than a browser full inventory. |

View File

@@ -830,6 +830,18 @@ Current five-axis switchkins status:
subroutines, then call vendored `Interp::parse_remap()`, `open()`,
`read()`, and `execute()`; standalone code only supplies the INI/file path
boundary.
10. Independent kinematics WASM modules now cover the vendored LinuxCNC
kinematics set: `trivkins`, `5axiskins`, `xyzac-trt`, `xyzbc-trt`,
`corexy`, `rotate`, `rose`, `max`, `lineardelta`, `rotarydelta`,
`scorbot`, `tripod`, `scara`, `puma`, `genser`, `genhex`, and
`pentakins`. The modules compile vendored LinuxCNC
`src/emc/kinematics` sources plus required vendored posemath/gomath
sources, expose a small `lckins_*` C ABI for `type`, `switchable`,
`switch`, `forward`, `inverse`, and `run_probe`, and are wrapped by
`createLinuxCncKinematicsSdk()`. The ABI preserves LinuxCNC's in/out
buffer behavior for iterative algorithms: callers may seed inverse joint
buffers and forward pose buffers, while all kinematics math remains in
vendored LinuxCNC source.
Next work:

View File

@@ -44,6 +44,7 @@ The generated artifact baseline is:
- `build/wasm/sim-configs-inventory/python-remap-boundary-summary.tsv`
- `build/wasm/sim-configs-inventory/promotion-candidates.tsv`
- `build/wasm/sim-configs-inventory/remaining-skip-main-program-promotion-audit.tsv`
- `build/wasm/sim-configs-inventory/remaining-skip-simulation-implementation-coverage.tsv`
- `build/wasm/sim-configs-inventory/evidence-expansion-candidates.tsv`
- `build/wasm/sim-configs-inventory/runtime-boundary-promotion-blockers.tsv`
- `build/wasm/sim-configs-inventory/runtime-boundary-host-readiness-rollup.tsv`
@@ -63,6 +64,14 @@ incomplete user-M process native/inventory promotion proof, even though the
browser simulation state now includes a source-derived virtual HAL proof for
the `M429 -> M129` turn and `M428 -> M128` mill state transitions. The TWP
`incremental_repetition_g533.ngc` row remains preserved upstream demo evidence.
`remaining-skip-simulation-implementation-coverage.tsv` is the companion
77-row source-derived implementation ledger for the entire skipped set. It does
not change baseline status; instead it records how each skipped row is already
covered in the CNC simulation system: 65 rows are LinuxCNC source assets used
as remap/subroutine dependencies, 10 rows are non-main macro/load class
coverage, 1 row is the designed-but-blocked LinuxCNC-owned user-M runtime
boundary with virtual HAL state proof, and 1 row is a preserved upstream demo
edge with invalid motion source.
The 2026-06-20 re-audit confirmed that there are no directly promotable
remaining skipped main-program rows:

View File

@@ -74,6 +74,8 @@ Current baseline:
`wasm-port/build/wasm/sim-configs-inventory/promotion-candidates.tsv`
- Node remaining skipped main-program promotion audit artifact:
`wasm-port/build/wasm/sim-configs-inventory/remaining-skip-main-program-promotion-audit.tsv`
- Node remaining skip simulation implementation coverage artifact:
`wasm-port/build/wasm/sim-configs-inventory/remaining-skip-simulation-implementation-coverage.tsv`
- Node native evidence acceptance gate artifact:
`wasm-port/build/wasm/sim-configs-inventory/runtime-boundary-native-evidence-acceptance-gate.tsv`
- Node promotion blocker summary artifact:
@@ -384,7 +386,7 @@ Legend:
`build/wasm/sim-configs-inventory/` must be referenced by the current
compatibility, matrix, or full-process boundary docs, so generated gate
artifacts cannot silently appear without review text. The generated WASM
inventory artifact list must remain the exact duplicate-free 60-entry
inventory artifact list must remain the exact duplicate-free 61-entry
baseline, and every token plus the fixed-count, duplicate-free, and
fetchability guards must also be listed by browser smoke.
- The same inventory check covers native generated TSV artifacts under
@@ -397,7 +399,7 @@ Legend:
compatibility, matrix, and full-process boundary docs and checking the
generated WASM inventory artifact names plus native TSV tokens against the
same completion-summary counts. The Node coverage gate also locks the two
documentation-coverage completion counts to the current `60` WASM inventory
documentation-coverage completion counts to the current `61` WASM inventory
artifacts and `8` native TSV artifacts. It verifies that browser smoke
executes the artifact documentation coverage helper, calls the completion
count-parity helper with the generated completion rows, fetches and joins the