参考所有分组,完成尽量多的内容:收紧kinematics source-map边界守卫
This commit is contained in:
@@ -7,7 +7,7 @@ cd "$(dirname "$0")"
|
|||||||
# with linuxcnc-kinematics-source-files.txt, which enumerates LinuxCNC
|
# with linuxcnc-kinematics-source-files.txt, which enumerates LinuxCNC
|
||||||
# kinematics, posemath, switchkins INI/HAL/remap/tooldata/assets, and adjacent
|
# kinematics, posemath, switchkins INI/HAL/remap/tooldata/assets, and adjacent
|
||||||
# build metadata. It validates source coverage documentation only; it does not
|
# build metadata. It validates source coverage documentation only; it does not
|
||||||
# add or interpret CNC behavior.
|
# add CNC behavior, expand smoke parsing, or interpret G-code.
|
||||||
linuxcnc_root=${LINUXCNC_ROOT:-../linuxcnc}
|
linuxcnc_root=${LINUXCNC_ROOT:-../linuxcnc}
|
||||||
linuxcnc_root=$(cd "$linuxcnc_root" && pwd)
|
linuxcnc_root=$(cd "$linuxcnc_root" && pwd)
|
||||||
|
|
||||||
@@ -64,6 +64,9 @@ for group in expected_groups:
|
|||||||
|
|
||||||
required_phrases = [
|
required_phrases = [
|
||||||
"LinuxCNC Source Anchors",
|
"LinuxCNC Source Anchors",
|
||||||
|
"must not add CNC behavior",
|
||||||
|
"must not",
|
||||||
|
"expand the temporary smoke parser",
|
||||||
"`src/emc/kinematics/Submakefile`",
|
"`src/emc/kinematics/Submakefile`",
|
||||||
"`src/emc/kinematics/kinematics.h`",
|
"`src/emc/kinematics/kinematics.h`",
|
||||||
"motion.switchkins-type",
|
"motion.switchkins-type",
|
||||||
@@ -72,12 +75,23 @@ required_phrases = [
|
|||||||
"OPFS-only",
|
"OPFS-only",
|
||||||
"derive M428/M429/M430 cases from",
|
"derive M428/M429/M430 cases from",
|
||||||
"RTCP and five-axis coverage",
|
"RTCP and five-axis coverage",
|
||||||
|
"./check-linuxcnc-kinematics-source-map.sh",
|
||||||
"./check-linuxcnc-inputs.sh linuxcnc-kinematics-source-files.txt --require-kinematics-complete",
|
"./check-linuxcnc-inputs.sh linuxcnc-kinematics-source-files.txt --require-kinematics-complete",
|
||||||
"./check-linuxcnc-switchkins-remap-table.sh linuxcnc-kinematics-source-files.txt",
|
"./check-linuxcnc-switchkins-remap-table.sh linuxcnc-kinematics-source-files.txt",
|
||||||
|
"does not interpret G-code",
|
||||||
]
|
]
|
||||||
for phrase in required_phrases:
|
for phrase in required_phrases:
|
||||||
if phrase not in source_map:
|
if phrase not in source_map:
|
||||||
raise SystemExit(
|
raise SystemExit(
|
||||||
f"docs/linuxcnc-kinematics-source-map.md is missing source-coverage boundary phrase: {phrase}"
|
f"docs/linuxcnc-kinematics-source-map.md is missing source-coverage 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-kinematics-source-map.sh" not in text:
|
||||||
|
raise SystemExit(f"{entry} must run ./check-linuxcnc-kinematics-source-map.sh")
|
||||||
PY
|
PY
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
This map tracks the LinuxCNC source/configuration basis for kinematics,
|
This map tracks the LinuxCNC source/configuration basis for kinematics,
|
||||||
switchkins, RTCP, and M428/M429/M430 remap coverage. It is intentionally a
|
switchkins, RTCP, and M428/M429/M430 remap coverage. It is intentionally a
|
||||||
source-coverage document: the manifest entries here must not become browser or
|
source-coverage document: the manifest entries here must not become browser or
|
||||||
application behavior by themselves.
|
application behavior by themselves. It must not add CNC behavior and must not
|
||||||
|
expand the temporary smoke parser.
|
||||||
|
|
||||||
## Manifest groups
|
## Manifest groups
|
||||||
|
|
||||||
@@ -44,6 +45,11 @@ groups:
|
|||||||
LinuxCNC INI/HAL/remap sources, not from hand-authored behavior.
|
LinuxCNC INI/HAL/remap sources, not from hand-authored behavior.
|
||||||
- RTCP and five-axis coverage must remain tied to LinuxCNC kinematics sources,
|
- RTCP and five-axis coverage must remain tied to LinuxCNC kinematics sources,
|
||||||
remap files, and configuration files.
|
remap files, and configuration files.
|
||||||
|
- `test-native.sh`, `test-linuxcnc-source-link.sh`, and `build-wasm.sh` must
|
||||||
|
run `./check-linuxcnc-kinematics-source-map.sh` before consuming generated
|
||||||
|
config aliases, source-linked LinuxCNC objects, or browser artifacts.
|
||||||
|
- The kinematics source-map guard validates LinuxCNC source/config ownership
|
||||||
|
and manifest drift only; it does not interpret G-code.
|
||||||
|
|
||||||
## Checks
|
## Checks
|
||||||
|
|
||||||
@@ -53,6 +59,8 @@ Run:
|
|||||||
./check-linuxcnc-kinematics-source-map.sh
|
./check-linuxcnc-kinematics-source-map.sh
|
||||||
./check-linuxcnc-inputs.sh linuxcnc-kinematics-source-files.txt --require-kinematics-complete
|
./check-linuxcnc-inputs.sh linuxcnc-kinematics-source-files.txt --require-kinematics-complete
|
||||||
./check-linuxcnc-switchkins-remap-table.sh linuxcnc-kinematics-source-files.txt
|
./check-linuxcnc-switchkins-remap-table.sh linuxcnc-kinematics-source-files.txt
|
||||||
|
./test-native.sh
|
||||||
|
./test-linuxcnc-source-link.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
`check-linuxcnc-kinematics-source-map.sh` keeps this document's group counts in
|
`check-linuxcnc-kinematics-source-map.sh` keeps this document's group counts in
|
||||||
|
|||||||
Reference in New Issue
Block a user