参考所有分组,完成尽量多的内容:收紧RS274 source-map边界守卫
This commit is contained in:
@@ -5,8 +5,8 @@ cd "$(dirname "$0")"
|
|||||||
|
|
||||||
# LinuxCNC source basis: this guard keeps the local source map aligned with the
|
# 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
|
# LinuxCNC-root relative rs274 manifests that drive native and WASM source-link
|
||||||
# probes. It validates documentation/manifest drift only; it does not interpret
|
# probes. It validates documentation/manifest drift only; it does not add CNC
|
||||||
# CNC behavior.
|
# behavior, expand smoke parsing, or interpret G-code.
|
||||||
python3 - <<'PY'
|
python3 - <<'PY'
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
@@ -77,4 +77,26 @@ for section, expected_entries in expected.items():
|
|||||||
raise SystemExit(
|
raise SystemExit(
|
||||||
f"docs/linuxcnc-rs274-source-map.md {labels[section]} list no longer matches source manifest"
|
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
|
PY
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
# LinuxCNC rs274 source map
|
# LinuxCNC rs274 source map
|
||||||
|
|
||||||
This is the working map for moving from native `librs274` linking to source-level compilation and then to wasm.
|
This is the working map for moving from native `librs274` linking to
|
||||||
|
source-level compilation and then to wasm. It is a source-manifest guard only;
|
||||||
|
it must not add CNC behavior and must not expand the temporary smoke parser.
|
||||||
|
|
||||||
## Compile assumptions
|
## Compile assumptions
|
||||||
|
|
||||||
@@ -176,6 +178,33 @@ the browser-safe shims and manifest completeness checks:
|
|||||||
- persistent parameter file writes.
|
- persistent parameter file writes.
|
||||||
- dynamic INI/HAL queries.
|
- dynamic INI/HAL queries.
|
||||||
|
|
||||||
|
## Boundaries
|
||||||
|
|
||||||
|
- Native and WASM source lists in this document must match
|
||||||
|
`linuxcnc-rs274-source-files.txt` and
|
||||||
|
`linuxcnc-rs274-wasm-source-files.txt` exactly.
|
||||||
|
- Python binding modules, WASM-blocked sources, and WASM-blocked headers are
|
||||||
|
source coverage only.
|
||||||
|
- They must not become browser API fields or temporary smoke parser fallback behavior.
|
||||||
|
- Browser-hostile dependencies must remain tracked blockers until they are
|
||||||
|
ported, trimmed, wrapped, or replaced by source-backed browser-safe LinuxCNC
|
||||||
|
adaptations.
|
||||||
|
- `test-native.sh`, `test-linuxcnc-source-link.sh`, and `build-wasm.sh` must
|
||||||
|
run `./check-linuxcnc-rs274-source-map.sh` before consuming generated native
|
||||||
|
objects, source-linked LinuxCNC objects, or browser artifacts.
|
||||||
|
- The RS274 source-map guard validates LinuxCNC source ownership and manifest
|
||||||
|
drift only; it does not interpret G-code.
|
||||||
|
|
||||||
|
## Checks
|
||||||
|
|
||||||
|
Run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./check-linuxcnc-rs274-source-map.sh
|
||||||
|
./test-native.sh
|
||||||
|
./test-linuxcnc-source-link.sh
|
||||||
|
```
|
||||||
|
|
||||||
The wasm-safe runtime now constructs its detached `EMC_STAT` through LinuxCNC
|
The wasm-safe runtime now constructs its detached `EMC_STAT` through LinuxCNC
|
||||||
`src/emc/nml_intf/emcops.cc`. The singleton follows LinuxCNC
|
`src/emc/nml_intf/emcops.cc`. The singleton follows LinuxCNC
|
||||||
`src/emc/sai/dummyemcstat.cc`, and the required `NMLmsg`/`RCS_STAT_MSG`
|
`src/emc/sai/dummyemcstat.cc`, and the required `NMLmsg`/`RCS_STAT_MSG`
|
||||||
|
|||||||
Reference in New Issue
Block a user