参考所有分组,完成尽量多的内容。禁止顺手扩功能 smoke

结论:收敛第 2/6 组 manifest/source-link 约束,公共 manifest source lister 只接受单个 manifest group 名称或 all,拒绝 core,header 这类复合 filter,避免 source coverage 查询静默误用;未扩展 smoke 功能。验证:CNC_SIM_ALL_NATIVE_GUARDRAILS_ONLY=1 ./test-all-native.sh、./test-native.sh、./test-linuxcnc-source-link.sh 均通过。
This commit is contained in:
cnc
2026-06-03 19:11:22 +08:00
parent 39f6f9133c
commit aa6e79ac64
3 changed files with 15 additions and 0 deletions

View File

@@ -29,6 +29,11 @@ checks_duplicate_group() {
LINUXCNC_ROOT="$linuxcnc_root" ./check-linuxcnc-inputs-cached.sh "$manifest"
linuxcnc_root=$(cd "$linuxcnc_root" && pwd)
if [[ "$filter_group" != "all" && ! "$filter_group" =~ ^[A-Za-z0-9_-]+$ ]]; then
echo "manifest source filter must be a manifest group name: $filter_group" >&2
exit 1
fi
if [[ "$filter_group" != "all" ]] && ! contains_group "$allowed_groups" "$filter_group"; then
echo "unknown manifest source filter: $filter_group" >&2
exit 1

View File

@@ -1171,6 +1171,15 @@ if grep -E '\.(hh|h)$' <<<"$native_manifest_core" >/dev/null; then
echo "native manifest core compile group includes headers" >&2
exit 1
fi
if ./list-linuxcnc-source-manifest-sources.sh "$manifest" core,header >"$unknown_filter_log" 2>&1; then
echo "native manifest source lister accepted a compound filter" >&2
exit 1
fi
if ! grep -F "manifest source filter must be a manifest group name: core,header" "$unknown_filter_log" >/dev/null; then
echo "native manifest source lister did not report compound filters clearly" >&2
sed -n '1,20p' "$unknown_filter_log" >&2
exit 1
fi
if ./list-linuxcnc-source-manifest-sources.sh "$manifest" bogus >"$unknown_filter_log" 2>&1; then
echo "native manifest source lister accepted unknown filter" >&2
exit 1

View File

@@ -95,6 +95,7 @@ grep -F 'LinuxCNC source basis: the RS274 dump probe pairs LinuxCNC interpreter'
grep -F 'LinuxCNC source basis: the bridge smoke source list is limited to the' list-linuxcnc-bridge-smoke-project-sources.sh >/dev/null
grep -F 'LinuxCNC source basis: the RS274 API source list combines CMake-listed core' list-linuxcnc-rs274-api-project-sources.sh >/dev/null
grep -F 'LinuxCNC source basis: manifest listers expose LinuxCNC-root relative source' list-linuxcnc-manifest-sources.sh >/dev/null
grep -F 'manifest source filter must be a manifest group name: $filter_group' list-linuxcnc-manifest-sources.sh >/dev/null
grep -F 'manifest source must be LinuxCNC-root relative: $path' list-linuxcnc-manifest-sources.sh >/dev/null
grep -F 'LinuxCNC source basis: linuxcnc-rs274-source-files.txt enumerates the native' list-linuxcnc-source-manifest-sources.sh >/dev/null
grep -F 'LinuxCNC source basis: linuxcnc-kinematics-source-files.txt tracks' list-linuxcnc-kinematics-manifest-sources.sh >/dev/null