Repository navigation
feat: add bidirectional sidecar control session - #25
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
该 PR 在 Sidecar Session 协议中保留兼容的 OpenSession(server streaming),新增 OpenControlSession(双向 streaming)控制会话,并引入本地服务注册/注销及状态回执事件;同时将 Thin SDK 兼容契约升级到 3.0.0,补充文档与跨语言生成/契约测试更新。
Changes:
- 在
bootstrap.proto中新增OpenControlSession及ClientEvent/LocalService*消息与枚举,并同步到 Rust/Go 生成代码。 - 将 Thin SDK sidecar compatibility contract 从
2.0.0升级到3.0.0,更新验证策略描述与 Go 契约测试断言。 - 扩展 Thin SDK compatibility schema 的
sdk_language枚举以覆盖cpp与csharp,并更新兼容性文档说明。
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| thin-sdk/compatibility.schema.json | 扩展 sdk_language 枚举以包含 cpp/csharp。 |
| thin-sdk/compatibility.json | 将 sidecar 契约版本升级到 3.0.0 并更新 verification policy 文案。 |
| source/rust/pole-specification/src/pole.sidecar.v1.rs | 同步生成 Rust API:新增控制会话与本地服务事件/状态类型。 |
| source/rust/pole-specification/proto/bootstrap.proto | Rust crate 内 proto 定义更新:新增 OpenControlSession 与本地服务事件。 |
| api/v1/sidecar/bootstrap.proto | 权威 proto 更新:新增控制会话与本地服务注册/注销/状态。 |
| source/go/api/v1/sidecar/bootstrap.pb.go | 同步生成 Go API:新增控制会话、事件消息与枚举。 |
| source/go/thin_sdk_v2_contract_test.go | 更新 bootstrap proto 契约断言以覆盖新增 RPC/消息字段。 |
| source/go/thin_sdk_contract_test.go | 更新 compatibility contract 版本断言为 3.0.0。 |
| source/csharp/LatticeHub.Pole.Specification.Tests/GeneratedApiTests.cs | 更新 C# 生成代码测试以覆盖新增方法 OpenControlSession。 |
| COMPATIBILITY.md | 文档补充:解释 3.0.0 会话兼容策略与 listener/注册语义。 |
| context-kg/tasks/todo.md | 记录 v3 控制会话任务清单与 review 要点。 |
Files not reviewed (1)
- source/go/api/v1/sidecar/bootstrap.pb.go: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
50
to
+58
| func TestSidecarBootstrapProtoContract(t *testing.T) { | ||
| content, err := os.ReadFile("../../api/v1/sidecar/bootstrap.proto") | ||
| if err != nil { | ||
| t.Fatalf("read bootstrap proto: %v", err) | ||
| } | ||
| text := string(content) | ||
| for _, required := range []string{ | ||
| "rpc OpenSession(ClientHello) returns (stream SidecarEvent)", | ||
| "rpc OpenControlSession(stream ClientEvent) returns (stream SidecarEvent)", |
Comment on lines
+214
to
+215
| - [x] 验证 Go、Rust、Node.js、Python、Java、C# | ||
| - [ ] 通过 PR C++ 固定工具链验证 |
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.
概要
验证
本 PR 不创建 tag 或 GitHub Release。