Repository navigation
fix(engine): 补上 ProtocolVersion 缺失的 minor 提升到 2.1.0 - #280
Merged
Merged
Conversation
2.0.0 之后新增了 groups.code 方法与 GroupsKillParams.ExpectRuns 字段,都属于 types.go 规则里的 additive change,但 ProtocolVersion 一直停在 2.0.0,导致 握手双方都自称 2.0.0 而能力并不相同。提升到 2.1.0 并重生成 schema。 Co-Authored-By: Claude Code <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
engine/internal/daemon/rpc/types.go:14规定的规则是:additive change 提升 minor,删除字段提升 major。历史照此执行:v2.0.0 之后有两个提交对协议做了新增:
557af8c9新增groups.code方法及GroupsCodeParams/GroupsCodeResult/ServiceCode7a0127e8给GroupsKillParams新增expect_runs字段与RunExpectation类型协议 schema 也确实变了(+121 行,含新方法
groups.code)。按规则ProtocolVersion应为2.1.0,实际仍是2.0.0。后果:v2.0.0 的客户端与当前 daemon 握手时双方都声称
2.0.0,但实际能力不同。7a0127e8的提交信息自己写明「daemon 通过groups.kill.expect_runs能力宣告该字段,旧 daemon 会静默丢弃它」,说明兼容性含义已知,只是版本号没跟上。改动
types.go:ProtocolVersion2.0.0 → 2.1.0,并在注释里记下 2.1.0 新增的两个内容,指明客户端应按能力位(CapabilityKillExpectRuns)判断,而不是按版本号protocol.schema.json:go generate ./internal/daemon/rpc/重生成,diff 只有protocol_version一行,无其他漂移验证
实际执行并通过:
python3 scripts/release.py --verify-only→ 完整门槛通过(含 race 与真实服务场景、266 个 helper 测试 OK / skipped=1、品牌几何校验)go generate ./internal/daemon/rpc/后确认 schema diff 仅版本号一行未执行:Windows 原生构建(由 PR 的 Windows checks 覆盖)。
🤖 Generated with Claude Code