From 29197b25cc5987e5def5afe38d010d9cceebf6c4 Mon Sep 17 00:00:00 2001 From: cnc Date: Fri, 5 Jun 2026 07:06:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E8=80=83=E6=89=80=E6=9C=89=E5=88=86?= =?UTF-8?q?=E7=BB=84=EF=BC=8C=E5=AE=8C=E6=88=90=E5=B0=BD=E9=87=8F=E5=A4=9A?= =?UTF-8?q?=E7=9A=84=E5=86=85=E5=AE=B9=EF=BC=9A=E6=94=B6=E7=B4=A7OPFS=20so?= =?UTF-8?q?urce-map=E8=BE=B9=E7=95=8C=E5=AE=88=E5=8D=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- check-linuxcnc-opfs-source-map.sh | 13 ++++++++++++- docs/linuxcnc-opfs-source-map.md | 6 ++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/check-linuxcnc-opfs-source-map.sh b/check-linuxcnc-opfs-source-map.sh index 1f07c69..afbb1af 100755 --- a/check-linuxcnc-opfs-source-map.sh +++ b/check-linuxcnc-opfs-source-map.sh @@ -6,7 +6,7 @@ cd "$(dirname "$0")" # LinuxCNC source basis: this guard ties browser OPFS parameter persistence to # interp_internal.hh defaults and rs274ngc_pre.cc restore_parameters() / # save_parameters() file semantics. It validates bridge policy only; it does not -# add CNC behavior or expand smoke parsing. +# add CNC behavior, expand smoke parsing, or interpret G-code. linuxcnc_root=${LINUXCNC_ROOT:-../linuxcnc} linuxcnc_root=$(cd "$linuxcnc_root" && pwd) @@ -134,8 +134,19 @@ required_phrases = [ "OPFS workspace and mount policy", "OPFS-backed workspace, directory, parameter-file, and mount/workspace option types", "app-level OPFS program, parameter, backup, and reload behavior", + "./check-linuxcnc-opfs-source-map.sh", + "does not interpret G-code", ] for phrase in required_phrases: if phrase not in source_map: raise SystemExit(f"docs/linuxcnc-opfs-source-map.md missing OPFS coverage 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-opfs-source-map.sh" not in text: + raise SystemExit(f"{entry} must run ./check-linuxcnc-opfs-source-map.sh") PY diff --git a/docs/linuxcnc-opfs-source-map.md b/docs/linuxcnc-opfs-source-map.md index db1d858..bd961f8 100644 --- a/docs/linuxcnc-opfs-source-map.md +++ b/docs/linuxcnc-opfs-source-map.md @@ -47,6 +47,11 @@ persistence. It is a policy and bridge map only; it must not add independent fil - `web/src/app.js` must parse browser programs through `parseFileWithParameterFile()` so the program file and LinuxCNC parameter state both live under OPFS. +- `test-native.sh`, `test-linuxcnc-source-link.sh`, and `build-wasm.sh` must + run `./check-linuxcnc-opfs-source-map.sh` before consuming app-backed browser + artifacts or source-linked LinuxCNC objects. +- The OPFS source-map guard validates LinuxCNC source-backed filesystem bridge + policy only; it does not interpret G-code. ## Checks @@ -56,6 +61,7 @@ Run: ./check-linuxcnc-opfs-source-map.sh ./test-native.sh ./test-linuxcnc-source-link.sh +./build-wasm.sh ``` `check-linuxcnc-opfs-source-map.sh` keeps this document, the LinuxCNC source