参考所有分组,完成尽量多的内容。禁止顺手扩功能 smoke:锁定build-wasm源码映射前置

结论:build-wasm.sh 现在与 native/source-link 一样先运行六分组 source-map guards,再消费生成配置别名和浏览器 artifacts;同步 build/workstreams source map 与 aggregate 元检查。未新增 CNC 行为,未扩展 smoke fallback。\n\n测试:./check-linuxcnc-workstreams-source-map.sh;./check-linuxcnc-build-source-map.sh;git diff --check;CNC_SIM_ALL_NATIVE_GUARDRAILS_ONLY=1 ./test-all-native.sh;./test-native.sh;./test-linuxcnc-source-link.sh。
This commit is contained in:
cnc
2026-06-04 18:48:46 +08:00
parent 3079656cfb
commit 22c1c311ff
6 changed files with 44 additions and 6 deletions

View File

@@ -26,6 +26,17 @@ fi
preflight_cache_dir=build/wasm-preflight-cache
LINUXCNC_ROOT="$linuxcnc_root" ./check-linuxcnc-inputs-cached.sh --cache-dir "$preflight_cache_dir" "$manifest"
./check-linuxcnc-rs274-source-map.sh
./check-linuxcnc-kinematics-source-map.sh
./check-linuxcnc-opfs-source-map.sh
./check-linuxcnc-switchkins-remap-source-map.sh
./check-linuxcnc-wasm-smoke-source-map.sh
./check-linuxcnc-build-source-map.sh
./check-linuxcnc-browser-app-source-map.sh
./check-linuxcnc-workstreams-source-map.sh
./check-linuxcnc-tooldata-source-map.sh
./check-linuxcnc-wasm-shims-source-map.sh
./check-linuxcnc-wasm-blockers-source-map.sh
LINUXCNC_ROOT="$linuxcnc_root" ./check-linuxcnc-switchkins-remap-table-cached.sh --cache-dir "$preflight_cache_dir" linuxcnc-kinematics-source-files.txt
manifest=$(cd "$(dirname "$manifest")" && pwd)/$(basename "$manifest")
linuxcnc_root=$(cd "$linuxcnc_root" && pwd)

View File

@@ -40,8 +40,21 @@ grep -F 'Default WASM manifest partition must remain 26 wasm-safe `core` sources
docs/linuxcnc-build-source-map.md >/dev/null
grep -F '`build-wasm.sh` must configure with `CNC_SIM_ENABLE_SMOKE_BACKEND=OFF`' \
docs/linuxcnc-build-source-map.md >/dev/null
grep -F '`build-wasm.sh` must run the same source-map guards as native and source-link' \
docs/linuxcnc-build-source-map.md >/dev/null
grep -F 'LinuxCNC source basis: the wasm build preflights and compiles the' build-wasm.sh >/dev/null
grep -F './check-linuxcnc-rs274-source-map.sh' build-wasm.sh >/dev/null
grep -F './check-linuxcnc-kinematics-source-map.sh' build-wasm.sh >/dev/null
grep -F './check-linuxcnc-opfs-source-map.sh' build-wasm.sh >/dev/null
grep -F './check-linuxcnc-switchkins-remap-source-map.sh' build-wasm.sh >/dev/null
grep -F './check-linuxcnc-wasm-smoke-source-map.sh' build-wasm.sh >/dev/null
grep -F './check-linuxcnc-build-source-map.sh' build-wasm.sh >/dev/null
grep -F './check-linuxcnc-browser-app-source-map.sh' build-wasm.sh >/dev/null
grep -F './check-linuxcnc-workstreams-source-map.sh' build-wasm.sh >/dev/null
grep -F './check-linuxcnc-tooldata-source-map.sh' build-wasm.sh >/dev/null
grep -F './check-linuxcnc-wasm-shims-source-map.sh' build-wasm.sh >/dev/null
grep -F './check-linuxcnc-wasm-blockers-source-map.sh' build-wasm.sh >/dev/null
grep -F 'manifest_core_count=$(count_nonempty_lines "$manifest_core_output")' build-wasm.sh >/dev/null
grep -F 'manifest_blocked_count=$(count_nonempty_lines "$manifest_blocked_output")' build-wasm.sh >/dev/null
grep -F 'manifest_core_count" -ne 26 || "$manifest_blocked_count" -ne 9' build-wasm.sh >/dev/null

View File

@@ -118,7 +118,7 @@ for workstream, paths in expected.items():
if path.startswith("check-") and not Path(path).stat().st_mode & 0o111:
raise SystemExit(f"source-map guard is not executable: {path}")
for test_entry in ["test-native.sh", "test-linuxcnc-source-link.sh"]:
for test_entry in ["test-native.sh", "test-linuxcnc-source-link.sh", "build-wasm.sh"]:
text = Path(test_entry).read_text(encoding="utf-8")
for guard in sorted({path for paths in expected.values() for path in paths if path.startswith("check-")}):
if f"./{guard}" not in text:

View File

@@ -29,7 +29,7 @@ behavior and must not expand the temporary smoke parser.
| `test-linuxcnc-source-link.sh` | Compiles manifest-selected LinuxCNC RS274 objects directly with source-link support objects and project dump bridges. |
| `test-linuxcnc-source-syntax.sh` | Keeps native source syntax validation on persistent dependency-tracked stamps. |
| `test-linuxcnc-wasm-cmake-safe-probe.sh` | Configures source-backed WASM-safe probe targets with persistent CMake signatures. |
| `build-wasm.sh` | Runs blocker, syntax, object, CMake, tooldata, interp, Python, `rs274ngc_pre`, and runtime probes before copying browser artifacts. |
| `build-wasm.sh` | Runs source-map guards, blocker, syntax, object, CMake, tooldata, interp, Python, `rs274ngc_pre`, and runtime probes before copying browser artifacts. |
## Boundaries
@@ -41,6 +41,8 @@ behavior and must not expand the temporary smoke parser.
`CONFIGURE_RULE_VERSION` fields instead of hashing whole scripts.
- `build-wasm.sh` must configure with `CNC_SIM_ENABLE_SMOKE_BACKEND=OFF` and
`CNC_SIM_ENABLE_LINUXCNC_WASM_SAFE_PROBE=ON`.
- `build-wasm.sh` must run the same source-map guards as native and source-link
entry points before consuming generated config aliases or browser artifacts.
- `build-wasm.sh` must build `cnc_sim_wasm_runtime_probe` before
`cnc_sim_wasm`, copy `cnc_sim.js` and `cnc_sim.wasm` exactly once, compare
copied artifacts with `cmp -s`, and run Node smoke before browser smoke.

View File

@@ -34,9 +34,9 @@ the temporary smoke parser.
script.
- `docs/linuxcnc-source-policy.md` must keep the same one-context workflow
boundary and smoke-verification-only rule used by this index.
- `test-native.sh` and `test-linuxcnc-source-link.sh` must run the workstream
source-map guard before consuming generated config aliases or source-linked
LinuxCNC objects.
- `test-native.sh`, `test-linuxcnc-source-link.sh`, and `build-wasm.sh` must
run the workstream source-map guard before consuming generated config aliases,
source-linked LinuxCNC objects, or browser artifacts.
- WASM blocker and shim maps remain source coverage guards, not browser API
expansion points.
- Browser filesystem persistence remains OPFS-only.
@@ -51,8 +51,9 @@ Run:
./check-linuxcnc-workstreams-source-map.sh
./test-native.sh
./test-linuxcnc-source-link.sh
./build-wasm.sh
```
`check-linuxcnc-workstreams-source-map.sh` keeps the six-workstream architecture
list, source-map documents, guard scripts, LinuxCNC source anchors, and native /
source-link guard entry points synchronized.
source-link / build-wasm guard entry points synchronized.

View File

@@ -143,34 +143,45 @@ grep -F 'LinuxCNC source basis: the wasm build preflights and compiles the' buil
grep -F 'LinuxCNC source basis: manifest validation checks LinuxCNC-root relative' check-linuxcnc-inputs.sh >/dev/null
grep -F 'LinuxCNC source basis: this guard keeps the local source map aligned' check-linuxcnc-rs274-source-map.sh >/dev/null
grep -F './check-linuxcnc-rs274-source-map.sh' test-native.sh >/dev/null
grep -F './check-linuxcnc-rs274-source-map.sh' build-wasm.sh >/dev/null
grep -F 'LinuxCNC source basis: this guard keeps the kinematics source map aligned' check-linuxcnc-kinematics-source-map.sh >/dev/null
grep -F './check-linuxcnc-kinematics-source-map.sh' test-native.sh >/dev/null
grep -F './check-linuxcnc-kinematics-source-map.sh' build-wasm.sh >/dev/null
grep -F 'LinuxCNC source basis: this guard ties browser OPFS parameter persistence' check-linuxcnc-opfs-source-map.sh >/dev/null
grep -F './check-linuxcnc-opfs-source-map.sh' test-native.sh >/dev/null
grep -F './check-linuxcnc-opfs-source-map.sh' build-wasm.sh >/dev/null
grep -F 'LinuxCNC source basis: this guard ties generated switchkins/remap aliases' check-linuxcnc-switchkins-remap-source-map.sh >/dev/null
grep -F './check-linuxcnc-switchkins-remap-source-map.sh' test-native.sh >/dev/null
grep -F './check-linuxcnc-switchkins-remap-source-map.sh' test-linuxcnc-source-link.sh >/dev/null
grep -F './check-linuxcnc-switchkins-remap-source-map.sh' build-wasm.sh >/dev/null
grep -F 'LinuxCNC source basis: this guard ties Node/browser WASM smoke coverage' check-linuxcnc-wasm-smoke-source-map.sh >/dev/null
grep -F './check-linuxcnc-wasm-smoke-source-map.sh' test-native.sh >/dev/null
grep -F './check-linuxcnc-wasm-smoke-source-map.sh' test-linuxcnc-source-link.sh >/dev/null
grep -F './check-linuxcnc-wasm-smoke-source-map.sh' build-wasm.sh >/dev/null
grep -F 'LinuxCNC source basis: this guard ties native/source-link/WASM build entry' check-linuxcnc-build-source-map.sh >/dev/null
grep -F './check-linuxcnc-build-source-map.sh' test-native.sh >/dev/null
grep -F './check-linuxcnc-build-source-map.sh' test-linuxcnc-source-link.sh >/dev/null
grep -F './check-linuxcnc-build-source-map.sh' build-wasm.sh >/dev/null
grep -F 'LinuxCNC source basis: this guard ties the browser app entry point' check-linuxcnc-browser-app-source-map.sh >/dev/null
grep -F './check-linuxcnc-browser-app-source-map.sh' test-native.sh >/dev/null
grep -F './check-linuxcnc-browser-app-source-map.sh' test-linuxcnc-source-link.sh >/dev/null
grep -F './check-linuxcnc-browser-app-source-map.sh' build-wasm.sh >/dev/null
grep -F 'LinuxCNC source basis: this guard ties the six active workstream contexts' check-linuxcnc-workstreams-source-map.sh >/dev/null
grep -F './check-linuxcnc-workstreams-source-map.sh' test-native.sh >/dev/null
grep -F './check-linuxcnc-workstreams-source-map.sh' test-linuxcnc-source-link.sh >/dev/null
grep -F './check-linuxcnc-workstreams-source-map.sh' build-wasm.sh >/dev/null
grep -F 'LinuxCNC source basis: this guard ties LinuxCNC tooldata/Submakefile' check-linuxcnc-tooldata-source-map.sh >/dev/null
grep -F './check-linuxcnc-tooldata-source-map.sh' test-native.sh >/dev/null
grep -F './check-linuxcnc-tooldata-source-map.sh' test-linuxcnc-source-link.sh >/dev/null
grep -F './check-linuxcnc-tooldata-source-map.sh' build-wasm.sh >/dev/null
grep -F 'LinuxCNC source basis: this guard ties the documented WASM blocker map' check-linuxcnc-wasm-blockers-source-map.sh >/dev/null
grep -F './check-linuxcnc-wasm-blockers-source-map.sh' test-native.sh >/dev/null
grep -F './check-linuxcnc-wasm-blockers-source-map.sh' test-linuxcnc-source-link.sh >/dev/null
grep -F './check-linuxcnc-wasm-blockers-source-map.sh' build-wasm.sh >/dev/null
grep -F 'LinuxCNC source basis: this guard ties the documented wasm-safe shim map' check-linuxcnc-wasm-shims-source-map.sh >/dev/null
grep -F './check-linuxcnc-wasm-shims-source-map.sh' test-native.sh >/dev/null
grep -F './check-linuxcnc-wasm-shims-source-map.sh' test-linuxcnc-source-link.sh >/dev/null
grep -F './check-linuxcnc-wasm-shims-source-map.sh' build-wasm.sh >/dev/null
grep -F 'LinuxCNC source basis: the cached input checker keys check-linuxcnc-inputs.sh' check-linuxcnc-inputs-cached.sh >/dev/null
grep -F 'LinuxCNC source basis: switchkins/remap table validation derives M428/M429/M430' check-linuxcnc-switchkins-remap-table.sh >/dev/null
grep -F 'LINUXCNC_ROOT="$linuxcnc_root" ./check-linuxcnc-inputs-cached.sh "$manifest" --require-kinematics-complete' check-linuxcnc-switchkins-remap-table.sh >/dev/null