feat(release): publish npm nightly snapshots - #4131
Conversation
Publish one exact developer snapshot across the four-platform npm package and Desktop builds, while preserving protected staged publication for formal releases. Make the sole Trusted Publisher caller verify the public npm version before exposing Desktop artifacts, and pin remote Runtime Host setup to that immutable version. Generated-by: OpenAI Codex
d759c76 to
1c61a08
Compare
Astro-Han
left a comment
There was a problem hiding this comment.
Thanks for taking on this release boundary. The overall ownership model is strong: OIDC remains limited to reviewed main workflow code, build jobs do not receive publication credentials, the Desktop handoff carries an exact version tied to the triggering run and source SHA, and Nightly remains clearly separate from an approved ASF source release.
I left one inline P1 on version ordering. The current implementation works while every Nightly shares the checked-in product version, but it deterministically prevents both npm and Desktop Nightly from advancing after the product version changes. This can be fixed without adding another state or ordering authority.
Reviewed with Codex and two independent deep-review agents. I verified the exact head, OIDC and artifact provenance, npm/Desktop lifecycle ownership, ASF source-release boundary, version ordering, and focused release contracts. I did not find another blocking provenance or architecture issue.
中文对照
谢谢你处理这个发布边界。整体职责模型是清晰的:OIDC 只交给 main 上经过审查的 workflow,构建任务不会获得发布凭据,Desktop 交接的是与触发 run 和 source SHA 绑定的精确版本,Nightly 也与经过批准的 ASF 源码发布保持了明确区分。
我在版本排序边界留了一条 P1 行内评论。当前实现只在已发布 Nightly 与仓库中的产品版本一致时有效;产品版本升级后,npm 和 Desktop Nightly 都会确定性地停止推进。这个问题不需要增加新的状态或排序 authority 就能修复。
本次审查使用了 Codex 和两个独立的深度审查子代理;我核对了精确 head、OIDC 与 artifact provenance、npm/Desktop 生命周期职责、ASF 源码发布边界、版本排序和针对性发布契约。除此之外,没有发现其他阻塞性的 provenance 或架构问题。
Astro-Han
left a comment
There was a problem hiding this comment.
Thanks for addressing this. I verified that the published Nightly is now parsed independently of the checked-in product version, while the candidate is still required to belong to the current product version. The globally monotonic run number remains the single ordering authority, without adding separate npm or Desktop compatibility state.
The cross-product-version case passes at the shared boundary, and the current test, package, and platform validation checks are green. The original P1 is resolved; I found no remaining blocking issue.
Reviewed with OpenAI Codex as an AI-assisted review; I verified the shared ordering implementation, npm and Desktop call paths, focused cross-version coverage, and current CI results.
中文对照
谢谢你处理这个问题。我确认了当前实现会独立解析已经发布的 Nightly,同时仍要求候选版本属于仓库中的当前产品版本。全局单调递增的 run number 仍然是唯一的排序 authority,没有为 npm 或 Desktop 增加额外的兼容状态。
跨产品版本的用例已在共享边界通过,当前 test、package 和各平台验证也都是绿色。原来的 P1 已解决,没有发现剩余的阻塞问题。
本次审查由 OpenAI Codex 辅助完成;我核对了共享排序实现、npm 与 Desktop 调用路径、跨版本定向测试和当前 CI 结果。
English
Summary
latest; developer snapshots advancenightly. There is nonextor product prerelease path.mainworkflow code. Formal publication treatsv<version>as verified product data, builds it in jobs without OIDC, and lets only the trustedmainpublisher submit the validated tarball to npm staging.run_numberthe single Nightly ordering authority. Nightly versions use0.2.0-dev.<run>.<date>, and both npm and Desktop reject any attempt to move their mutable channel backwards.workflow_runevent already owns the repository, run, and source commit.npm-publication.ymlowns npm,desktop-nightly.ymlowns Desktop Nightly, and the formal product release workflow owns stable Desktop releases.Verification
npm run check:release— 127 tests passednpm run lintnpm run format:checknpm run typecheckgit diff --checkRollout
After merge, wait for
.asf.yamlto reconcile thenpm-publicationEnvironment. It admits onlymainand intentionally has no GitHub reviewer gate so scheduled Nightly publication can run automatically.Configure the single
maka-agentnpm Trusted Publisher as:npm-publication.ymlnpm-publicationnpm publishandnpm stage publishThese are repository variables, not workflow inputs. Create them under
Settings → Secrets and variables → Actions → Variables, or enable npm Nightly with:Then dispatch
npm publicationfrommainwithchannel=nightlyand verify the exact public version plus thenightlydist-tag. Keep token publication disabled.npm Nightly does not depend on Desktop Infra. After the existing Nightlies rsync setup and signing secrets are ready, enable Desktop Nightly with:
Then start a fresh npm Nightly; its successful run triggers
Desktop Nightlywith the version-only artifact.Leave
latestabsent until the first approved stable release. Nightly advances onlynightly.AI use
Tool(s) and scope: OpenAI Codex implemented and verified the workflow boundaries, publication ordering, packaging validation, release-contract tests, and bilingual runbooks.
Checklist
Does this PR entail a change in behavior?
简体中文
概要
latest,开发快照推进nightly;不再存在next或产品预发布路径。main上已审查的工作流代码。正式发布仅把v<version>当作已验证的产品数据,在无 OIDC 的任务中完成构建;只有受信任的main发布器可以把验证后的 tarball 提交到 npm staging。run_number作为 Nightly 唯一的顺序权威。Nightly 版本格式为0.2.0-dev.<run>.<date>;npm 与 Desktop 都会拒绝让可变渠道倒退的发布。workflow_runevent 提供。npm-publication.yml负责 npm,desktop-nightly.yml负责 Desktop Nightly,产品正式发布工作流负责稳定版 Desktop。验证
npm run check:release——127 项测试通过npm run lintnpm run format:checknpm run typecheckgit diff --check上线步骤
合并后,等待
.asf.yaml同步出npm-publicationEnvironment。它只允许main;为保证定时 Nightly 自动运行,它有意不设置 GitHub reviewer gate。将
maka-agent唯一的 npm Trusted Publisher 配置为:npm-publication.ymlnpm-publicationnpm publish与npm stage publish它们是 repository variable,不是 workflow input。可以在
Settings → Secrets and variables → Actions → Variables中创建,或先用下面的命令启用 npm Nightly:然后从
maindispatchnpm publication并选择channel=nightly,验证公共 Registry 中的精确版本与nightlydist-tag。继续禁用 token publication。npm Nightly 不依赖 Desktop Infra。现有 Nightlies rsync 配置与签名 secrets 就绪后,用下面的命令启用 Desktop Nightly:
然后启动一次新的 npm Nightly;成功的 npm run 会通过只包含版本的 artifact 触发
Desktop Nightly。在第一个获批稳定版发布前保持
latest不存在。Nightly 只推进nightly。AI 使用
工具与范围:OpenAI Codex 实现并验证了工作流边界、发布顺序、打包验证、发布契约测试和双语 runbook。
Checklist
该 PR 是否会改变行为?