From 3079656cfb146dec33c2834995fc9ff57b574fb3 Mon Sep 17 00:00:00 2001 From: cnc Date: Thu, 4 Jun 2026 18:39:06 +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=E3=80=82=E7=A6=81=E6=AD=A2=E9=A1=BA?= =?UTF-8?q?=E6=89=8B=E6=89=A9=E5=8A=9F=E8=83=BD=20smoke=EF=BC=9A=E6=8E=A5?= =?UTF-8?q?=E5=85=A5WASM=E8=BE=B9=E7=95=8C=E6=BA=90=E7=A0=81=E6=98=A0?= =?UTF-8?q?=E5=B0=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 结论:将 WASM shims/blockers source-map guard 接入 native/source-link 主检查,并取消 workstreams guard 对这两个六分组 guard 的例外;仅加强源映射边界检查,未新增 CNC 行为,未扩展 smoke fallback。\n\n测试:./check-linuxcnc-workstreams-source-map.sh;./check-linuxcnc-wasm-shims-source-map.sh;./check-linuxcnc-wasm-blockers-source-map.sh;git diff --check;CNC_SIM_ALL_NATIVE_GUARDRAILS_ONLY=1 ./test-all-native.sh;./test-native.sh;./test-linuxcnc-source-link.sh。 --- check-linuxcnc-workstreams-source-map.sh | 2 -- test-all-native.sh | 4 ++++ test-linuxcnc-source-link.sh | 2 ++ test-native.sh | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/check-linuxcnc-workstreams-source-map.sh b/check-linuxcnc-workstreams-source-map.sh index bf7d258..d574a39 100755 --- a/check-linuxcnc-workstreams-source-map.sh +++ b/check-linuxcnc-workstreams-source-map.sh @@ -121,8 +121,6 @@ for workstream, paths in expected.items(): for test_entry in ["test-native.sh", "test-linuxcnc-source-link.sh"]: text = Path(test_entry).read_text(encoding="utf-8") for guard in sorted({path for paths in expected.values() for path in paths if path.startswith("check-")}): - if guard in {"check-linuxcnc-wasm-shims-source-map.sh", "check-linuxcnc-wasm-blockers-source-map.sh"}: - continue if f"./{guard}" not in text: raise SystemExit(f"{test_entry} does not run workstream source-map guard: {guard}") PY diff --git a/test-all-native.sh b/test-all-native.sh index d0adfa0..b46d4cb 100755 --- a/test-all-native.sh +++ b/test-all-native.sh @@ -166,7 +166,11 @@ grep -F 'LinuxCNC source basis: this guard ties LinuxCNC tooldata/Submakefile' c grep -F './check-linuxcnc-tooldata-source-map.sh' test-native.sh >/dev/null grep -F './check-linuxcnc-tooldata-source-map.sh' test-linuxcnc-source-link.sh >/dev/null grep -F 'LinuxCNC source basis: this guard ties the documented WASM blocker map' check-linuxcnc-wasm-blockers-source-map.sh >/dev/null +grep -F './check-linuxcnc-wasm-blockers-source-map.sh' test-native.sh >/dev/null +grep -F './check-linuxcnc-wasm-blockers-source-map.sh' test-linuxcnc-source-link.sh >/dev/null grep -F 'LinuxCNC source basis: this guard ties the documented wasm-safe shim map' check-linuxcnc-wasm-shims-source-map.sh >/dev/null +grep -F './check-linuxcnc-wasm-shims-source-map.sh' test-native.sh >/dev/null +grep -F './check-linuxcnc-wasm-shims-source-map.sh' test-linuxcnc-source-link.sh >/dev/null grep -F 'LinuxCNC source basis: the cached input checker keys check-linuxcnc-inputs.sh' check-linuxcnc-inputs-cached.sh >/dev/null grep -F 'LinuxCNC source basis: switchkins/remap table validation derives M428/M429/M430' check-linuxcnc-switchkins-remap-table.sh >/dev/null grep -F 'LINUXCNC_ROOT="$linuxcnc_root" ./check-linuxcnc-inputs-cached.sh "$manifest" --require-kinematics-complete' check-linuxcnc-switchkins-remap-table.sh >/dev/null diff --git a/test-linuxcnc-source-link.sh b/test-linuxcnc-source-link.sh index 30f6f30..bf7e434 100755 --- a/test-linuxcnc-source-link.sh +++ b/test-linuxcnc-source-link.sh @@ -45,6 +45,8 @@ LINUXCNC_ROOT="$linuxcnc_root" ./check-linuxcnc-inputs-cached.sh --cache-dir "$p ./check-linuxcnc-browser-app-source-map.sh ./check-linuxcnc-workstreams-source-map.sh ./check-linuxcnc-tooldata-source-map.sh +./check-linuxcnc-wasm-shims-source-map.sh +./check-linuxcnc-wasm-blockers-source-map.sh LINUXCNC_ROOT="$linuxcnc_root" ./check-linuxcnc-switchkins-remap-table-cached.sh --cache-dir "$preflight_cache_dir" linuxcnc-kinematics-source-files.txt # The LinuxCNC source-linked dump path is not concurrency-safe under parallel execution. exec 9>"${TMPDIR:-/tmp}/cnc_sim_rs274_source_link.lock" diff --git a/test-native.sh b/test-native.sh index c5d5812..cff0859 100755 --- a/test-native.sh +++ b/test-native.sh @@ -43,6 +43,8 @@ preflight_cache_dir="$build_dir/preflight-cache" ./check-linuxcnc-browser-app-source-map.sh ./check-linuxcnc-workstreams-source-map.sh ./check-linuxcnc-tooldata-source-map.sh +./check-linuxcnc-wasm-shims-source-map.sh +./check-linuxcnc-wasm-blockers-source-map.sh ./check-linuxcnc-switchkins-remap-table-cached.sh --cache-dir "$preflight_cache_dir" linuxcnc-kinematics-source-files.txt grep -F 'tooldata:src/emc/tooldata/tooldata_nml.cc:NML tool table backend selected by LinuxCNC TOOL_NML_FLAG' linuxcnc-rs274-source-files.txt >/dev/null grep -F 'tooldata:src/emc/tooldata/tool_mmap_read.cc:LinuxCNC tooldata mmap reader utility source from tooldata Submakefile' linuxcnc-rs274-source-files.txt >/dev/null