Skip to content

feat: migrate Thin SDK to sidecar control session - #1

Merged
chuntaojun merged 3 commits into
developfrom
codex/service-session-v2
Aug 5, 2026
Merged

chuntaojun merged 3 commits into
developfrom
codex/service-session-v2

Conversation

@chuntaojun

Copy link
Copy Markdown
Contributor

概要

  • 使用 OpenControlSession 双向 UDS 会话
  • 增加本地服务注册、注销、状态与重连重放
  • Specification 子模块固定到 develop 集成提交 2642bc29

验证

  • Proto descriptor 校验通过
  • 完整 C++ 构建由 PR CI 固定工具链验证

Copilot AI lite review requested due to automatic review settings August 5, 2026 18:28

Copilot AI 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.

Pull request overview

This PR migrates the Thin SDK’s Sidecar bootstrap from the legacy server-streaming OpenSession to the bidirectional OpenControlSession, and adds a local-service registration lifecycle that is replayed after reconnects.

Changes:

  • Switch Sidecar session establishment to OpenControlSession and handle first-frame listener snapshot plus subsequent status events.
  • Add local service register/unregister APIs, desired-state tracking, and reconnect replay.
  • Update README usage guidance and extend the sidecar session test to cover registration + replay + unregistration.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/sidecar_session_test.cc Updates the test server + client flow for OpenControlSession, and validates registration replay/unregistration behavior.
src/sidecar_session.cc Implements bidirectional control stream, desired registration replay, and local service status handling.
include/pole/client/sidecar_session.h Exposes new local-service registration/status APIs and adds internal state for replay/status tracking.
README.md Documents the new OpenControlSession behavior and the local service registration API.
context-kg/tasks/todo.md Adds a migration task checklist and verification notes.
Suppressed comments (1)

src/sidecar_session.cc:266

  • SendUnregistration ignores the return value of Write(). If the control stream is already closed, the unregister request is silently dropped and may not trigger a reconnect, so the desired state change can be delayed. Consider cancelling the active context when a write fails to force a reconnect.
  ::pole::sidecar::v1::ClientEvent event;
  event.mutable_unregister_local_service()->set_registration_id(registration_id);
  active_stream_->writer->Write(event);

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/sidecar_session.cc
wire_registration->set_service(registration.service);
wire_registration->set_protocol(ToWireProtocol(registration.protocol));
wire_registration->set_local_port(registration.local_port);
active_stream_->writer->Write(event);
@chuntaojun
chuntaojun merged commit ccb9d35 into develop Aug 5, 2026
2 checks passed
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.

2 participants