From 40864459004ba6956a9a0eb759167b7b23e1dd93 Mon Sep 17 00:00:00 2001 From: cnc Date: Wed, 3 Jun 2026 13:47:51 +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?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 结论:按 align-linuxcnc 约束补齐 switchkins TOOL_TABLE/tooldata 与 kinematics manifest lister 的源码政策说明,并用 all-native guardrail 锁定文档,避免规则和脚本脱节;不扩展 smoke 行为。 源依据:LinuxCNC M428/M429/M430 INI 的 [EMCIO] TOOL_TABLE 条目、linuxcnc-kinematics-source-files.txt 的 asset/tooldata/generated 分组,以及 check-linuxcnc-switchkins-remap-table-cached.sh 对引用源的签名约束。 验证:CNC_SIM_ALL_NATIVE_GUARDRAILS_ONLY=1 ./test-all-native.sh 通过;./test-native.sh 通过;./test-linuxcnc-source-link.sh 通过。 --- docs/linuxcnc-source-policy.md | 10 +++++++++- test-all-native.sh | 5 +++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/linuxcnc-source-policy.md b/docs/linuxcnc-source-policy.md index 3ebc450..efa8ed9 100644 --- a/docs/linuxcnc-source-policy.md +++ b/docs/linuxcnc-source-policy.md @@ -114,6 +114,13 @@ Efficiency rules: generated table/case outputs, and the thin API/web bridge files that pass switchkins config aliases. Native, source-link, and build-wasm entry points must run this cached check before consuming those aliases. +- The switchkins/remap generator must treat LinuxCNC `[EMCIO] TOOL_TABLE` + entries as source coverage only. Resolvable tool tables referenced by + M428/M429/M430 INI files must be present as `tooldata` manifest entries and + must not become new generated API aliases or browser cases. +- The kinematics manifest lister must preserve every allowed manifest group + used by switchkins and RTCP coverage, including `asset`, `tooldata`, and + `generated`, and must reject unknown filters or output modes for those groups. - Reuse wasm probe objects across the wasm source object probe, `rs274ngc_pre` blocker/link probes, and the runtime link probe through `build-linuxcnc-wasm-probe-objects.sh`. Its mode-specific object caches must @@ -294,7 +301,8 @@ Build and source-link guardrails: - The default wasm manifest partition must remain explicitly checked for 26 wasm-safe core sources and 9 blocked sources. - Manifest source listers must reject malformed lines, absolute source paths, - unknown groups, unknown filters, and duplicate source entries. + unknown groups, unknown filters, unknown output modes, and duplicate source + entries. - Native link flags must include the built LinuxCNC `lib` path and rpath. - Common CXX flag helpers must surface helper failures instead of hiding them behind process substitution or `read`. diff --git a/test-all-native.sh b/test-all-native.sh index 217c7ee..3d544bb 100755 --- a/test-all-native.sh +++ b/test-all-native.sh @@ -110,6 +110,10 @@ grep -F 'web/src/wasm-core.js' check-linuxcnc-switchkins-remap-table-cached.sh > grep -F 'the cached wrapper script, checker script, generator script' docs/linuxcnc-source-policy.md >/dev/null grep -F 'generated table/case outputs, and the thin API/web bridge files that pass' docs/linuxcnc-source-policy.md >/dev/null grep -F 'switchkins config aliases.' docs/linuxcnc-source-policy.md >/dev/null +grep -F 'The switchkins/remap generator must treat LinuxCNC `[EMCIO] TOOL_TABLE`' docs/linuxcnc-source-policy.md >/dev/null +grep -F 'must not become new generated API aliases or browser cases.' docs/linuxcnc-source-policy.md >/dev/null +grep -F 'The kinematics manifest lister must preserve every allowed manifest group' docs/linuxcnc-source-policy.md >/dev/null +grep -F 'including `asset`, `tooldata`, and' docs/linuxcnc-source-policy.md >/dev/null grep -F 'check-linuxcnc-switchkins-remap-table-cached.sh --cache-dir "$preflight_cache_dir" linuxcnc-kinematics-source-files.txt' test-native.sh >/dev/null grep -F 'check-linuxcnc-switchkins-remap-table-cached.sh --cache-dir "$preflight_cache_dir" linuxcnc-kinematics-source-files.txt' test-linuxcnc-source-link.sh >/dev/null grep -F 'check-linuxcnc-switchkins-remap-table-cached.sh --cache-dir "$preflight_cache_dir" linuxcnc-kinematics-source-files.txt' build-wasm.sh >/dev/null @@ -551,6 +555,7 @@ grep -F 'test-web-wasm-node-smoke.sh' docs/linuxcnc-porting.md >/dev/null grep -F 'explicitly checked for 26' docs/linuxcnc-source-policy.md >/dev/null grep -F 'wasm-safe core sources and 9 blocked sources' docs/linuxcnc-source-policy.md >/dev/null grep -F 'must reject malformed lines, absolute source paths,' docs/linuxcnc-source-policy.md >/dev/null +grep -F 'unknown groups, unknown filters, unknown output modes, and duplicate source' docs/linuxcnc-source-policy.md >/dev/null grep -F 'must include the built LinuxCNC `lib` path and rpath' docs/linuxcnc-source-policy.md >/dev/null grep -F 'must surface helper failures instead of hiding them' docs/linuxcnc-source-policy.md >/dev/null grep -F 'Temporary probe reports must be cleaned on failure' docs/linuxcnc-source-policy.md >/dev/null