Skip to content

[Chore] Handle Rust Unknown Enum Collision - #2632

Closed
MRayermannMSFT wants to merge 2 commits into
mainfrom
mrayermannmsft-cli-release-update
Closed

MRayermannMSFT wants to merge 2 commits into
mainfrom
mrayermannmsft-cli-release-update

Conversation

@MRayermannMSFT

@MRayermannMSFT MRayermannMSFT commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

What

Rust codegen gives the wire value "unknown" a stable UnknownValue variant when the catch-all already uses Unknown. The successful branch workflow run generated the CLI update draft with this fix.

Why

Copilot CLI 1.0.84-5 adds "unknown" to CatalogTrustEligibility. The existing name collision stops the automated CLI update workflow before it can create a pull request.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@MRayermannMSFT
MRayermannMSFT requested a review from a team as a code owner September 12, 2026 00:18
Copilot AI balanced review requested due to automatic review settings September 12, 2026 00:18
@MRayermannMSFT MRayermannMSFT added skip-changelog No user-facing changelog entry required post-to-slack Post PR to reviewers Slack channel labels Sep 12, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

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 targeted override preserves wire serialization while avoiding the generated Unknown collision.

Review tier: Balanced
Findings: None

What changed in this PR

Updates Rust code generation to resolve collisions between wire enum values and catch-all variants.

Changes:

  • Adds a stable UnknownValue override for CatalogTrustEligibility.unknown.
  • Allows explicit variant-name overrides during string-enum generation.
File Description
scripts/​codegen/​rust.ts Adds and applies the Rust enum variant override.

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

@stephentoub

Copy link
Copy Markdown
Collaborator

This is duplicating #2631, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

post-to-slack Post PR to reviewers Slack channel skip-changelog No user-facing changelog entry required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants