Skip to content

Add cloud session config support#1306

Merged
tiagonbotelho merged 3 commits into
mainfrom
tiagonbotelho/cloud-session-config
May 18, 2026
Merged

Add cloud session config support#1306
tiagonbotelho merged 3 commits into
mainfrom
tiagonbotelho/cloud-session-config

Conversation

@tiagonbotelho
Copy link
Copy Markdown
Contributor

The runtime is adding a cloud option to session.create so SDK consumers can request cloud-backed remote sessions with repository metadata. This exposes that create-only option consistently across all SDK clients.

Summary

  • Add public cloud session option/repository types for Node, Python, Go, .NET, and Rust.
  • Forward cloud only on session creation payloads, leaving resume behavior unchanged.
  • Add focused serialization/forwarding coverage and document cloud session usage across clients.

Notes

Generated RPC/schema files were not updated because the current runtime schema does not expose the high-level session.create request used by these SDK clients.

Expose the session.create cloud option across SDK clients and forward repository metadata to the runtime.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 15, 2026 18:02
@tiagonbotelho tiagonbotelho requested a review from a team as a code owner May 15, 2026 18:02
@github-actions

This comment has been minimized.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 adds a create-only cloud session configuration option across all SDKs, allowing callers to request cloud-backed remote sessions and (optionally) attach GitHub repository metadata. The change forwards cloud only on session.create requests (not session.resume), adds serialization/forwarding tests, and documents usage.

Changes:

  • Add cloud session config/repository option types to Node, Python, Go, .NET, and Rust, and forward them on session.create.
  • Add targeted tests validating JSON serialization/forwarding behavior for the new cloud option.
  • Document “cloud sessions” usage across SDKs and note that it’s create-only; add an Unreleased changelog entry.
Show a summary per file
File Description
rust/tests/session_test.rs Extends SessionConfig serialization test to cover cloud.repository fields and omission when unset.
rust/src/types.rs Adds Rust CloudSessionOptions/CloudSessionRepository types and SessionConfig.cloud with builder.
python/test_client.py Adds a test ensuring cloud is forwarded in session.create payloads.
python/copilot/client.py Introduces Python CloudSessionOptions/CloudSessionRepository and forwards cloud in create_session.
python/copilot/init.py Exposes new cloud session types from the Python package.
nodejs/test/client.test.ts Adds a test asserting cloud is included in the session.create request.
nodejs/src/types.ts Defines TS CloudSessionOptions/CloudSessionRepository and adds cloud to SessionConfig.
nodejs/src/index.ts Re-exports the new TS cloud session types.
nodejs/src/client.ts Forwards cloud in the session.create JSON-RPC payload.
go/types.go Adds Go CloudSessionOptions/CloudSessionRepository and exposes SessionConfig.Cloud.
go/client.go Wires SessionConfig.Cloud into the session.create request payload.
go/client_test.go Adds JSON serialization tests for cloud presence/omission in create-session requests.
dotnet/test/Unit/SerializationTests.cs Adds a unit test validating create-session request JSON contains cloud.repository fields.
dotnet/test/Unit/CloneTests.cs Extends clone coverage to include SessionConfig.Cloud.
dotnet/src/Types.cs Adds .NET CloudSessionOptions/CloudSessionRepository and SessionConfig.Cloud cloning support.
dotnet/src/Client.cs Adds Cloud to the internal CreateSessionRequest record sent over JSON-RPC.
docs/features/remote-sessions.md Documents “Cloud sessions” usage across SDKs and clarifies create-only behavior.
CHANGELOG.md Adds an Unreleased entry describing the new cloud create-session option with examples.

Copilot's findings

  • Files reviewed: 18/18 changed files
  • Comments generated: 1

Comment thread docs/features/remote-sessions.md
@github-actions

This comment has been minimized.

Comment thread CHANGELOG.md Outdated
Copy link
Copy Markdown
Contributor

@SteveSandersonMS SteveSandersonMS left a comment

Choose a reason for hiding this comment

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

Looks great, thanks @tiagonbotelho!

Only change request is to not include the changelog content, since we'll generate that later. We don't have an "unreleased" section inside the changelog file as it would constantly conflict as we're working, plus we want our changelog generator to be able to summarize across all the work that's happened in a given release.

Remove the manual changelog entry and standardize Rust doc examples on the published crate name.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@tiagonbotelho
Copy link
Copy Markdown
Contributor Author

Accept. Thanks for the consistency review; this confirms the cross-SDK API and create-only behavior are aligned, so no code changes were needed for this comment.

@tiagonbotelho
Copy link
Copy Markdown
Contributor Author

Accept as a positive consistency check. I also removed the changelog examples in response to maintainer feedback, so the feature docs now carry the usage examples while release notes remain generated.

@github-actions
Copy link
Copy Markdown
Contributor

Cross-SDK Consistency Review ✅

This PR adds the cloud session option consistently across all five SDK implementations (Node.js/TypeScript, Python, Go, .NET, and Rust). No consistency gaps were found.

API surface comparison

Element Node.js Python Go .NET Rust
Repository type CloudSessionRepository CloudSessionRepository CloudSessionRepository CloudSessionRepository CloudSessionRepository
Options type CloudSessionOptions CloudSessionOptions CloudSessionOptions CloudSessionOptions CloudSessionOptions
Config field cloud?: CloudSessionOptions cloud: CloudSessionOptions | None Cloud *CloudSessionOptions Cloud CloudSessionOptions? cloud: Option<CloudSessionOptions>
Public export index.ts __init__.py ✅ (public struct) ✅ (public class) pub use types::*

Structural consistency

  • Field names: owner, name, branch (optional) — all SDKs match.
  • JSON serialization: all SDKs emit camelCase keys (owner, name, branch, repository, cloud) and omit cloud / branch when not set.
  • Create-only semantics: cloud is forwarded only in session.create payloads; none of the resume request types include it, in alignment with the documented note that cloud options apply only to new sessions.
  • Tests: each SDK includes a focused serialization/forwarding test for the new option.

Language-idiom notes (no action needed)

  • Go uses Branch string with omitempty rather than *string — idiomatic Go; runtime behavior is equivalent since an empty branch string is meaningfully the same as absent.
  • .NET uses Assert.Same (reference equality) for the clone test of Cloud — correct because SessionConfig.Clone() performs a shallow copy of reference-type fields that are themselves immutable value objects.

No inconsistencies found. 🎉

Generated by SDK Consistency Review Agent for issue #1306 · ● 447.9K ·

@tiagonbotelho tiagonbotelho added this pull request to the merge queue May 18, 2026
Merged via the queue into main with commit 8410ed2 May 18, 2026
43 checks passed
@tiagonbotelho tiagonbotelho deleted the tiagonbotelho/cloud-session-config branch May 18, 2026 09:13
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.

3 participants