Skip to content

chore(release): rebase ByteFolk mem-mcp 0.1.2 and add MCP Registry OIDC (G5) - #222

Open
waterbro-8 wants to merge 7 commits into
mainfrom
feat/104-g5-bytefolk-0.1.2
Open

waterbro-8 wants to merge 7 commits into
mainfrom
feat/104-g5-bytefolk-0.1.2

Conversation

@waterbro-8

Copy link
Copy Markdown
Collaborator

Summary

Follows the G5 sequence for #104: align @bytefolk/mem-mcp@0.1.2 + io.github.bytefolk/mem-mcp, then add an OIDC Registry publish path.

Refs #104 #153. Successor to #193 (that PR is DIRTY against main).

Sequence remaining after this PR merges

  1. Founder: prove @bytefolk npm ownership (.github#22), bind Trusted Publisher, create environments npm-release and mcp-registry.
  2. Maintainer: tag v0.1.2 per docs/maintainers/releasing.md (not this PR).
  3. npm-publish.yml@bytefolk/mem-mcp@0.1.2.
  4. Dispatch MCP Registry Publish with 0.1.2.
  5. Paste Registry search receipt on mem-mcp 上架执行 G1–G6(MCP hubs 硬前置,运营派单) #104.

Test plan

  • npm/package.json is @bytefolk/mem-mcp 0.1.2 / mcpName io.github.bytefolk/mem-mcp
  • CI on this head
  • Do not dispatch Registry publish until npm 0.1.2 exists

PeterGuy326 and others added 5 commits September 18, 2026 09:37
Refs #153 and #122. Integrate package/MCP migration, verified legacy-cache compatibility, aligned version surfaces, and guarded next-only OIDC publication preparation. Preserve release-owner and independent review gates.

Co-authored-by: liyuanyang <liyuanyang@users.noreply.github.com>
Co-authored-by: waterbro-8 <318569545+waterbro-8@users.noreply.github.com>
After @bytefolk/mem-mcp is on npm with mcpName io.github.bytefolk/mem-mcp,
workflow_dispatch publishes registry metadata via mcp-publisher github-oidc.
Does not npm-publish or create tags. Environment mcp-registry is the founder gate.

Refs: #104 #153

@xiaocui-big xiaocui-big 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.

平台组 Review(崔泽生,assigned by @冯浩然)

总体印象

31 文件 +1622/-114,完成 @bytefolk/mem-mcp@0.1.2 的 npm 包重命名和 MCP Registry OIDC 发布路径(G5)。安全模型设计严谨:纯 OIDC 认证、禁 token 回退、严格版本/仓库/事件校验、--tag next 防意外 promote、NPM_RELEASE_PROOF 环境变量绑定 owner attestation。release guard 脚本 (scripts/npm-release.mjs) 的 checkContext / checkProof / checkPackage / checkRelease 四层校验覆盖了身份、来源、包元数据和 Release 资产一致性。

🔴 阻塞问题

1. CHANGELOG.md 缺少 ## [0.1.2]

CI validate_release_version 报错:CHANGELOG.md: 0.1.2 must be the first versioned section。当前 diff 只改了底部 link references([Unreleased] 比较基线从 v0.1.1 改为 v0.1.2,新增 [0.1.2] link),但没有在 ## [Unreleased]## [0.1.1] 之间插入 ## [0.1.2] 节头。需要把属于 0.1.2 的变更条目从 [Unreleased] 移到新的 ## [0.1.2] 节下。

2. npm-publish.ymlcheckProofexact 对象硬编码 channel: 'next'

scripts/npm-release.mjs 第 ~50 行 checkProof 要求 proof 中 channel 字段精确匹配 'next'。如果未来需要 hotfix 或 rc 发布走不同 channel,这里会 hold。当前 0.1.2 用 next 是正确的,但建议在 releasing.md 中明确记录这个约束和变更流程。

🟡 重要问题

3. node24-windows CI 失败:文件锁 EPERM

install.test.js:394 的 "independent processes contend on one lock" 测试在 Windows CI 上报 EPERM: mkdir 锁目录权限错误。这看起来是 CI 环境的 flaky test(temp 目录竞争),不是本 PR 引入的逻辑问题。建议:

  • 确认 acquireAssetLockmkdirSync 在 Windows 上是否需要 retry 或 recursive: true
  • 或标记该 test 为 skip-on-Windows-CI 并 track 到 follow-up issue

4. mcp-registry-publish.ymlmcp-publisher 下载无 pin

第 ~40 行 curl ... /releases/latest/download/mcp-publisher_...latest tag,没有 pin 到具体版本或 checksum。如果上游被替换或降级,CI 会静默拉不同二进制。建议 pin 到具体版本或加 sha256 校验。

5. npm-publish.ymlnpm install --global npm@11.15.0 无 integrity 校验

第 ~67 行直接从 registry 装固定版本 npm,但没校验 integrity。虽然 --ignore-scripts 降低了风险,但建议加 --checksum 或用 actions/setup-node 的 built-in npm version 管理。

🟢 次要

  • mcp-registry.server.json$schema URL 指向 2025-12-11 版本,确认是最新稳定 schema
  • scripts/npm-release.mjsASSETS 数组 6 个二进制 + 1 个 checksum = 7 项,与 checkReleaseexact seven release assets required 一致 ✅
  • package.jsonpublishConfig 未设置(由 workflow 动态传 --tag next --access public --provenance),checkPackage 允许空 publishConfig ✅
  • releasing.md 的 bootstrap 流程文档非常详细,RC → stable 序列清晰
  • migration.test.js (+291) 覆盖了旧缓存兼容和新包名解析 ✅

合并建议

Request Changes。修复 CHANGELOG ## [0.1.2] 节缺失(CI blocker)后可合。Windows flaky test 和 mcp-publisher unpinned download 可作为 follow-up。

@waterbro-8

Copy link
Copy Markdown
Collaborator Author

已推送修复到 9d3c0f10246dc9ca25a2b11a24506d8f514da38e

  • ## [0.1.2] - 2026-09-18,使现有 Added/Changed/Fixed/Security 条目归入首个版本节;release version validator 本地通过。
  • mcp-publisher 固定为上游 v1.8.1,Linux amd64/arm64 分别校验 GitHub Release 公布的 SHA-256,移除 releases/latest 和下载后直接解压。
  • 修复 node24-windows 的真实锁竞态:Windows 在另一进程持锁时可能由 mkdir 返回 EPERM/EACCES,且锁会在后续 lstat 前释放。现在仅对此“锁未观察到”的歧义状态给 250ms 有界重试;持续权限错误仍原样失败,不会被吞掉。
  • 同类并发扫描又修了两处 TOCTOU:锁目录递归删除的瞬态 ENOTEMPTY 有界重试;缓存目录在 realpathlstat 之间由另一安装器创建时重试,悬空 symlink 仍 fail closed。
  • 新增 3 个确定性回归用例。node --test install.test.js:34/34 通过(未使用 npm CLI)。
  • 文档明确 channel: next 是发布策略约束;改 channel 必须同步修改 proof validator、workflow assertions、回滚分析并独立 review。

未采纳“给 npm install --global npm@11.15.0--checksum”:npm install 没有该通用参数,固定版本从 registry 安装时会按 packument 的 dist.integrity 校验,凭空添加参数会让发布任务失败。

CI 正在对新 head 复验。原 Changes requested 绑定旧 head,请在 CI 通过后对最终 head 重新提交正式 review。

@waterbro-8

Copy link
Copy Markdown
Collaborator Author

最终 head 72b9347f60c828bb2ca015b45877496a23efb36f 的 CI 已全部通过(21/21):

  • Workflow, scripts and Compose
  • npm wrapper compatibility (node24-windows)
  • Go race / PostgreSQL / Web / Worker / CodeQL / security checks ✅

首轮 CI 暴露的 release guard fixture 也已修正:它原先只读取 6 行 MCP checksum manifest,却与 MCP + server 共 22 个资产比较;现在同时读取两个 manifest。完整 test_release_guards.sh 本地通过,其中 Node release guards 85/85。

@xiaocui-big 对最终 head 重新提交正式 review;当前作者账号不能自批。代码和 CI 侧已无已知合并阻塞。

@wadrzl wadrzl 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.

Review — Approve

Scope: #104 G5 release — rebase ByteFolk mem-mcp 0.1.2 and add MCP Registry OIDC publish path.

Analysis

  1. Version surface alignment ✅ — All 7+ surfaces consistently at 0.1.2: npm/package.json, npm/server.json, npm/mcp-registry.server.json, server/cmd/mem-mcp/main.go, deploy/helm/mem/Chart.yaml, worker/pyproject.toml, web/package.json. validate_release_version.sh gates this.

  2. Identity migration ✅ — npm scope @fullstack-ai-infra/mem-mcp@bytefolk/mem-mcp; MCP identity io.github.bytefolk/mem-mcp. registry-identity.test.js asserts mcpName against the repository owner the installer downloads from, preventing future drift. Legacy cache compatibility in install.js uses resolvedCachePath + assertSeparateLegacyCache with inode-level checks — old fullstack-ai-infra entries are never modified or removed.

  3. MCP Registry OIDC workflow ✅ — mcp-registry-publish.yml is workflow_dispatch only, gated by environment mcp-registry. Refuses to run unless npm @bytefolk/mem-mcp@VERSION exists with matching mcpName. mcp-publisher pinned by SHA256 per platform. OIDC login, no long-lived credentials. Readback verification against registry search API.

  4. npm publish hardening ✅ — npm-publish.yml now publishes to next (not latest), requires NPM_RELEASE_PROOF attestation with exact schema/versioning, forbids NPM_TOKEN/NODE_AUTH_TOKEN fallback, pins npm 11.15.0, verifies provenance and signatures. npm-release.mjs enforces: exact stable tag, canonical Actions context, OIDC availability, Node 24, no ambient npm config. readReleaseFile uses O_NOFOLLOW | O_NONBLOCK + fd-level read to prevent TOCTOU on assets.

  5. CHANGELOG ✅ — Compare links correct: [Unreleased]v0.1.2...HEAD, [0.1.2]v0.1.1...v0.1.2. Content covers all merged PRs since 0.1.1.

  6. Release documentation ✅ — docs/maintainers/releasing.md comprehensively documents the bootstrap sequence, Trusted Publisher setup, and owner attestation schema. Clearly separates "source preparation" from "owner actions". Records the 2026-09-10 naming decision and provenance of contributor work.

  7. CI ✅ — 21/21 checks green, including Go, PostgreSQL integration, HTTP/CLI/MCP lifecycle, cross-Node wrapper, Windows audit, CodeQL, security baseline, and deployment profiles.

  8. Test coverage ✅ — npm-release.test.mjs (355 lines) covers refusal paths, proof validation, asset verification. install.test.js expanded (+159 lines) for cache migration, legacy overlap detection. migration.test.js (291 lines) for namespace migration. registry-identity.test.js for identity consistency.

Minor observations (non-blocking)

  • npm-publish.yml step "Record next receipt" reads receipt.json with fs.readFileSync but appends it directly to GITHUB_STEP_SUMMARY without JSON validation — if the file is malformed the step fails, which is acceptable behavior.
  • mcp-registry-publish.yml uses python3 - heredocs for JSON manipulation, which is fine on ubuntu-24.04 runners but worth noting for portability.

No blocking findings. LGTM.

@wadrzl

wadrzl commented Sep 18, 2026

Copy link
Copy Markdown

@xiaocui-big 两条阻塞问题需要更正:

1. CHANGELOG ## [0.1.2] — 当前 PR head (72b9347) 的 CHANGELOG.md 第 9 行就是 ## [0.1.2] - 2026-09-18,在 ## [Unreleased]### Added 之间。CI 21/21 全绿,validate_release_version.sh 已通过。你 review 的 commit b57cf1c 也包含这个 section(由 59ac9ca chore(release): prepare ByteFolk mem-mcp 0.1.2 添加)。请重新检查。

2. mcp-publisher 下载 — 已经 pin 到 v1.8.1,且按平台校验 SHA256(MCP_PUBLISHER_LINUX_AMD64_SHA256 / MCP_PUBLISHER_LINUX_ARM64_SHA256),下载后 sha256sum --check --strict 不过会直接 exit 1。不是 latest 拉取。

这两条都不是问题,请 dismiss 你的 Changes Requested。

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.

4 participants