Skip to content

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

Merged
PeterGuy326 merged 7 commits into
mainfrom
feat/104-g5-bytefolk-0.1.2
Sep 20, 2026
Merged

PeterGuy326 merged 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

@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.yml 中 checkProof 的 exact 对象硬编码 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 引入的逻辑问题。建议:

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

4. mcp-registry-publish.yml 的 mcp-publisher 下载无 pin

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

5. npm-publish.yml 的 npm 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.mjs 的 ASSETS 数组 6 个二进制 + 1 个 checksum = 7 项,与 checkRelease 的 exact seven release assets required 一致 ✅
  • package.json 的 publishConfig 未设置(由 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 有界重试;缓存目录在 realpath 与 lstat 之间由另一安装器创建时重试,悬空 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。

@waterbro-8

Copy link
Copy Markdown
Collaborator Author

Cleanup check after 胡奕舟 2026-09-19 09:21「你们的 pr 清理一下」.

@xiaocui-big the CHANGES_REQUESTED on this head looks stale:

  1. CHANGELOG ## [0.1.2] - 2026-09-18 is present as the first versioned section (line 9 of current CHANGELOG.md on head 72b9347f). CI on this head is green, including release-version validation.
  2. checkProof channel: 'next' you marked as suggestion, not merge-blocker.
  3. mcp-publisher unpinned download you marked as follow-up.

Please re-review current head 72b9347. I cannot self-approve CODEOWNERS / dismiss your request.

@sun-970 sun-970 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Independent review — Approve

Head 72b9347f60c828bb2ca015b45877496a23efb36f. mergeable: MERGEABLE. Hosted CI on this head is green (Go/Worker/Web, npm wrapper + node18/20/24-windows, PostgreSQL, HTTP/CLI/MCP lifecycle, CodeQL, Scorecard, deploy profiles).

What this PR does

G5 prep only: @bytefolk/mem-mcp@0.1.2 + mcpName io.github.bytefolk/mem-mcp, plus workflow_dispatch OIDC Registry publish. It does not tag, npm publish, or deprecate @fullstack-ai-infra/mem-mcp@0.1.1.

Checks

  1. Identity. npm/package.json / mcp-registry.server.json / checkPackage agree on name, 0.1.2, io.github.bytefolk/mem-mcp.
  2. CHANGELOG. ## [0.1.2] - 2026-09-18 is now the first versioned section (崔泽生 earlier blocker is fixed on this head).
  3. Registry workflow. github.repository == bytefolk/mem; version X.Y.Z; npm package must already exist with matching mcpName; environment mcp-registry; id-token: write; mcp-publisher v1.8.1 with linux amd64/arm64 SHA-256 pin (no /releases/latest).
  4. npm-publish. Token env names are refused; publishes --tag next with provenance; checkProof requires 24h owner attestation on environment npm-release.
  5. Guards. checkContext / checkProof / checkPackage / checkRelease (exact seven mem-mcp assets).

Non-blocking

  • checkProof.channel is hardcoded 'next' (correct for 0.1.2; document if a later channel is needed).
  • npm install --global npm@11.15.0 still has no integrity pin.
  • Founder still must create environments and Trusted Publisher before anyone dispatches publish.

Non-CODEOWNER. Do not dispatch Registry publish until npm 0.1.2 exists. 崔泽生的 CHANGES_REQUESTED 若仍挂在旧 head 上,请他在本 head 复审/dismiss。

@waterbro-8

Copy link
Copy Markdown
Collaborator Author

独立 Review 记录(head 72b9347):Approve(技术)。MERGEABLE,hosted CI 全绿。

这是 G5 预备:@bytefolk/mem-mcp@0.1.2 + io.github.bytefolk/mem-mcp,以及 OIDC Registry workflow_dispatch。本 PR 不打 tag、不 npm publish、不 deprecate 0.1.1。

核对过:package/mcpName 对齐;CHANGELOG 已有 ## [0.1.2](崔泽生之前的 CI blocker 在本 head 已修);Registry workflow 先查 npm 再 OIDC 发布;mcp-publisher pin 到 v1.8.1 + sha256;npm-publish 禁 token 回退、只发 next。

非阻塞:checkProof.channel 写死 next;全局 npm@11.15.0 无 integrity。

Founder 还要建 GitHub Environment mcp-registry / npm-release 和 npm Trusted Publisher。在 npm 0.1.2 存在之前不要 dispatch Registry。

@xiaocui-big 的 CHANGES_REQUESTED 还挂在旧 head b57cf1c。请在 72b9347 复审(approve 或明确仍要改)。CODEOWNERS 是 @PeterGuy326 @Bindy-lbb(作者 waterbro-8 不能自合)。本评论 不是 merge。

PeterGuy326 and others added 7 commits September 20, 2026 04:19
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
@waterbro-8
waterbro-8 force-pushed the feat/104-g5-bytefolk-0.1.2 branch 2 times, most recently from 5343aea to 63be5c5 Compare September 20, 2026 04:20

@sun-970 sun-970 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re-review on 63be5c5

Previous Approve was on 72b9347. This head is the rebase 胡奕舟 asked for, plus test(release): validate both checksum manifests. Hosted CI is green. G5 scope is unchanged:

  • @bytefolk/mem-mcp@0.1.2 / io.github.bytefolk/mem-mcp
  • this PR still does not tag, not npm publish, not deprecate 0.1.1
  • npm-publish.yml still publishes next only
  • Registry path remains workflow_dispatch + Environment mcp-registry

Non-blocking (same as before): do not dispatch Registry until npm 0.1.2 exists. I am not a CODEOWNER and will not merge.

@PeterGuy326 PeterGuy326 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-reviewed exact head 63be5c5 after rebase. Version surfaces and CHANGELOG remain aligned at 0.1.2; the Registry workflow is manual/OIDC-gated and refuses to run before the matching npm package exists; publisher binaries are pinned to v1.8.1 with per-platform SHA-256; npm publication remains next-only with no token fallback; no tag or publish side effect occurs in this PR. Hosted CI is fully green. Local Node release/install/migration tests passed 155/155. The standalone release-guard shell script also fails on current main at the same pre-existing empty-asset diagnostic on this macOS host, so that is not introduced by this PR. No blocking findings.

@PeterGuy326
PeterGuy326 merged commit 7b8bad3 into main Sep 20, 2026
21 checks passed
@PeterGuy326
PeterGuy326 deleted the feat/104-g5-bytefolk-0.1.2 branch September 20, 2026 06:08
waterbro-8 pushed a commit that referenced this pull request Sep 22, 2026
## Tracking record

Refs #174. Smallest resolution. Successor to dirty/unmerged #189,
rebased onto current main (minus the #222 workflow-scope bump on the
fork).

## Summary

Index-generation HTTP still advertised `execution_wired: true` with no
worker claiming targets. This PR makes the flag honest and fail-closed:

- `execution_wired: false` on list/status/events/cancel/resume/discard
- create / activate / rollback return `503 execution_unavailable` and
never call `Service.Create` / `Activate` / `Rollback`
- create still returns `400` for malformed JSON or empty `profile_id`
- empty-workspace activate is refused by the same 503
- `docs/INDEX_GENERATIONS.md` matches the routes that exist
- tests assert the flag **key is present** and false (`map[string]any`,
not a bool zero value)

Does **not** implement a worker executor (`ClaimTarget` loop). No
follow-up executor issue exists yet; that remains deferred.

## Validation ledger

| ID | Criterion | Command | Result |
|---|---|---|---|
| V1 | Flag vs capability; create/activate/rollback 503; empty activate
refused | `go test ./internal/api/ -run
'TestIndexGeneration\|TestExecutionWired\|TestEmptyWorkspace'` | PASS |
| V2 | Whitespace | `git diff --check` | PASS |

## Risk / rollback

Read-only status remains. Mutating create/activate/rollback become
actionable 503s instead of stuck or empty-active generations. Revert
restores the old advertisement.
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.

5 participants