From b170ccd95ac40eb6bfa4813b6c4a785369aeaedc Mon Sep 17 00:00:00 2001 From: cnc Date: Fri, 5 Jun 2026 07:10:30 +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=A7tooldata?= =?UTF-8?q?=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-tooldata-source-map.sh | 12 +++++++++++- docs/linuxcnc-tooldata-source-map.md | 6 ++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/check-linuxcnc-tooldata-source-map.sh b/check-linuxcnc-tooldata-source-map.sh index 0e37fd8..899b883 100755 --- a/check-linuxcnc-tooldata-source-map.sh +++ b/check-linuxcnc-tooldata-source-map.sh @@ -6,7 +6,7 @@ cd "$(dirname "$0")" # LinuxCNC source basis: this guard ties LinuxCNC tooldata/Submakefile, # src/emc/tooldata sources, native/WASM manifests, and wasm-safe tooldata shims # to the tooldata source map. It validates source coverage only; it does not -# add CNC behavior or expand smoke parsing. +# add CNC behavior, expand smoke parsing, or interpret G-code. linuxcnc_root=${LINUXCNC_ROOT:-../linuxcnc} linuxcnc_root=$(cd "$linuxcnc_root" && pwd) @@ -179,7 +179,17 @@ for phrase in [ "WASM-safe tooldata shims must preserve the LinuxCNC export surface", "inactive-DB return values", "./check-linuxcnc-tooldata-source-map.sh", + "does not interpret G-code", ]: if phrase not in doc: raise SystemExit(f"docs/linuxcnc-tooldata-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-tooldata-source-map.sh" not in text: + raise SystemExit(f"{entry} must run ./check-linuxcnc-tooldata-source-map.sh") PY diff --git a/docs/linuxcnc-tooldata-source-map.md b/docs/linuxcnc-tooldata-source-map.md index 20f36d1..3e96c22 100644 --- a/docs/linuxcnc-tooldata-source-map.md +++ b/docs/linuxcnc-tooldata-source-map.md @@ -49,6 +49,11 @@ source-link/shim guard only; it must not add CNC behavior and must not expand th source directory tracked in the native RS274 manifest. - `build-wasm.sh` must run tooldata link and symbol probes before copying browser artifacts. +- `test-native.sh`, `test-linuxcnc-source-link.sh`, and `build-wasm.sh` must + run `./check-linuxcnc-tooldata-source-map.sh` before consuming tooldata-backed + native objects, source-linked LinuxCNC objects, or browser artifacts. +- The tooldata source-map guard validates LinuxCNC source/shim ownership and + manifest drift only; it does not interpret G-code. ## Checks @@ -58,6 +63,7 @@ Run: ./check-linuxcnc-tooldata-source-map.sh ./test-native.sh ./test-linuxcnc-source-link.sh +./build-wasm.sh ``` `check-linuxcnc-tooldata-source-map.sh` keeps this document, LinuxCNC tooldata