Guard SDK sim-config staging paths

This commit is contained in:
2026-06-13 20:12:15 +08:00
parent ea2537e4e3
commit 7fae830726
3 changed files with 133 additions and 2 deletions

View File

@@ -1822,3 +1822,67 @@ semantics。
```bash
git status --short && git log -5 --oneline && tail -n 120 text7.txt && awk '/^[一二三四五六七八九十百]+、/ {print}' text7.txt | sort | uniq -d
```
三十一、2026-06-13 继续执行记录SDK sim-config staging path guard
1. 本批目标。
继续 staged path guard inventory 第二十六轮,处理 SDK sim-config staging plan 在 Node
inventory 与 browser smoke 边界的 path map
```text
planSimConfigStaging(...)
simMachine(...)
loadSimMachineFiles(...)
```
2. 已完成改动。
- Node sim-config inventory 新增 `assertSimConfigStagingPlan(...)`
- Node `simMachine(...)` 将 `/work/sim-inventory/<machineRel>` 收敛为 expected root 并
检查 `plan.wasmDir`、`iniPath`、`programPath`、`file.path === file.wasmPath`、source
root 和 duplicate staged path
- browser smoke 新增同名 `assertSimConfigStagingPlan(...)`
- browser `loadSimMachineFiles(...)` 将 `/work/browser-sim/<machineRel>` 收敛为 expected
root 并同步检查 `plan.wasmDir`、`iniPath`、`programPath`、`file.path === file.wasmPath`、
source root 和 duplicate staged path
- 未修改 SDK planner、interpreter、INI、tool、parameter、OPFS bridge 或 LinuxCNC-owned
runtime semantics。
涉及文件:
```text
wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.mjs
wasm-port/tests/browser/interp_smoke.html
```
3. 已完成验证。
```bash
git diff --check
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_interp_browser.sh
wasm-port/tools/verify_vendor_sync.sh
wasm-port/tools/verify_no_standalone_cnc_semantics.sh
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_interp_wasm.sh
wasm-port/tests/host/verify_host_smokes.sh
```
提交建议:
```text
Guard SDK sim-config staging paths
```
4. 下一步工作建议。
继续 staged path guard inventory 第二十七轮,优先扫描 browser OPFS smoke 中仍以
inline string 形式散落的 `opfs_*_staging` 断言,挑选 machine text/session/default-path
相关的小批次收敛为专用 helper仍只加 browser/OPFS/SDK boundary guard不改变
LinuxCNC-owned interpreter、INI、tool、parameter 或 runtime semantics。
下一轮第一条命令仍保持:
```bash
git status --short && git log -5 --oneline && tail -n 120 text7.txt && awk '/^[一二三四五六七八九十百]+、/ {print}' text7.txt | sort | uniq -d
```