From 31e1e4499e4e58bab88104779511a6ae1eb23377 Mon Sep 17 00:00:00 2001 From: cnc Date: Tue, 2 Jun 2026 14:26:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=89=E6=8F=90=E7=A4=BA=E8=AF=8D=E7=BB=93?= =?UTF-8?q?=E8=AE=BA=E8=A1=A5=E6=9E=84=E5=BB=BA=E6=A0=A1=E9=AA=8C=E4=BE=9D?= =?UTF-8?q?=E6=8D=AE=E9=94=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build-wasm.sh | 4 ++++ check-linuxcnc-inputs-cached.sh | 3 +++ check-linuxcnc-inputs.sh | 3 +++ check-linuxcnc-switchkins-remap-table-cached.sh | 3 +++ check-linuxcnc-switchkins-remap-table.sh | 3 +++ generate-linuxcnc-puma560-dh-parameters.sh | 3 +++ generate-linuxcnc-switchkins-remap-table.sh | 3 +++ test-all-native.sh | 11 +++++++++++ test-native.sh | 8 ++++++++ 9 files changed, 41 insertions(+) diff --git a/build-wasm.sh b/build-wasm.sh index bcc8f50..58d22dd 100755 --- a/build-wasm.sh +++ b/build-wasm.sh @@ -3,6 +3,10 @@ set -euo pipefail cd "$(dirname "$0")" +# LinuxCNC source basis: the wasm build preflights and compiles the +# linuxcnc-rs274-wasm-source-files.txt manifest entries from +# src/emc/rs274ngc/tooldata plus source-basis-checked shims before copying the +# browser artifacts; it must not add independent interpreter behavior. linuxcnc_root=${LINUXCNC_ROOT:-../linuxcnc} manifest=${1:-linuxcnc-rs274-wasm-source-files.txt} build_jobs=${CNC_SIM_BUILD_JOBS:-8} diff --git a/check-linuxcnc-inputs-cached.sh b/check-linuxcnc-inputs-cached.sh index 293142b..4654b1a 100755 --- a/check-linuxcnc-inputs-cached.sh +++ b/check-linuxcnc-inputs-cached.sh @@ -3,6 +3,9 @@ set -euo pipefail cd "$(dirname "$0")" +# LinuxCNC source basis: the cached input checker keys check-linuxcnc-inputs.sh +# results by manifest contents and LinuxCNC source mtimes so source-backed +# rs274/kinematics coverage is not silently reused after upstream changes. cache_dir=${CNC_SIM_PREFLIGHT_CACHE_DIR:-} check_args=("$@") if [[ "${1:-}" == "--cache-dir" ]]; then diff --git a/check-linuxcnc-inputs.sh b/check-linuxcnc-inputs.sh index bf604a2..c941423 100755 --- a/check-linuxcnc-inputs.sh +++ b/check-linuxcnc-inputs.sh @@ -3,6 +3,9 @@ set -euo pipefail cd "$(dirname "$0")" +# LinuxCNC source basis: manifest validation checks LinuxCNC-root relative +# sources and completeness against src/emc/rs274ngc, src/emc/kinematics, +# src/libnml/posemath, and configs/sim without interpreting CNC behavior. linuxcnc_root=${LINUXCNC_ROOT:-../linuxcnc} manifest=${1:-} require_complete=${2:-} diff --git a/check-linuxcnc-switchkins-remap-table-cached.sh b/check-linuxcnc-switchkins-remap-table-cached.sh index fb2ffd2..24fe500 100755 --- a/check-linuxcnc-switchkins-remap-table-cached.sh +++ b/check-linuxcnc-switchkins-remap-table-cached.sh @@ -3,6 +3,9 @@ set -euo pipefail cd "$(dirname "$0")" +# LinuxCNC source basis: cached switchkins/remap validation hashes the LinuxCNC +# kinematics manifest, referenced configs/remaps, generator script, and bridge +# outputs before reusing table-check results. cache_dir=${CNC_SIM_PREFLIGHT_CACHE_DIR:-} check_args=("$@") if [[ "${1:-}" == "--cache-dir" ]]; then diff --git a/check-linuxcnc-switchkins-remap-table.sh b/check-linuxcnc-switchkins-remap-table.sh index 34db967..8a026b4 100755 --- a/check-linuxcnc-switchkins-remap-table.sh +++ b/check-linuxcnc-switchkins-remap-table.sh @@ -3,6 +3,9 @@ set -euo pipefail cd "$(dirname "$0")" +# LinuxCNC source basis: switchkins/remap table validation derives M428/M429/M430 +# cases from LinuxCNC configs/sim INI/HAL files, remap_subs/*.ngc # +# assignments, and src/emc/kinematics switchkins sources. linuxcnc_root=${LINUXCNC_ROOT:-../linuxcnc} manifest=${1:-linuxcnc-kinematics-source-files.txt} diff --git a/generate-linuxcnc-puma560-dh-parameters.sh b/generate-linuxcnc-puma560-dh-parameters.sh index d950962..4ddb6b5 100644 --- a/generate-linuxcnc-puma560-dh-parameters.sh +++ b/generate-linuxcnc-puma560-dh-parameters.sh @@ -3,6 +3,9 @@ set -euo pipefail cd "$(dirname "$0")" +# LinuxCNC source basis: Puma560 DH parameter output is generated from +# configs/sim/axis/vismach/puma/puma560_dh.hal setp genserkins.{A,ALPHA,D}-N +# values used by LinuxCNC genser/switchkins simulation configs. linuxcnc_root=${LINUXCNC_ROOT:-../linuxcnc} source_path=${1:-configs/sim/axis/vismach/puma/puma560_dh.hal} source_file="$linuxcnc_root/$source_path" diff --git a/generate-linuxcnc-switchkins-remap-table.sh b/generate-linuxcnc-switchkins-remap-table.sh index bb41917..c36e6a7 100755 --- a/generate-linuxcnc-switchkins-remap-table.sh +++ b/generate-linuxcnc-switchkins-remap-table.sh @@ -3,6 +3,9 @@ set -euo pipefail cd "$(dirname "$0")" +# LinuxCNC source basis: generated switchkins/remap tables are extracted from +# LinuxCNC configs/sim INI/HAL files and remap_subs/{428,429,430}remap.ngc +# sources listed in linuxcnc-kinematics-source-files.txt. linuxcnc_root=${LINUXCNC_ROOT:-../linuxcnc} mode=table all_output_dir= diff --git a/test-all-native.sh b/test-all-native.sh index ee5611a..f1f6b8e 100755 --- a/test-all-native.sh +++ b/test-all-native.sh @@ -3,6 +3,9 @@ set -euo pipefail cd "$(dirname "$0")" +# LinuxCNC source basis: all-native guardrails lock source-backed manifests, +# probe wrappers, switchkins/remap generation, OPFS policy, and LinuxCNC +# source-link build constraints without adding CNC interpreter behavior. manifest=${1:-linuxcnc-rs274-source-files.txt} linuxcnc_root=${LINUXCNC_ROOT:-../linuxcnc} guardrails_only=${CNC_SIM_ALL_NATIVE_GUARDRAILS_ONLY:-0} @@ -70,6 +73,14 @@ grep -Fx 'trap cleanup_native_test_temps EXIT' test-all-native.sh >/dev/null grep -F 'guardrails_only=${CNC_SIM_ALL_NATIVE_GUARDRAILS_ONLY:-0}' test-all-native.sh >/dev/null grep -F 'CNC_SIM_ALL_NATIVE_GUARDRAILS_ONLY must be 0 or 1: $guardrails_only' test-all-native.sh >/dev/null grep -F 'all native guardrail checks passed' test-all-native.sh >/dev/null +grep -F 'LinuxCNC source basis: the wasm build preflights and compiles the' build-wasm.sh >/dev/null +grep -F 'LinuxCNC source basis: manifest validation checks LinuxCNC-root relative' check-linuxcnc-inputs.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 source basis: cached switchkins/remap validation hashes the LinuxCNC' check-linuxcnc-switchkins-remap-table-cached.sh >/dev/null +grep -F 'LinuxCNC source basis: generated switchkins/remap tables are extracted from' generate-linuxcnc-switchkins-remap-table.sh >/dev/null +grep -F 'LinuxCNC source basis: Puma560 DH parameter output is generated from' generate-linuxcnc-puma560-dh-parameters.sh >/dev/null +grep -F 'LinuxCNC source basis: all-native guardrails lock source-backed manifests' test-all-native.sh >/dev/null test -x check-linuxcnc-inputs-cached.sh grep -F 'CNC_SIM_PREFLIGHT_CACHE_DIR' check-linuxcnc-inputs-cached.sh >/dev/null grep -F 'sha256sum check-linuxcnc-inputs-cached.sh' check-linuxcnc-inputs-cached.sh >/dev/null diff --git a/test-native.sh b/test-native.sh index 9247e3b..492e11b 100755 --- a/test-native.sh +++ b/test-native.sh @@ -51,6 +51,14 @@ if ! diff -u <(printf '%s\n' "$tooldata_source_entries") <(printf '%s\n' "$toold fi grep -F 'metadata:src/emc/tooldata/tooldata_db.cc:source basis for wasm-safe tooldata runtime export shim' linuxcnc-rs274-wasm-source-files.txt >/dev/null grep -F 'metadata:src/emc/tooldata/tooldata_nml.cc:source basis for wasm-safe tooldata runtime NML export shim' linuxcnc-rs274-wasm-source-files.txt >/dev/null +grep -F 'LinuxCNC source basis: the wasm build preflights and compiles the' build-wasm.sh >/dev/null +grep -F 'LinuxCNC source basis: manifest validation checks LinuxCNC-root relative' check-linuxcnc-inputs.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 source basis: cached switchkins/remap validation hashes the LinuxCNC' check-linuxcnc-switchkins-remap-table-cached.sh >/dev/null +grep -F 'LinuxCNC source basis: generated switchkins/remap tables are extracted from' generate-linuxcnc-switchkins-remap-table.sh >/dev/null +grep -F 'LinuxCNC source basis: Puma560 DH parameter output is generated from' generate-linuxcnc-puma560-dh-parameters.sh >/dev/null +grep -F 'LinuxCNC source basis: all-native guardrails lock source-backed manifests' test-all-native.sh >/dev/null grep -F 'LinuxCNC source basis: this probe derives required Python C API exports from' test-linuxcnc-wasm-python-c-api-symbols.sh >/dev/null grep -F 'LinuxCNC source basis: this probe compares wasm-safe tooldata runtime stubs' test-linuxcnc-wasm-tooldata-runtime-symbols.sh >/dev/null grep -F 'LinuxCNC source basis: the standalone probe links src/emc/rs274ngc/interp_base.cc' test-linuxcnc-wasm-interp-base-link.sh >/dev/null