参考所有分组,完成尽量多的内容:收紧RS274 source-map边界守卫

This commit is contained in:
cnc
2026-06-05 06:48:36 +08:00
parent 9c52e426f7
commit fb2b5c4920
2 changed files with 54 additions and 3 deletions

View File

@@ -5,8 +5,8 @@ cd "$(dirname "$0")"
# LinuxCNC source basis: this guard keeps the local source map aligned with the
# LinuxCNC-root relative rs274 manifests that drive native and WASM source-link
# probes. It validates documentation/manifest drift only; it does not interpret
# CNC behavior.
# probes. It validates documentation/manifest drift only; it does not add CNC
# behavior, expand smoke parsing, or interpret G-code.
python3 - <<'PY'
from pathlib import Path
@@ -77,4 +77,26 @@ for section, expected_entries in expected.items():
raise SystemExit(
f"docs/linuxcnc-rs274-source-map.md {labels[section]} list no longer matches source manifest"
)
for phrase in [
"must not add CNC behavior",
"must not expand the temporary smoke parser",
"source coverage only",
"must not become browser API fields",
"temporary smoke parser fallback behavior",
"Browser-hostile dependencies must remain tracked blockers",
"./check-linuxcnc-rs274-source-map.sh",
"does not interpret G-code",
]:
if phrase not in source_map:
raise SystemExit(f"docs/linuxcnc-rs274-source-map.md missing 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-rs274-source-map.sh" not in text:
raise SystemExit(f"{entry} must run ./check-linuxcnc-rs274-source-map.sh")
PY