bookworm-boot/tools
bookworm 609e82bac0 hotfix(v3.0.10): Base64 '-or' 括号 bug + dry-run 实跑验证护栏
v3.0.9 Base64 脚本启动即报:
  Test-Path: A parameter cannot be found that matches parameter name 'or'.
  claude.exe not found

根因: 'Test-Path (Join-Path $p claude.ps1) -or (Test-Path ...)' 中 -or
被当成 Test-Path 的命名参数. PSParser 静态检查看合法, 运行时炸.

修复:
  F1: 括号修正 — $hasClaude 抽为独立变量, 三元 -or 每项带外括号
  F2: gen-launcher-bats.ps1 强制加 dry-run 实跑验证护栏
      解码后的 Base64 脚本必须被 pwsh -File 实跑到底部 __BW_DRYRUN_OK__
      才算通过. 检查 ErrorRecord / ParameterBindingException / 未知命令.
      任何未来 Base64 改动都被此验证拦截.

验证层级教训:
  PSParser = 抓语法   / 抓不到参数绑定错
  dry-run  = 抓运行时 / 抓不到业务逻辑
  smoke    = 抓业务   / 需要前两层通过

EXE 220160 → 220672 bytes (+512)
2026-04-24 22:48:08 +08:00
..
gen-launcher-bats.ps1 hotfix(v3.0.10): Base64 '-or' 括号 bug + dry-run 实跑验证护栏 2026-04-24 22:48:08 +08:00