Skip to content

refactor(release): align npm preflight with ASF practice - #3481

Merged
M4n5ter merged 1 commit into
apache:mainfrom
M4n5ter:refactor/release-npm-preflight
Aug 22, 2026
Merged

refactor(release): align npm preflight with ASF practice#3481
M4n5ter merged 1 commit into
apache:mainfrom
M4n5ter:refactor/release-npm-preflight

Conversation

@M4n5ter

@M4n5ter M4n5ter commented Aug 22, 2026

Copy link
Copy Markdown
Member
English

Part of #3275.

Summary

  • Treat the source-RC npm workflow as a credential-free compatibility preflight, not as a second ASF release-artifact pipeline.
  • Remove the unsigned candidate handoff, ASF SHA-512 sidecar, provenance-record script, and the tests that existed only to preserve that unsupported contract.
  • Keep the meaningful controls: exact annotated source-RC tag and commit, current main ancestry, shared product identity, one clean-source tarball, and the supported platform/Eval validation matrix.
  • Inject the release commit's canonical DISCLAIMER-WIP into the published npm README, and retain Apache Maka (Incubating) branding in generated package metadata.
  • Document the post-approval publication boundary and the Apache OpenDAL incubating precedent.

Release boundary

The ASF vote remains over the signed source artifact. The npm preflight runs from an RC tag without publishing. After both source votes approve the candidate, the product Release workflow creates the final v<version> tag at the same commit; npm Stage then builds and validates the publication tarball from that tag, submits it through the protected npm-release Environment and OIDC, and leaves public approval to a 2FA-protected maintainer. Finalize verifies the registry bytes, integrity, signature, provenance, and dist-tag.

Apache OpenDAL used the same core pattern while incubating: RC tags validated the Node.js package without publication, final tags at the approved commit published npm, and the ASF distribution contained the signed source release rather than a separately signed npm tarball. Maka retains its stronger staged-publishing and post-publication controls.

The implementation currently retains maka-agent, but the project must record explicit mentor or ASF Brand confirmation before its first compliant publication. OpenDAL published the unprefixed opendal package throughout incubation, but that package predates OpenDAL's incubation entry whereas maka-agent does not. The precedent supports asking to retain the name; it does not settle Maka's naming decision.

Validation

  • npm run format:check
  • npm run lint
  • npm run check:release — 88 tests passed
  • mise exec go -- go run github.com/rhysd/actionlint/cmd/[email protected] .github/workflows/asf-npm-candidate.yml .github/workflows/ci.yml
  • npm run release:cli:pack
  • verified that the generated tarball README contains the release commit's canonical DISCLAIMER-WIP exactly once and no template marker
  • npm run release:cli:smoke — offline install and installed-product validation passed

References

AI assistance

This change was prepared with OpenAI Codex. A human contributor must review the release-policy interpretation, implementation, and generated package evidence before merge. Release, branding, and legal conclusions remain with the PPMC, mentors, IPMC, ASF Brand, and ASF Legal Affairs as applicable.

简体中文

#3275 的一部分。

摘要

  • 将 source RC 阶段的 npm workflow 定位为无凭据的兼容性预检,而不是第二套 ASF release artifact 流程。
  • 删除未签名 candidate handoff、ASF SHA-512 sidecar、provenance record 脚本,以及只用于维持该错误契约的测试。
  • 保留真正有价值的控制:精确 annotated source-RC tag 与 commit、当前 main 祖先关系、统一产品 identity、一次 clean-source tarball 构建,以及支持平台/Eval 验证矩阵。
  • 将 release commit 中权威的 DISCLAIMER-WIP 注入发布到 npm 的 README,并在生成的 package metadata 中保留 Apache Maka (Incubating) 品牌。
  • 记录源码获批后的发布边界,并引用 Apache OpenDAL 孵化期实践。

发布边界

ASF 投票对象仍是签名后的源码 artifact。npm 预检从 RC tag 运行,但不发布。两轮源码投票通过后,产品 Release workflow 在同一 commit 创建最终 v<version> tag;npm Stage 再从该 tag 构建并验证正式发布 tarball,通过受保护的 npm-release Environment 与 OIDC 提交,由启用 2FA 的 maintainer 人工批准公开。Finalize 校验公共 registry 字节、integrity、signature、provenance 与 dist-tag。

Apache OpenDAL 孵化期间采用了相同核心模式:RC tag 只验证 Node.js 包,最终 tag 在获批 commit 触发 npm 发布,ASF distribution 只包含签名源码 release,没有额外存放签名 npm tarball。Maka 同时保留更严格的 staged publishing 与发布后校验。

当前实现继续使用 maka-agent,但第一次合规发布前必须取得并记录 mentors 或 ASF Brand 的明确认可。OpenDAL 在孵化期间发布未加前缀的 opendal,但该包早于 OpenDAL 进入孵化器,而 maka-agent 并非如此。这个先例支持提出保留请求,不能替 Maka 解决命名判断。

验证

  • npm run format:check
  • npm run lint
  • npm run check:release——88 项测试通过
  • mise exec go -- go run github.com/rhysd/actionlint/cmd/[email protected] .github/workflows/asf-npm-candidate.yml .github/workflows/ci.yml
  • npm run release:cli:pack
  • 验证生成 tarball 的 README 精确包含一次 release commit 中权威的 DISCLAIMER-WIP,且没有残留模板 marker
  • npm run release:cli:smoke——离线安装与安装态产品验证通过

参考资料

AI 辅助说明

本变更由 OpenAI Codex 协助准备。合并前必须由人工贡献者审查发版政策解释、实现和生成包证据。发版、品牌与法律结论仍分别归 PPMC、mentors、IPMC、ASF Brand 和 ASF Legal Affairs 所有。

Treat source-RC npm builds as credential-free compatibility evidence and keep publication authority at the post-approval product tag. This removes the unsupported candidate handoff and signing model while retaining source identity, platform validation, staged publishing, and registry provenance controls.

Publish the canonical DISCLAIMER-WIP text in the npm README, and record that the OpenDAL precedent supports—but does not settle—the explicit ASF naming confirmation required for Maka's first publication.

Generated-by: OpenAI Codex
@M4n5ter
M4n5ter force-pushed the refactor/release-npm-preflight branch from 1070be3 to 78f82fe Compare August 22, 2026 10:50
@M4n5ter
M4n5ter marked this pull request as ready for review August 22, 2026 11:55

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

First-principles review of head 78f82fe.

  1. Problem. The source-RC npm workflow was a second ASF artifact pipeline: unsigned handoff, SHA-512 sidecar, candidate record, and pre-vote byte identity. npm is a convenience binary, not the ASF release. That contract was extra domain.

  2. Solution. Keep the useful preflight (annotated v<version>-incubating-rc<n> tag, commit identity, main ancestry, product identity, one clean-source tarball, platform/Eval matrix) and delete the unsupported handoff. Publication stays on the post-approval v<version> Stage/Finalize path. The packed English README receives the release commit's DISCLAIMER-WIP; the file is still shipped next to LICENSE/NOTICE. maka-agent naming is left open, with the OpenDAL precedent described as support for asking, not a decision.

  3. Occam. The remaining workflow is small and credential-free (contents: read, no id-token, no publish, no dist-tag). Tag format is not lost: the resolve step still sets SOURCE_REFERENCE_TAG, and product-release-identity.mjs parses v<version>-incubating-rc<n> and checks it against root/Desktop/CLI versions. Policy tests now assert the preflight contract instead of the deleted handoff.

Approve.

@M4n5ter
M4n5ter merged commit a2f4e6f into apache:main Aug 22, 2026
3 checks passed
@M4n5ter
M4n5ter deleted the refactor/release-npm-preflight branch August 22, 2026 13:24
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