Skip to content

fix: defer draft release validation - #17

Merged
peipeitu merged 1 commit into
mainfrom
feature/fix-release-repair-preflight
Jul 28, 2026
Merged

fix: defer draft release validation#17
peipeitu merged 1 commit into
mainfrom
feature/fix-release-repair-preflight

Conversation

@peipeitu

Copy link
Copy Markdown
Owner

目标

修复 v0.1.8 repair workflow 在 Preflight 阶段错误报告 Draft Release 不存在的问题。根因是 Preflight 仅有 contents: read,无法读取 Draft Release;真正负责发布的 Release job 已有 contents: write

实现

  • Preflight 能读取目标 Release 时,继续按 Draft/Published 状态执行原有版本顺序校验。
  • Preflight 无法读取目标时,仅校验 tag 不会让发布顺序倒退,并将 Release 存在性检查延后到 Release job。
  • Release job 继续通过 release-policy.js 严格要求 repair target 必须存在,不扩大 Preflight token 权限。
  • 新增工作流回归测试,确保 Preflight 不再把不可见 Draft 直接判为不存在。

兼容性与风险

  • 仅修改 GitHub Actions 发布编排和测试,不改变应用运行时、安装包内容或 v0.1.8 tag/source。
  • 缺失的 repair target 仍会在 Release job 上传或发布前失败,不会被静默创建或覆盖。

本地验证

  • npm test:Node 42 passed;Rust 65 passed、1 ignored(benchmark fixture)。
  • npm run fmt:check:通过。
  • npm run lint:通过,Clippy 无 warning。
  • git diff --check:通过。

@peipeitu
peipeitu marked this pull request as ready for review July 28, 2026 02:43
@peipeitu
peipeitu merged commit 71914ab into main Jul 28, 2026
4 checks passed
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.

1 participant