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