From 71676ac1be620fdd71812d579673b9e6edcece97 Mon Sep 17 00:00:00 2001 From: cnc Date: Fri, 5 Jun 2026 07:24:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E8=80=83=E6=89=80=E6=9C=89=E5=88=86?= =?UTF-8?q?=E7=BB=84=EF=BC=8C=E5=AE=8C=E6=88=90=E5=B0=BD=E9=87=8F=E5=A4=9A?= =?UTF-8?q?=E7=9A=84=E5=86=85=E5=AE=B9=EF=BC=9A=E6=94=B6=E7=B4=A7WASM=20sm?= =?UTF-8?q?oke=20source-map=E8=BE=B9=E7=95=8C=E5=AE=88=E5=8D=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- check-linuxcnc-wasm-smoke-source-map.sh | 12 +++++++++++- docs/linuxcnc-wasm-smoke-source-map.md | 6 ++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/check-linuxcnc-wasm-smoke-source-map.sh b/check-linuxcnc-wasm-smoke-source-map.sh index 49ab87f..b04ca7d 100755 --- a/check-linuxcnc-wasm-smoke-source-map.sh +++ b/check-linuxcnc-wasm-smoke-source-map.sh @@ -7,7 +7,7 @@ cd "$(dirname "$0")" # LinuxCNC RS274 parameter/INI handling, M-code canon side effects, generated # switchkins/remap config cases, kinematics sources, and OPFS-only browser # persistence. It validates smoke-test source coverage only; it does not add -# CNC behavior or expand smoke parsing. +# CNC behavior, expand smoke parsing, or interpret G-code. linuxcnc_root=${LINUXCNC_ROOT:-../linuxcnc} linuxcnc_root=$(cd "$linuxcnc_root" && pwd) @@ -179,8 +179,18 @@ required_phrases = [ "OPFS workspace/policy/directory handling", 'unlinking `filename + ".bak"`', "./check-linuxcnc-wasm-smoke-source-map.sh", + "does not interpret G-code", ] for phrase in required_phrases: if phrase not in source_map: raise SystemExit(f"docs/linuxcnc-wasm-smoke-source-map.md missing boundary phrase: {phrase}") + +for entry in [ + "test-native.sh", + "test-linuxcnc-source-link.sh", + "build-wasm.sh", +]: + text = Path(entry).read_text(encoding="utf-8") + if "./check-linuxcnc-wasm-smoke-source-map.sh" not in text: + raise SystemExit(f"{entry} must run ./check-linuxcnc-wasm-smoke-source-map.sh") PY diff --git a/docs/linuxcnc-wasm-smoke-source-map.md b/docs/linuxcnc-wasm-smoke-source-map.md index 65a9d8d..573c66c 100644 --- a/docs/linuxcnc-wasm-smoke-source-map.md +++ b/docs/linuxcnc-wasm-smoke-source-map.md @@ -55,6 +55,11 @@ OPFS-only is the required boundary. restore/save failure handling, and browser app OPFS reload coverage. - Smoke wrappers must keep positive minimum coverage thresholds so accidental section loss is visible. +- `test-native.sh`, `test-linuxcnc-source-link.sh`, and `build-wasm.sh` must + run `./check-linuxcnc-wasm-smoke-source-map.sh` before consuming Node/browser + WASM smoke coverage or browser artifacts. +- The WASM smoke source-map guard validates LinuxCNC source-backed smoke + coverage only; it does not interpret G-code. ## Checks @@ -64,6 +69,7 @@ Run: ./check-linuxcnc-wasm-smoke-source-map.sh ./test-native.sh ./test-linuxcnc-source-link.sh +./build-wasm.sh ``` `check-linuxcnc-wasm-smoke-source-map.sh` keeps this document, LinuxCNC source