Skip to content

ci(r7.2): 落实 spz2glb 吸收项(PRE.10/12/13/14/16/18/19)+ 修 WASM 冒烟假绿 - #81

Merged
gugu23456789 merged 8 commits into
mainfrom
feature/spz-gatekeeper-r7.2-ci-lessons
Sep 12, 2026
Merged

gugu23456789 merged 8 commits into
mainfrom
feature/spz-gatekeeper-r7.2-ci-lessons

Conversation

@gugu23456789

Copy link
Copy Markdown
Member

背景

R7 计划 PRE 系列(spz2glb 经验吸收)中,PRE.20 索引明确标注的 📌 待落地项 一直未落实 —— R7_1c 当时只闭合了 wasm job 一段,其余被误记为"随 R7 一起完成"。本 PR 逐条核对现实并补齐,同时修掉其中一个真实缺陷。

变更清单

计划项 内容
PRE.14 7 个 | tee 步骤补显式 shell: bash + set -euo pipefail(不写 shell 时 GitHub 默认仅 bash -e,无 pipefail ⇒ 管道退出码取 tee(=0),失败被掩盖)
PRE.14(真实缺陷) WASM 冒烟测试 if node … | tee …; then 条件恒真 ⇒ 冒烟测试永远"通过"、重试与失败分支均为死代码。补 pipefail 后恢复真实判定
PRE.14 3 处关键产物 upload-artifact 补 if-no-files-found: error(native 二进制 / WASM 站点 ×2)
PRE.19 A 删除恒 ENOLOCK 且 continue-on-error: true 吞结果的 npm audit step(供应链面由 security-audit job 的 zizmor + npm install --ignore-scripts 承担)
PRE.12 macOS 双架构:macos-latest(=ARM64) 产出名从 -macos-x64 修正为 -macos-arm64,新增 macos-15-intel → -macos-x64;相关条件改 startsWith(matrix.os,'macos')
PRE.10 新增 mingw-syntax job:x86_64-w64-mingw32-g++ -fsyntax-only 动态校验全部含 _WIN32 的翻译单元(新增文件自动纳入)
PRE.10 新增 verify-native job(不 needs: build,与 build 矩阵解耦);wasm-pre-check.sh 增 --native-only 复用同一实现;补 CMake set(::) 语法守卫
PRE.13 Playwright 1.52.0 → 1.62.0;wasm_smoke_test.mjs 支持 SPZ_WASM_SMOKE_BROWSER(chromium/firefox/webkit,未知值 fail-loud);CI 逐引擎轮跑 + 逐引擎独立日志
PRE.16 + PRE.18 新增 scripts/changelog-check.sh + release.yml changelog-check job(release 依赖之)—— tag 区间内每个 commit 必须已在 CHANGELOG 有记录,否则阻断发布;含 docs(scope): 自指豁免(前置,防无限回归)
PRE.19 E.3 Release 正文从 generate_release_notes 改为提取权威 CHANGELOG 的该版本段落(body_path);release job 补 fetch-depth: 0

验证

  • bash -n:scripts/changelog-check.sh / scripts/wasm-pre-check.sh 通过;node --check tests/wasm_smoke_test.mjs 通过
  • 4 个 workflow YAML 全部可解析;新 job 就位(ci:mingw-syntax/verify-native;release:changelog-check)
  • 抽取全部 run 块逐一 bash -n:仅 2 处 FAIL,均为既有 PowerShell 步骤(Configure CMake (Windows),非本轮引入)
  • zizmor --format plain --min-severity medium .github/workflows/ → No findings
  • shellcheck scripts/changelog-check.sh → 通过(已修掉 SC2015)
  • changelog-check.sh 功能测试(真实 tag 区间 v2.0.4..v2.0.5.1 / v2.0.5.1..HEAD):正确 fail-loud 并逐条列出缺失 commit;docs: 自指豁免生效;用法错误 rc=2

⚠️ Reviewer 需注意

  1. 新增发布阻断门:实测 v2.0.5.1..HEAD 有 16 个 commit 未记入 CHANGELOG ⇒ 今后打 tag 前必须先补全 CHANGELOG(这正是 PRE.16 的预期行为,非缺陷)
  2. 产物重命名(对外可见):-macos-x64 拆为 -macos-arm64 + -macos-x64;macos-15-intel 为 GitHub 新的 Intel macOS runner 标签
  3. 首跑风险:mingw-syntax 与三引擎冒烟首次在 CI 运行(本机无 x86_64-w64-mingw32-g++、无 Playwright,无法本地预验)

本机无法验证项

actionlint 本机不可用(仅 zizmor)⇒ workflow lint 的 actionlint 侧由 CI / security-audit job 覆盖。

PRE.14: | tee 步骤补 shell: bash + set -euo pipefail(不写 shell 时默认仅 bash -e,无 pipefail 会掩盖退出码);修真实缺陷——冒烟测试 if node … | tee 恒真(永远通过);3 处关键产物补 if-no-files-found: error
PRE.19 A: 删除恒 ENOLOCK 且 continue-on-error 吞结果的 npm audit step
PRE.12: macOS 拆 arm64(macos-latest)/x64(macos-15-intel),修 -macos-x64 名实错配;条件改 startsWith
PRE.10: 新增 mingw-syntax job(-fsyntax-only 动态校验 _WIN32 翻译单元)+ verify-native job(不 needs build)+ CMake set(::) 守卫 + wasm-pre-check.sh --native-only
PRE.13: Playwright 1.52.0→1.62.0 + 三引擎(SPZ_WASM_SMOKE_BROWSER,未知值 fail-loud)
PRE.16/18: 新增 scripts/changelog-check.sh + release.yml changelog-check job(阻断发布,含 docs(scope): 自指豁免)
PRE.19 E.3: Release 正文改从权威 CHANGELOG 提取(body_path)+ release job fetch-depth: 0
…b.h)

首跑 CI 日志:cpp/tests/test_fixtures.h:9 fatal error: zlib.h: No such file or directory。
仅 compat_check_test.cc 经 test_fixtures.h 引入 zlib.h(gen_fixture_test.cc / registry_cli_test.cc 无第三方头)。
补装 Ubuntu 的 MinGW 版 zlib 开发包(libz-mingw-w64-dev,装到 mingw 默认 sysroot include)。
…lder 强制读取 payload[copy_breakdown],自 52f7549 起漏此键 → .as<std::string>() 抛 BindingError)
@gugu23456789
gugu23456789 merged commit 6735a6d into main Sep 12, 2026
9 checks passed
gugu23456789 pushed a commit that referenced this pull request Sep 12, 2026
….0.5.3 补记缺陷③(CLI 退出码契约误判),PR #81 收尾归档
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants