参考所有分组,完成尽量多的内容:收紧OPFS source-map边界守卫
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user