尽快推进:同步WASM smoke OPFS边界

This commit is contained in:
cnc
2026-06-05 08:30:47 +08:00
parent 9da6ffcd6a
commit cf3154b043
2 changed files with 10 additions and 0 deletions

View File

@@ -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",

View File

@@ -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