Skip to content

ci: fix desktop release workflow permissions - #5092

Merged
liruifengv merged 1 commit into
mainfrom
fix/release-desktop-artifacts-actions-read
Nov 19, 2026
Merged

liruifengv merged 1 commit into
mainfrom
fix/release-desktop-artifacts-actions-read

Conversation

@kimi-agent-bot

Copy link
Copy Markdown
Collaborator

Requirement or Bug

release/2026-11-19 的 Release workflow 在任何 job 启动前被 GitHub 拒绝,导致发布流程无法继续。本 PR 补齐 reusable workflow 调用方缺失的最小权限,使 Release 能通过启动校验并继续既有版本 PR / 发布流程。

Bug Reproduction Steps

  1. 在 release/* 分支以当前 release.yml 触发 Release。
  2. desktop-artifacts 调用 desktop-build.yml 时,被调用方 matrix-source 需要 actions: read,调用方却未授予该权限。
  3. GitHub 在启动阶段判定 workflow 无效;失败实例:https://github.com/MoonshotAI/kimi-code/actions/runs/44480813910 (startup_failure,0 jobs)。

Root Cause

GitHub 要求 reusable workflow 各 job 声明的权限并集不能超过调用方持有的权限。desktop-artifacts 只声明了 contents: write 和 pull-requests: read,遗漏 desktop-build.yml 的 matrix-source 所需的 actions: read。这是针对调用方权限声明的根本修复,不改变构建或发布逻辑。

Code Changes

 desktop-artifacts.permissions
   contents: write
   pull-requests: read
+  actions: read

仅修改 .github/workflows/release.yml 一行,使调用方权限覆盖被调用方各 job 的权限并集;无产品代码、版本号、changeset、脚本或其他格式化改动。

Behavior Changes and Affected Users

Behavior Before After Who relies on the old behavior Escape hatch
Release 对 desktop-artifacts reusable workflow 的启动校验 因缺少 actions: read 在 jobs 启动前失败 权限并集完整,workflow 可进入既有 jobs release/* 发布维护者 N/A;恢复预期发布路径

没有 CLI、Desktop、VS Code 产品行为变化,也没有删除行为或翻转默认值。受影响模块仅为 Release workflow;权限修复由静态权限并集断言覆盖,既有发布行为由仓内 release workflow 测试覆盖。

验证
  • Node.js 24.15.0 下运行 node --test scripts/release.test.mjs scripts/release-trigger.test.mjs scripts/canary-release.test.mjs scripts/desktop-nightly-guard.test.mjs:39/39 通过。
  • pnpm 10.33.0 下运行 pnpm lint:通过,0 warnings / 0 errors。
  • 对 release.yml 与 desktop-build.yml 运行 yaml valid:通过。
  • 静态计算 desktop-build.yml 各 job 权限并集并断言调用方权限覆盖:通过;并集为 contents: write、pull-requests: read、actions: read。
  • git diff --check:通过;最终 diff 仅 1 行新增。

Checklist

  • I have read the CONTRIBUTING document.
  • Related issue: N/A;本次是维护者针对上述 Release 启动失败明确要求的 CI 修复。
  • Tests: 本次仅改 1 行 workflow 权限,未新增测试文件;已运行上述既有测试与静态权限回归检查。
  • The behavior-change table above is complete, and every removed behavior or flipped default is named in the changeset and either has an escape hatch or was explicitly approved by a maintainer in this PR.
  • Ran gen-changesets skill, or this PR needs no changeset.(CI-only,不需要 changeset。)
  • Ran gen-docs skill, or this PR needs no doc update.(无产品行为或用户文档变化。)

Requested by 李瑞丰 via Mira.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T08:00:56.942223Z 001ce47 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@changeset-bot

changeset-bot Bot commented Nov 19, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 001ce47

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Nov 19, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@001ce47
npx https://pkg.pr.new/@moonshot-ai/kimi-code@001ce47

commit: 001ce47

@liruifengv
liruifengv changed the base branch from release/2026-11-19 to main November 19, 2026 08:06
@liruifengv
liruifengv merged commit 08c5413 into main Nov 19, 2026
18 checks passed
@liruifengv
liruifengv deleted the fix/release-desktop-artifacts-actions-read branch November 19, 2026 08:06
kimi-agent-bot added a commit that referenced this pull request Nov 19, 2026
7723qqq pushed a commit to 7723qqq/kimi-code that referenced this pull request Nov 24, 2026
The fork's release workflow is gated to MoonshotAI with publishing
disabled, and its CI has no desktop-e2e/e2e-smoke/layered-qa workflows;
record MoonshotAI#5277, MoonshotAI#5092, MoonshotAI#5088, MoonshotAI#5084, MoonshotAI#5309 and MoonshotAI#5264 accordingly.
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