Skip to content

ci: publish core releases from isolated release branches - #4217

Merged
wbxl2000 merged 6 commits into
mainfrom
qer/core-release-workflow-main
Oct 14, 2026
Merged

wbxl2000 merged 6 commits into
mainfrom
qer/core-release-workflow-main

Conversation

@wbxl2000

@wbxl2000 wbxl2000 commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Requirement or Bug

只把核心仓及 VS Code 正式发布迁到 release 分支,保留现有发布实现。

Bug Reproduction Steps

N/A

Root Cause

N/A

Code Changes

main 积累 changeset
release/* → 维护 ci: release packages PR → 显式运行版本 PR CI
版本 PR 合入 → 等待同提交 push CI
  ├─ 原 Changesets npm 发布 → 原安装包构建、GitHub Release 上传
  └─ 扩展版本有变化 → 原 VSIX 构建、市场发布
完成后同步回 main,不再次发布
  • 只新增版本 PR 来源/目标/SHA 识别和同提交 CI 等待;普通 release push 不发布。
  • npm 发布、native 构建触发条件、模型配置生成、安装包清单及上传恢复原实现。
  • 删除先前版本的发布计划、保存 tarball/catalog、npm integrity 比对和完成状态/草稿发布机制;整条发布失败恢复后置。
  • 保留 Tower 测试修复:等待两条独立异步日志到齐,不假设日志先后;产品代码不变。该错误已在两边 CI 实际复现。

Behavior Changes and Affected Users

Behavior Before After Who relies on the old behavior Escape hatch
版本 PR main 自动生成 release/* 生成并主动调 CI 核心仓发布维护者 手动 Release 仅刷新 release 版本 PR
npm 正式发布 main 版本 PR 合入后发布 匹配 release 版本 PR 合入、同 SHA CI 成功后发布 CLI 发布维护者 发布分支迁移由维护者明确批准
CLI 安装包 本轮新发布 CLI npm 才构建 不变,继续依赖 publishedPackages CLI 发布维护者 本次不承诺 npm 已成功后的全流程恢复;失败另行处理
VS Code main 版本变化或独立 manual 发布 同一 release 审批及 CI 后,按 push 前后版本差异发布;main/独立 manual 不再发布 扩展发布维护者 在版本 PR 一并审批扩展范围;故障另行处理
文档站 main 发布流程调用 安装包上传后 dispatch 现有 main 文档工作流 文档维护者 原文档手动入口;部署结果独立检查
CDN / Desktop 独立流程 不变,不上传、不切 CDN、不改 Desktop 指针 CLI / Desktop 用户 原人工步骤

验证:4 项发布入口场景测试(普通 push/其他分支/fork、不匹配 PR、CI 失败、同 SHA 校验);完整 lint 含 type-aware;actionlint(ci.yml 原有 if:false 提示除外);diff 检查。原 native 发布实现完整恢复,不再引入新的恢复测试框架。未进行真实 npm、市场、签名构建或 CDN 发布。

迁移顺序:先 main #4217,再 release #4218。两者是流程改造 PR,不会直接发布。之后审核生成的版本 PR、CLI/扩展版本说明和 CI,经批准才合入版本 PR。发布后正常回同步版本/锁文件/changelog/已消费 changeset,保留 main 的后续工作。

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue (external PRs: issue must have a maintainer's /approve). N/A — 维护者直接要求的内部发布流程改造。
  • I have added tests that prove my feature works.
  • 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. 发布入口迁移由维护者明确批准;纯基础设施不增加产品 changeset。
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update. 仓内发布说明已更新。

Copilot AI balanced review requested due to automatic review settings October 14, 2026 13:18
@changeset-bot

changeset-bot Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 7e5f1e5

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T14:34:29.814016Z 7e5f1e5 Manual request
ℹ️ 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.

@pkg-pr-new

pkg-pr-new Bot commented Oct 14, 2026 •

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

commit: 7e5f1e5

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

预览技能仍硬编码旧主分支 PR,且测试未包含 PR 所声明的真实 pnpm pack 验证。

2 open findings
What changed in this PR

该 PR 将核心发布迁移至隔离的 release/* 分支,并通过固定 SHA、保存的 npm 输入及草稿 Release 支持同版本恢复。

Changes:

  • 新增可恢复的 npm、原生安装包和 GitHub Release 发布流程。
  • 增加版本计划、发布授权及完整性校验。
  • 调整 CI、文档部署和 VS Code 发布联动。
File Description
scripts/​version-release.mjs 生成固定发布计划。
scripts/​release-trigger.test.mjs 测试发布授权条件。
scripts/​release-trigger.mjs 校验版本 PR 与对应 CI。
scripts/​is-release-sync.mjs 识别 VS Code 元数据同步。
scripts/​core-release.test.mjs 覆盖发布及恢复场景。
scripts/​core-release.mjs 实现可恢复发布流程。
package.json 接入版本计划脚本。
apps/​kimi-code/​test/​scripts/​native/​release-artifacts.test.ts 测试 ZIP 校验失败。
apps/​kimi-code/​scripts/​native/​produce-manifest.mjs 校验 ZIP sidecar。
AGENTS.md 记录发布约束。
.gitignore 忽略本地发布输入。
.github/​workflows/​vscode-publish.yml 跳过发布元数据同步。
.github/​workflows/​release.yml 重构核心发布工作流。
.github/​workflows/​docs-deploy.yml 调整文档部署触发器。
.github/​workflows/​ci.yml 增加 release 分支 CI。
.github/​workflows/​_native-build.yml 复用保存的发布输入。
.changeset/​README.md 编写发布与恢复手册。
.agents/​skills/​pre-changelog/​SKILL.md 调整预览目标分支说明。
.agents/​skills/​gen-changesets/​SKILL.md 更新 changeset 分支说明。

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/core-release.test.mjs Outdated
Comment on lines +80 to +82
if (args.includes('pack')) {
const pkg=JSON.parse(fs.readFileSync(path.join(value('--dir'),'package.json')));
fs.writeFileSync(path.join(value('--pack-destination'),'package.tgz'),JSON.stringify(pkg));done();

### 1. Locate the release PR

Select the PR targeting the intended `release/*` branch, not the legacy main version PR. Report its latest head CI link and result alongside the preview.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4c95ada1ba

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".


### 1. Locate the release PR

Select the PR targeting the intended `release/*` branch, not the legacy main version PR. Report its latest head CI link and result alongside the preview.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Select the release branch's generated version PR

The new instruction says to use the PR targeting release/*, but the next selection rule still requires headRefName: changeset-release/main. Once the obsolete main version PR is closed, this makes pre-changelog report that no release PR exists instead of previewing changeset-release/release/<cycle>, so maintainers can miss the required changelog and CI review. Update the selector to derive the expected head from the selected release branch.

AGENTS.md reference: AGENTS.md:L76-L79

Useful? React with 👍 / 👎.

Comment on lines 3 to +4
on:
push:
branches:
- main
workflow_dispatch:
workflow_call:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Declare the removed VS Code publish triggers

Replacing both push and workflow_dispatch with only workflow_call removes main-based publication and the standalone manual recovery entry point for VS Code release maintainers, while the PR's behavior table says the workflow is unchanged and that syncing the version to main may still publish it. As gh workflow run --help confirms, a directly dispatched workflow must support on.workflow_dispatch; therefore the documented fallback no longer exists. Name this loss and its approved replacement in the behavior table rather than presenting the path as unchanged.

AGENTS.md reference: AGENTS.md:L104-L108

Useful? React with 👍 / 👎.

@wbxl2000

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1d4e6fadb8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread scripts/vscode-release-plan.mjs Outdated
Comment on lines +7 to +8
const entry = plan.packages.find(pkg => pkg.path === 'apps/vscode');
if (!entry) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Ensure private VS Code versions enter the release plan

When maintainers release a new extension version, this gate remains false because apps/vscode is private while .changeset/config.json does not enable privatePackages.version; Changesets therefore does not version that package by default (official configuration documentation). Consequently, version-release.mjs sees no VS Code version change and omits it from plan.packages; directly bumping package.json before running the command is also invisible because it is already present in the before snapshot. With the old push and manual triggers removed, marketplace publication is then silently skipped for every future extension release, so either enable private-package versioning or explicitly record an approved extension bump in the plan.

AGENTS.md reference: AGENTS.md:L122-L124

Useful? React with 👍 / 👎.

@wbxl2000

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 7e5f1e5260

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@wbxl2000
wbxl2000 merged commit d1c3b04 into main Oct 14, 2026
17 checks passed
@wbxl2000
wbxl2000 deleted the qer/core-release-workflow-main branch October 14, 2026 14:36
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.

3 participants