Skip to content

[Rust] Add wrapper for reading managed settings - #1987

Closed
jbrown1618 wants to merge 5 commits into
github:mainfrom
jbrown1618:jbrown1618-managed-settings-client
Closed

jbrown1618 wants to merge 5 commits into
github:mainfrom
jbrown1618:jbrown1618-managed-settings-client

Conversation

@jbrown1618

@jbrown1618 jbrown1618 commented Jul 14, 2026

Copy link
Copy Markdown

Summary

  • Add Client::read_managed_settings() as a top-level Rust SDK helper for the server-scoped managedSettings.read JSON-RPC method.
  • Add an opaque ManagedSettings JSON result type so the SDK preserves the runtime-owned canonical payload without reinterpreting policy.
  • Cover the helper with an in-memory JSON-RPC test that verifies it sends managedSettings.read with no session ID before any session.create call.

Dependency

The companion runtime change, github/copilot-agent-runtime#12700, is already merged and present in the current pinned runtime version, @github/copilot 1.0.79-9.

The generated RPC schema in this repo does not currently expose managedSettings.read as a typed top-level RPC method, so this PR adds the Rust top-level wrapper directly rather than hand-editing generated RPC output.

github/copilot-host will consume this Rust SDK wrapper to include managed settings during environment registration.

Validation

  • rustfmt direct check using nightly-2026-04-14 rustfmt on changed Rust files
  • cargo test --test managed_settings_test with Rust 1.94.0
  • cargo clippy --all-features --all-targets -- -D warnings with Rust 1.94.0

Limit: cargo test --all-features was attempted but stopped after several minutes because it appeared stuck downloading the bundled runtime package (@github/copilot-darwin-arm64).

Expose a top-level Rust Client::read_managed_settings helper for the server-scoped managedSettings.read RPC and preserve the runtime-owned payload as opaque JSON.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 115e51b8-7534-42e6-956b-aa212c360ddc
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 44940cff-d077-4e4d-a8ce-613de54ffded
Copilot AI review requested due to automatic review settings August 3, 2026 19:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a Rust SDK wrapper for retrieving server-scoped managed settings without creating a session.

Changes:

  • Adds Client::read_managed_settings().
  • Introduces ManagedSettingsReadResult.
  • Tests successful and runtime-error responses over in-memory JSON-RPC.
Show a summary per file
File Description
rust/src/lib.rs Adds the managed-settings RPC wrapper.
rust/src/types.rs Defines the public response type.
rust/tests/managed_settings_test.rs Verifies request scope and response handling.

Review details

  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Balanced

jbrown1618 and others added 3 commits August 5, 2026 13:07
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 44940cff-d077-4e4d-a8ce-613de54ffded
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db3411a4-ec90-4a62-ac9c-c11be517c3d5
@jbrown1618
jbrown1618 marked this pull request as ready for review August 10, 2026 15:25
@jbrown1618
jbrown1618 requested a review from a team as a code owner August 10, 2026 15:25
@jbrown1618 jbrown1618 changed the title Add Rust managed settings client wrapper [Rust] Add wrapper for reading managed settings Aug 10, 2026
@jbrown1618 jbrown1618 closed this Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants