From cf3154b0434d6f6fbefc6906e0e69d99644331b8 Mon Sep 17 00:00:00 2001 From: cnc Date: Fri, 5 Jun 2026 08:30:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=BD=E5=BF=AB=E6=8E=A8=E8=BF=9B=EF=BC=9A?= =?UTF-8?q?=E5=90=8C=E6=AD=A5WASM=20smoke=20OPFS=E8=BE=B9=E7=95=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- check-linuxcnc-wasm-smoke-source-map.sh | 8 ++++++++ docs/linuxcnc-wasm-smoke-source-map.md | 2 ++ 2 files changed, 10 insertions(+) diff --git a/check-linuxcnc-wasm-smoke-source-map.sh b/check-linuxcnc-wasm-smoke-source-map.sh index b04ca7d..153685b 100755 --- a/check-linuxcnc-wasm-smoke-source-map.sh +++ b/check-linuxcnc-wasm-smoke-source-map.sh @@ -133,6 +133,13 @@ if grep -R -n -E 'localStorage|sessionStorage|indexedDB|showOpenFilePicker|showS echo "browser app/wasm code must not add filesystem persistence outside OPFS" >&2 exit 1 fi +if grep -n -E 'localStorage|sessionStorage|indexedDB|showOpenFilePicker|showSaveFilePicker|showDirectoryPicker|webkitRequestFileSystem|FileReader' \ + web/test-browser-wasm-smoke-*.js \ + web/test-browser-wasm-smoke.html \ + test-web-wasm-browser-smoke.sh; then + echo "browser WASM smoke harness must not add filesystem persistence outside OPFS" >&2 + exit 1 +fi python3 - <<'PY' from pathlib import Path @@ -174,6 +181,7 @@ required_phrases = [ "must not expand the temporary smoke parser", "persistence OPFS-only", "Node smoke must leave OPFS disabled", + "Browser smoke harness files must not use Local Storage", "Generated switchkins config smoke cases", "browser smoke shell guard also pins required section names", "OPFS workspace/policy/directory handling", diff --git a/docs/linuxcnc-wasm-smoke-source-map.md b/docs/linuxcnc-wasm-smoke-source-map.md index 573c66c..6e4f00c 100644 --- a/docs/linuxcnc-wasm-smoke-source-map.md +++ b/docs/linuxcnc-wasm-smoke-source-map.md @@ -48,6 +48,8 @@ OPFS-only is the required boundary. require an OPFS workspace. - Browser smoke must keep program files, LinuxCNC parameter files, temporary `.new` files, and `.bak` backups under OPFS-backed storage. +- Browser smoke harness files must not use Local Storage, IndexedDB, File + Picker, Directory Picker, WebKit filesystem, or FileReader persistence paths. - Generated switchkins config smoke cases must continue to come from `web/public/linuxcnc_switchkins_remap_config_cases.json`. - The browser smoke shell guard also pins required section names for LinuxCNC