chore: release v2.2.0 - #401
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
代码评审报告: chore: release v2.2.0
风险等级: 中
处理建议: 请求修改
决策摘要: 版本 bump 本身覆盖完整且 changelog 事实准确,但发版范围内漏了两处版本引用(README 的 "Current Release Snapshot" 仍写 2.1.1,mcp-web-fetch 运行时 VERSION 常量与 User-Agent 仍是 2.1.1),两者都随 npm 包发布,打 tag 前补齐即可合并。
级联分析
- 变更符号: 无代码符号变更;仅 14 个
package.json的version字段 + 3 个 changelog + 1 个新增 release note。 - 受影响流程:
pnpm build→scripts/sync-vscode-version.mjs(已确认按 root version 同步apps/vscode/package.json,本 PR 已手工对齐,脚本不会再改写);npm 发布产物(rootfiles含README.md、CHANGELOG.md、docs/releases/**);desktop release workflow 按 version tag 产出 zip(apps/desktop已同步 2.2.0)。 - 变更集外调用方: 全仓 grep
2.1.1(排除 changelog/lockfile)发现 3 处遗留:README.md:55,58,60、docs/README-CN.md:54,57,59、packages/mcp-web-fetch/src/types.ts:5与src/engine.ts:41。apps/cli/package.json仍为0.1.0,但 v2.1.1 时代亦然(属工作区内部包,被 root bundle 打进dist/index.mjs),判定为既有约定而非本 PR 回归。 - 置信度: medium(无代码图谱证据,结论来自仓库只读检查 + 全仓文本搜索;对 metadata/docs 类变更该证据强度足够,但 #386/#392/#400 的 issue 上下文未提供,相关 changelog 条目只能对照代码而非验收标准核验)
问题发现
-
[中] README 发布快照未随本次 bump 更新,且与本 PR 自己的 VS Code changelog 自相矛盾
- 证据:
README.md:55"currently aligned onfrontagent@2.1.1"、README.md:58"packagesapps/vscode/frontagent-2.1.1.vsix"、README.md:60"v2.1.1 focus: ...";中文版同段docs/README-CN.md:54,57,59。而本 PR 新增的apps/vscode/CHANGELOG.md:9声明 "Build output now packages thefrontagent-2.2.0.vsixartifact"。rootpackage.json:15的files包含README.md,该文件会作为 2.2.0 的 npm 包首页发布。 - 受影响调用方/流程: npm 包页面、仓库首页、中文文档读者;
docs/releases/v2.1.1.md:56-57显示该"版本快照"段落是历次发版都维护的字段。 - 最小可行修复: 把
README.md:55,58,60与docs/README-CN.md:54,57,59的2.1.1改为2.2.0,并把 "focus" 一行换成 2.2.0 的要点(桌面端 / headless / session resume / 权限规则)。
- 证据:
-
[中]
@frontagent/mcp-web-fetch的包版本与运行时版本常量脱钩- 证据:
packages/mcp-web-fetch/package.json:3升至2.2.0,但packages/mcp-web-fetch/src/types.ts:5仍为export const VERSION = '2.1.1'(经src/index.ts:18对外导出),packages/mcp-web-fetch/src/engine.ts:41的DEFAULT_USER_AGENT = 'frontagent-mcp-web-fetch/2.1.1 (+https://github.com/frontagent)'也独立硬编码同一版本号。 - 受影响调用方/流程: 该常量是公共导出,UA 会出现在对外 HTTP 请求头里;对照其他 adapter(
packages/mcp-web/src/server.ts:24、packages/mcp-file/src/server.ts:32用与包版本解耦的'0.1.0'),mcp-web-fetch这两处显然是按发布版本写的,本次漏改即产生漂移,且下次发版会重复漏。 - 最小可行修复: 本次把两处改为
2.2.0;更彻底的做法是让engine.ts的 UA 复用VERSION,把版本号收敛到单一常量(可选,不阻塞)。
- 证据:
-
[低] 新增 release note 缺少历次版本都有的 Compatibility 段
- 证据:
docs/releases/v2.1.1.md:54-59有 "Compatibility"(CLI 版本、VS Code 扩展版本、Node>=20.0.0、VS Code^1.120.0),docs/releases/v2.2.0.md以 "Verification" 结束,无对应段落。这些 release note 通过 rootfiles的docs/releases/**/*随包发布。 - 受影响调用方/流程: 升级用户的兼容性判断;
apps/vscode/package.json:23确认 engine 仍为^1.120.0,信息现成。 - 最小可行修复: 在
docs/releases/v2.2.0.md末尾补 4 行 Compatibility,与 v2.1.1 模板一致。
- 证据:
-
[低] 验证证据与仓库锁定的 GitNexus 版本不一致,且 canonical 索引被推迟到后续分支
- 证据: PR 描述称索引"refreshed locally with gitnexus 1.6.9",但
package.json:81固定"gitnexus": "1.6.6",scripts/tests/workflow-rules.test.mjs:271断言assert.equal(pkg.devDependencies.gitnexus, '1.6.6');同时.gitnexus索引更新因 push 体积问题留在后续分支。 - 受影响调用方/流程: 本 PR 只改 metadata/docs,无符号变更,索引滞后不影响本次合并;但发版 commit 上的图谱证据会短暂失配,后续基于该索引的 CR 会降级。
- 最小可行修复: 不阻塞本 PR;在 PR 描述中明确记录后续索引分支的编号,并确认索引最终以仓库锁定的 1.6.6 重新生成(或同步更新 pin 与断言)。
- 证据: PR 描述称索引"refreshed locally with gitnexus 1.6.9",但
已核验为准确、无需改动的部分:#396 的 symlink 修复(apps/cli/src/index.ts:646-658 使用 realpathSync 回退,index.test.ts:197-225 覆盖 symlink/非直连/不存在路径)、#397 的 workflow 断言(scripts/tests/workflow-rules.test.mjs:531 已接受 vars 表达式)、guard 条目(packages/core/src/agent/agent.ts:96 传递 checks,packages/hallucination-guard/src/guard.test.ts:264 覆盖"禁用 fileExistence 仍拦截越界路径")、以及 Known Issues 中 hallucinationGuard.enabled 为 dead config 的自陈(全仓 .ts 内无任何 .enabled 读取点)。changelog 未发现夸大或虚假条目。
行级发现
- [packages/mcp-web-fetch/package.json:3] 包版本升到 2.2.0,但
src/types.ts:5的VERSION与src/engine.ts:41的 User-Agent 仍硬编码2.1.1;同批把这两处改为 2.2.0(或让 UA 复用VERSION)。 - [apps/vscode/CHANGELOG.md:9] 这里声明构建产物为
frontagent-2.2.0.vsix,但README.md:58仍写frontagent-2.1.1.vsix;更新 README/CN README 的发布快照段以消除矛盾。 - [docs/releases/v2.2.0.md:51] 相比
docs/releases/v2.1.1.md:54-59,本篇缺少 Compatibility 段;在此后补 CLI 版本、VS Code 扩展版本、Node>=20.0.0、VS Code^1.120.0四行。
Karpathy 评审
- 假设: PR 假定"只改版本字段和 changelog"就完成了发版,但仓库实际把版本号还散落在 README 快照段和
mcp-web-fetch运行时常量里;这个隐含假设是本次两处遗漏的根因。发版流程只有sync-vscode-version.mjs一处自动化,其余靠手工同步,无 gate 兜底。 - 简洁性: 无新增抽象、无投机性设计,changelog 组织按 Added/Fixed/Changed/Tests 分类清晰,中英双语内容对齐一致。
- 结构质量: 无结构退化。未跨越文件行数边界,未引入分支、wrapper 或共享路径特例。唯一可谈的结构点是
mcp-web-fetch版本号有两处独立真值来源,属既有问题,本次可顺手收敛但不强求。 - 变更范围: 范围克制且与 stated goal 完全对应,无夹带重构或格式噪声。
docs/CHANGELOG-CN.md在## [2.1.1]前多出一个空行,属可忽略的格式差异。 - 验证:
pnpm quality:precommit/pnpm contract:local对 metadata 变更是合适的验证强度,本 diff 无运行时行为可测。剩余风险在于没有任何自动检查能捕获"版本号漏改"这类遗漏(见缺失覆盖)。
缺失覆盖
- 无版本一致性 gate:建议在
scripts/tests/workflow-rules.test.mjs增加一条断言,校验所有非 private 工作区包的version与 rootpackage.json一致(apps/cli若属有意例外则显式加入白名单),可直接拦截本次这类遗漏。 - 无"发布文档不含过期版本号"检查:可在同一测试中断言
README.md/docs/README-CN.md的发布快照段包含当前 root version,避免每次发版靠人工 grep。 mcp-web-fetch的VERSION常量无测试锚定到package.json,导致导出版本与包版本可以静默漂移。
| { | ||
| "name": "@frontagent/mcp-web-fetch", | ||
| "version": "2.1.1", | ||
| "version": "2.2.0", |
There was a problem hiding this comment.
包版本升到 2.2.0,但 src/types.ts:5 的 VERSION 与 src/engine.ts:41 的 User-Agent 仍硬编码 2.1.1;同批把这两处改为 2.2.0(或让 UA 复用 VERSION)。
| - Bundled runtime migrated to the AI SDK v5 line; the OpenAI provider now explicitly targets the Chat Completions endpoint for OpenAI-compatible base URLs. | ||
| - Inherited the guard, planner, session-resume, and lifecycle-hook fixes from the 2.2.0 core packages. | ||
| - Kept the minimum VS Code engine requirement at `^1.120.0`. | ||
| - Build output now packages the `frontagent-2.2.0.vsix` artifact through the root `pnpm build` script. |
There was a problem hiding this comment.
这里声明构建产物为 frontagent-2.2.0.vsix,但 README.md:58 仍写 frontagent-2.1.1.vsix;更新 README/CN README 的发布快照段以消除矛盾。
| ## Verification | ||
|
|
||
| - `pnpm quality:precommit` (lint, typecheck, workspace tests, workflow rules) green at release. | ||
| - CLI symlink invocation verified against the packaged bundle (`fa --version` via a bin symlink). |
There was a problem hiding this comment.
相比 docs/releases/v2.1.1.md:54-59,本篇缺少 Compatibility 段;在此后补 CLI 版本、VS Code 扩展版本、Node >=20.0.0、VS Code ^1.120.0 四行。
…to 2.2.0 Address Repo Guard review on #401: README/CN release snapshots, the mcp-web-fetch VERSION constant and default User-Agent, and the missing Compatibility section in the v2.2.0 release note. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
代码评审报告: chore: release v2.2.0
风险等级: 低
处理建议: 评论
决策摘要: 可以合并——版本元数据与文档在整个 workspace 内一致,仓库内已无遗留 2.1.1 引用(除历史 changelog / release notes 与一段 UA 测试夹具),两条非阻塞项是 mcp-web-fetch 里手工维护的版本常量缺少同步门禁,以及 PR 描述中关于 .gitnexus 后续分支的说法与仓库实际状态不符。
级联分析
- 变更符号:
VERSION(packages/mcp-web-fetch/src/types.ts:5)、DEFAULT_USER_AGENT(packages/mcp-web-fetch/src/engine.ts:41),其余为 12 个 workspace package 的version字段与文档。 - 受影响流程: CLI
--version(apps/cli/src/version.ts向上查找 name 为frontagent的 package.json → 根package.json现为2.2.0,解析正确);pnpm build的 VS Code 版本同步(scripts/sync-vscode-version.mjs以根版本为准,apps/vscode/package.json:5已手工对齐,脚本将成为 no-op);web_fetch 出站请求的user-agent头。 - 变更集外调用方:
packages/mcp-web-fetch/src/index.ts:18重导出VERSION,无断言其字面值的测试;engine.ts的 UA 常量无外部消费者与测试断言(text search)。apps/vscode/src/package.test.ts不校验版本字段(text search)。apps/cli/package.json仍为0.1.0,与apps/cli/src/version.test.ts中@frontagent/cli被跳过、只取frontagent的行为一致,属既有约定而非漏改。 - 置信度: medium(
.gitnexus/meta.json的索引快照为 2026-07-12 / commit51fd4bb,索引本体不在本 checkout 中,因此上述调用方结论来自 text search 而非图谱遍历;对纯版本/文档变更该证据强度足够)。
问题发现
-
[中] mcp-web-fetch 的版本常量手工维护,无同步门禁
- 证据:
packages/mcp-web-fetch/src/types.ts:5的VERSION = '2.2.0'与packages/mcp-web-fetch/src/engine.ts:41的frontagent-mcp-web-fetch/2.2.0都是字面量,与packages/mcp-web-fetch/package.json:3构成三处同源副本。仓库现有的版本同步只覆盖 VS Code(scripts/sync-vscode-version.mjs仅比对根 package.json 与apps/vscode/package.json),scripts/tests/workflow-rules.test.mjs中也没有任何跨包版本一致性断言(text search)。 - 受影响调用方/流程: 本次三处都改对了,所以当前无行为问题;风险在下一次 release——
VERSION经index.ts:18对外导出,UA 会出现在所有 web_fetch 出站请求头中,漂移后不会被任何测试或门禁捕获。 - 最小可行修复: 在 mcp-web-fetch 现有测试里加一条断言,读取本包
package.json并校验VERSION与 UA 中的版本片段相等(或让二者从 package.json 派生),把发布期的人工检查变成机器可校验项。
- 证据:
-
[低] PR 描述中的
.gitnexus后续分支说明与仓库状态不一致- 证据:
.gitignore:82忽略.gitnexus,本 checkout 中仅有未被跟踪的meta.json/lbug;.github/workflows/contract-guard.yml:33在 PR 上执行pnpm contract:gitnexus,由 CI 自行analyze --index-only生成索引。 - 受影响调用方/流程: 无代码影响;但描述会让维护者以为存在一个必须跟进合入的 78MB 索引提交,从而误判发布收尾步骤。
- 最小可行修复: 更新 PR 描述,说明索引目录已被忽略、由 contract-guard 在 CI 重建,不需要后续分支;若确有需要跟踪的索引产物,请指明其实际路径。
- 证据:
行级发现
- [packages/mcp-web-fetch/src/types.ts:5] 该版本字面量与本包
package.json和engine.ts:41的 UA 字符串是三份手工同步的副本,且无测试或门禁约束;建议加一条从package.json读取版本并断言相等的测试,避免下个 release 静默漂移。
Karpathy 评审
- 假设: 隐含假设是「所有版本字面量都被人工找全」。本次核对通过——除历史 changelog、
docs/releases/v2.1.1.md、docs/architecture.md:106(章节号)和apps/desktop/src/renderer/selectBridge.test.ts:6(UA 夹具字符串,与产品版本无关)外,无遗留2.1.1。 - 简洁性: 无新增抽象,diff 为纯数值/文档替换,符合发布变更的最小形态。
- 结构质量: 未引入分支、wrapper 或新层级;唯一的结构性弱点是既有的版本常量三处重复(见问题 1),本 PR 未加剧但也未收敛。
- 变更范围: 22 个文件全部可追溯到「bump 到 2.2.0 + 发布文档」这一目标,无夹带重构或格式噪声。
- 验证: 无法在本环境复现
pnpm quality:precommit/pnpm contract:local的结果,仅能确认现有测试不会因这两个常量变更而失败(无断言耦合);变更风险低,与验证强度匹配。文档中的关键事实断言已抽查一致:packages/core/package.json:30ai@^5.0.199、package.json:75与packages/mcp-file/package.json:31ts-morph@^28.0.0、package.json:104node >=20.0.0、apps/vscode/package.json:23vscode ^1.120.0;Known Issues 中「hallucinationGuard.enabled仍是 dead config」也属实——packages/core/src/agent/agent.ts:96只读取config.hallucinationGuard?.checks。
缺失覆盖
- 缺少跨 workspace 的版本一致性检查:目前只有 VS Code 版本由
scripts/sync-vscode-version.mjs保证,packages/*/package.json、apps/desktop/package.json与 mcp-web-fetch 的两个源码常量完全依赖人工。建议在scripts/tests/下补一条测试,断言所有非 private 发布包版本与根版本相等,并覆盖 mcp-web-fetch 的VERSION/ UA。 - 发布文档中「CLI symlink invocation verified against the packaged bundle」是人工验证记录,本次 diff 未包含对应回归覆盖;若希望 #396 长期不回归,可确认
apps/cli/src/index.test.ts中的 symlink 入口用例是否已在 2.2.0 之前合入(本 PR 不新增,也不阻塞合并)。
| export type { FetchOptions, FetchResult } from './engine.js'; | ||
|
|
||
| export const VERSION = '2.1.1'; | ||
| export const VERSION = '2.2.0'; |
There was a problem hiding this comment.
该版本字面量与本包 package.json 和 engine.ts:41 的 UA 字符串是三份手工同步的副本,且无测试或门禁约束;建议加一条从 package.json 读取版本并断言相等的测试,避免下个 release 静默漂移。
Findings 1-3 fixed in 080f038 and confirmed by Repo Guard's follow-up review on that commit (低/可以合并); finding 4 recorded in the PR description for the index follow-up branch.
Linked Issue Or Context
Summary
CHANGELOG.md,docs/CHANGELOG-CN.md, andapps/vscode/CHANGELOG.md; adddocs/releases/v2.2.0.md(incl. Compatibility section).mcp-web-fetchruntimeVERSIONconstant + default User-Agent to 2.2.0 (Repo Guard findings 1–3, addressed in 080f038).Impact Scope
packages/mcp-web-fetch; no behavioral code.GitNexus Impact Summary
scripts/tests/coverage unchanged and passing.gitnexusupdate is staged on local branchchore/gitnexus-index-2.2.0because the ~78MB index blob exceeds what the current network path can push (repeated HTTP 408; SSH blocked). That follow-up will also reconcile the gitnexus devDependency pin (1.6.6) with the 1.6.9 binary used for the refresh, or regenerate under the pinned version (Repo Guard finding 4).pnpm quality:precommitgreen;pnpm contract:localpassed;packages/mcp-web-fetchvitest 44/44.Verification
pnpm quality:precommit: lint / typecheck / workspace tests / workflow rules all green.pnpm contract:local: GitNexus contract passed.packages/mcp-web-fetch: 44/44 tests green after version-constant alignment.Checklist
pnpm quality:precommit, or explained why it could not run.pnpm quality:localfor critical skeleton changes, or explained why it could not run. (Metadata-only; precommit + contract gates ran.)🤖 Generated with Claude Code