Skip to content

Fix Rust codegen for CLI 1.0.84 schemas - #2631

Merged
stephentoub merged 4 commits into
mainfrom
stephentoub-investigate-runtime-update
Sep 12, 2026
Merged

stephentoub merged 4 commits into
mainfrom
stephentoub-investigate-runtime-update

Conversation

@stephentoub

Copy link
Copy Markdown
Collaborator

Summary

  • map the protocol-defined CatalogTrustEligibility value unknown to UnknownValue, preserving Unknown as Rust's forward-compatible serde fallback
  • publicly re-export definitions imported from the shared session-events schema so stable crate::rpc type paths survive schema ownership changes
  • add focused Rust codegen regression coverage and refresh the generated Rust API imports

Validation

  • ran the complete TypeScript, C#, Python, Go, and Rust generator pipeline against Copilot CLI 1.0.84-5
  • compiled the Rust library against the generated 1.0.84-5 types
  • ran Node.js type checking, focused ESLint, and Rust codegen tests

Generated by Copilot

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@stephentoub
stephentoub requested a review from a team as a code owner September 11, 2026 22:38
Copilot AI balanced review requested due to automatic review settings September 11, 2026 22:38

Copilot AI commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

One or more custom setup steps configured for this repository failed during this Copilot code review run:

Restore .NET dependencies

Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review.

Note

You can configure setup steps for Copilot code review separately from Copilot cloud agent with a copilot-code-review.yml file. Read the docs for details.

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 generator changes are focused, preserve the stable Rust API facade, and include appropriate regression coverage.

Review tier: Balanced
Findings: None

What changed in this PR

Updates Rust code generation to remain compatible with CLI 1.0.84 schemas while preserving stable public RPC paths.

Changes:

  • Resolves the enum Unknown naming collision.
  • Publicly re-exports shared schema types.
  • Adds focused codegen regression tests.
File Description
scripts/​codegen/​rust.ts Adds enum overrides and shared-type re-exports.
rust/​src/​generated/​api_types.rs Refreshes generated import visibility.
nodejs/​test/​rust-codegen.test.ts Covers both regressions.

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

@github-actions

This comment has been minimized.

@stephentoub
stephentoub added this pull request to the merge queue Sep 11, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 11, 2026
@stephentoub
stephentoub added this pull request to the merge queue Sep 11, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 11, 2026
@stephentoub
stephentoub added this pull request to the merge queue Sep 11, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 11, 2026
stephentoub and others added 2 commits September 11, 2026 20:01
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

This comment has been minimized.

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

Copy link
Copy Markdown
Contributor

Reviewed PR #2631 (Fix Rust codegen for CLI 1.0.84 schemas) for cross-SDK consistency. All changes are scoped appropriately and do not introduce cross-language inconsistencies:

  • Rust-only codegen fixes (scripts/codegen/rust.ts, rust/src/generated/api_types.rs, nodejs/test/rust-codegen.test.ts): The CatalogTrustEligibility enum-variant override (mapping the wire value unknown to UnknownValue while reserving Unknown as the serde forward-compat fallback) and the pub use re-export fix for shared session-events types address Rust-specific problems. Go, Python, C#, and TypeScript represent string enums as opaque string-backed wrapper types/enums rather than exhaustive match arms with a fixed #[serde(other)]-style catch-all variant, so they do not have the same naming-collision risk between a protocol-defined unknown value and a language-level forward-compatibility fallback. No equivalent change is needed in those SDKs.
  • Test-harness-only changes (dotnet/test/Harness/E2ETestContext.cs, dotnet/test/E2E/SessionE2ETests.cs, go/internal/e2e/testharness/*, go/internal/ffihost/ffihost.go): These add session cleanup tracking (.NET) and deferred FFI cleanup synchronization (Go) purely within internal E2E test infrastructure. They do not touch public SDK APIs, so there is no parity gap to flag.
  • CI workflow and test snapshot changes (.github/workflows/required-checks.yml, test/snapshots/session/should_accept_blob_attachments.yaml): Infrastructure/test-fixture updates unrelated to SDK feature surface.

No public API was added, changed, or removed in this PR, so there is nothing to reconcile across the six SDK implementations. No inline review comments were necessary.

Generated by SDK Consistency Review Agent for #2631 · copilot · sonnet50 · 94.4 AIC · ⌖ 12.2 AIC · ⊞ 8.3K ·

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