Skip to content

Expose session feature flag overrides across SDKs - #2451

Merged
jmoseley merged 3 commits into
mainfrom
jmoseley-rust-feature-flags
Sep 1, 2026
Merged

jmoseley merged 3 commits into
mainfrom
jmoseley-rust-feature-flags

Conversation

@jmoseley

@jmoseley jmoseley commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • expose host-resolved feature flag overrides on create and resume across Node.js, Python, Go, .NET, Java, and Rust
  • forward configured values as featureFlags across the JSON-RPC boundary while omitting unset values
  • preserve explicit false values and the distinction between an unset map and an explicitly empty map
  • add focused create/resume serialization or request-forwarding coverage in every SDK

Testing

  • Node.js focused client test and typecheck
  • Python focused client test and Ruff checks
  • Go focused request serialization test
  • .NET serialization tests and formatting check
  • Java SessionRequestBuilderTest
  • Rust focused serialization test and pinned nightly formatting check

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9b0b5b94-f94a-4df4-8e57-6d7ed6fe04c1
@jmoseley
jmoseley requested a review from a team as a code owner September 1, 2026 03:41
Copilot AI balanced review requested due to automatic review settings September 1, 2026 03:41

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.

Copilot review overview

🟢 Approval recommended

The public API, wire serialization, defaults, documentation, and tests consistently implement the stated behavior.

Review tier: Balanced
Findings: None

What changed in this PR

Exposes host-resolved feature flags through Rust session creation and resume configuration.

Changes:

  • Adds feature_flags fields and fluent builders.
  • Serializes configured flags as featureFlags while omitting unset values.
  • Adds focused serialization tests.
File Description
rust/​src/​wire.rs Adds optional feature flags to create and resume payloads.
rust/​src/​types.rs Exposes, forwards, documents, and tests feature flag configuration.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@SteveSandersonMS SteveSandersonMS changed the title Expose Rust session feature flag overrides Expose session feature flag overrides across SDKs Sep 1, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Cross-SDK Consistency Review ✅

This PR adds featureFlags support consistently across all six SDK implementations. The feature is implemented in parallel across:

SDK Config field Wire key Builder/fluent method
Node.js/TS featureFlags?: Record<string, boolean> on SessionConfigBase featureFlags direct property
Python feature_flags: dict[str, bool] | None param on create_session / resume_session featureFlags function parameter
Go FeatureFlags map[string]bool on SessionConfig / ResumeSessionConfig featureFlags direct field
.NET IDictionary<string, bool>? FeatureFlags on SessionConfigBase featureFlags direct property
Java Map<String, Boolean> featureFlags on SessionConfig / ResumeSessionConfig featureFlags setFeatureFlags() fluent setter
Rust feature_flags: Option<HashMap<String, bool>> on SessionConfig / ResumeSessionConfig featureFlags with_feature_flags() builder method

Observations:

  • All SDKs omit the field from the wire payload when unset (null/None/nil), preserving the distinction between "not set" and "explicitly empty"
  • All SDKs use the same JSON wire key featureFlags
  • API naming follows each language's conventions (camelCase for TS/Java, snake_case for Python/Rust, PascalCase for Go exported fields)
  • Clone/copy semantics are implemented correctly in .NET and Java to avoid aliasing
  • All SDKs include focused serialization/forwarding tests

No consistency gaps found. The PR maintains strong cross-SDK parity. 👍

Generated by SDK Consistency Review Agent for #2451 · sonnet46 25.4 AIC · ⌖ 5.46 AIC · ⊞ 6.6K · ◷

@SteveSandersonMS SteveSandersonMS 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.

Reviewed the expanded six-language implementation. Create/resume forwarding, unset and explicit false semantics, Go empty-map handling, clone behavior, and language-native tests are covered. The full CI matrix passes.

@SteveSandersonMS
SteveSandersonMS added this pull request to the merge queue Sep 1, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 1, 2026
@jmoseley
jmoseley added this pull request to the merge queue Sep 1, 2026
Merged via the queue into main with commit 80d09ff Sep 1, 2026
124 of 131 checks passed
@jmoseley
jmoseley deleted the jmoseley-rust-feature-flags branch September 1, 2026 18:03
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