Skip to content

feat(sdk): add Rust code generation#669

Open
gaojunran wants to merge 8 commits into
jdx:mainfrom
gaojunran:feat/rust-sdk
Open

feat(sdk): add Rust code generation#669
gaojunran wants to merge 8 commits into
jdx:mainfrom
gaojunran:feat/rust-sdk

Conversation

@gaojunran

@gaojunran gaojunran commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Rust is now a supported SDK generation target.
  • CLI

    • Usage, help, and shell completions updated to include "rust" as a valid --language choice (completion suggestions adjusted).
  • Documentation

    • CLI reference and SDK docs include Rust examples, runtime, and type details.
  • Behavior

    • SDK client generators improved for more consistent argument/flag and "--" handling across languages.
  • Tests

    • Added a test that compiles generated Rust SDK output.

@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0918b301-4322-46db-b391-fc7dd6e1de21

📥 Commits

Reviewing files that changed from the base of the PR and between 20b96db and 86a106f.

⛔ Files ignored due to path filters (2)
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_flag_edge_cases-2.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_full_feature_client.snap is excluded by !**/*.snap
📒 Files selected for processing (3)
  • lib/src/sdk/rust/client.rs
  • lib/src/sdk/rust/types.rs
  • lib/tests/sdk_compile.rs
🚧 Files skipped from review as they are similar to previous changes (3)
  • lib/src/sdk/rust/client.rs
  • lib/src/sdk/rust/types.rs
  • lib/tests/sdk_compile.rs

📝 Walkthrough

Walkthrough

Adds Rust as a first-class SDK generation target: CLI/options/docs updated, Rust types/client/runtime generators implemented, Python/TypeScript exec generation refactored for consistent arg/flag ordering, and tests added to compile the generated Rust SDK.

Changes

Rust SDK Generation

Layer / File(s) Summary
CLI interface and reference updates
cli/src/cli/generate/sdk.rs, cli/assets/fig.ts, cli/usage.usage.kdl, docs/cli/reference/*, docs/cli/sdk.md
CLI argument parsing, Fig completions, usage spec, and reference documentation updated to recognize rust as a valid generate sdk --language choice; docs now include Rust examples and supported files.
SDK module architecture
lib/src/sdk/mod.rs
Exports rust submodule, adds SdkLanguage::Rust, and dispatches generation to rust::generate().
Rust types code generator
lib/src/sdk/rust/types.rs
Generates Rust types: choice enums (Display/as_str), GlobalFlags, per-command arg/flag structs, optional config structs, type mapping, and identifier sanitization helpers.
Rust runtime
lib/src/sdk/rust/runtime.rs
Adds embedded runtime source constant (RUNTIME_RS) with CliResult, CliError, and CliRunner::run using std::process::Command.
Rust client code generator
lib/src/sdk/rust/client.rs
Generates client structs, impl blocks, exec() methods with positional/double-dash handling, and build_flag_args helper for flags.
Rust SDK orchestration and tests
lib/src/sdk/rust/mod.rs, lib/tests/*
generate() composes types.rs/client.rs/runtime.rs into SdkOutput, emits lib.rs with re-exports, adds insta-backed tests, and introduces a cargo check compile test for generated Rust output.
Python and TypeScript generator refactoring
lib/src/sdk/python/mod.rs, lib/src/sdk/typescript/wrappers.rs
Refactors exec argument assembly: moves flag-building earlier, restructures double-dash handling, and unifies the final runner call to use the assembled cmd_args.

Sequence Diagram(s)

sequenceDiagram
  participant CLI as CLI (--language)
  participant Dispatcher as generate(dispatch)
  participant RustGen as rust::generate
  participant Types as types::render
  participant Client as client::render
  participant Runtime as RUNTIME_RS
  participant Output as SdkOutput

  CLI->>Dispatcher: SdkLanguage::Rust + SdkOptions
  Dispatcher->>RustGen: call rust::generate(spec, opts)
  RustGen->>Types: render(spec, package_name)
  Types->>Output: types.rs
  RustGen->>Client: render(spec, package_name)
  Client->>Output: client.rs
  RustGen->>Runtime: include RUNTIME_RS
  Runtime->>Output: runtime.rs
  RustGen->>Output: render lib.rs and finalize SdkOutput
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • jdx/usage#623: Also modified generate sdk language choices and generation dispatch for SDK targets.

Poem

A rabbit nibbles code at dawn,
Types and clients neatly drawn,
Rust crates rise where specs once slept,
Cargo checks the promises kept,
Hooray — the SDK hops on!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(sdk): add Rust code generation' accurately summarizes the main change across the entire changeset, which adds comprehensive Rust SDK code generation support.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented Jun 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.20743% with 49 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.16%. Comparing base (f1d6e61) to head (db8ce24).

Files with missing lines Patch % Lines
lib/src/sdk/rust/client.rs 89.54% 30 Missing and 11 partials ⚠️
lib/src/sdk/rust/types.rs 98.30% 5 Missing and 1 partial ⚠️
cli/src/cli/generate/sdk.rs 0.00% 1 Missing ⚠️
lib/src/sdk/rust/mod.rs 99.81% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #669      +/-   ##
==========================================
+ Coverage   79.31%   81.16%   +1.85%     
==========================================
  Files          56       59       +3     
  Lines       10487    11779    +1292     
  Branches    10487    11779    +1292     
==========================================
+ Hits         8318     9561    +1243     
- Misses       1409     1445      +36     
- Partials      760      773      +13     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@greptile-apps

greptile-apps Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds Rust as a supported SDK generation target, producing types.rs, client.rs, runtime.rs, and lib.rs from a usage spec. It also fixes flag-before--- argument ordering for the TypeScript and Python generators.

  • New lib/src/sdk/rust/ module generates idiomatic Rust structs, enums, and a CliRunner-based client; includes ~30 snapshot tests and a cargo check compile test.
  • Python and TypeScript wrappers are updated so flags are appended to the command vector before the -- separator, matching correct CLI parsing semantics.
  • Several issues flagged in prior review rounds have been addressed: alias methods are now inside the impl block, the spurious closing } is gone, the unused std::process::Command import is removed, and the compile test now writes its own Cargo.toml.

Confidence Score: 4/5

Safe to merge after fixing the exec doc comment placement; the generated Rust code will otherwise emit unused_doc_comments warnings on every spec that carries usage strings or examples.

The generator emits /// doc comments for the exec method followed immediately by a blank line before the function signature. Because Rust requires doc comments to sit flush against the item they document, this blank line detaches the comment and produces an unused_doc_comments compiler warning in every generated SDK whose spec defines usage or examples. All other previously-flagged issues have been resolved in this iteration.

lib/src/sdk/rust/client.rs — the w.line("") call after the exec doc comment block needs to move before the comment rather than after it.

Important Files Changed

Filename Overview
lib/src/sdk/rust/client.rs New Rust client code generator. Alias methods are now correctly placed inside the impl block. Flags are correctly ordered before --. However, the exec doc comments are separated from pub fn exec by a blank line, causing unused_doc_comments Rust warnings in every generated SDK with non-empty usage/examples.
lib/src/sdk/rust/mod.rs Rust SDK module: orchestrates file generation and exports. Comprehensive test suite with ~30 test cases covering edge cases. No issues found.
lib/src/sdk/rust/types.rs Type generation for structs, choice enums, config, and flags. Correct handling of optional/required fields, keyword escaping via sanitize_rs_ident, numeric enum variants, and deprecated attribute syntax.
lib/src/sdk/rust/runtime.rs Static runtime template (CliRunner, CliResult, CliError). Implements std::error::Error correctly and handles NotFound vs Io error discrimination. No issues.
lib/tests/sdk_compile.rs Compile test now correctly writes a Cargo.toml before running cargo check, and gracefully skips if cargo is absent. No issues.
lib/src/sdk/python/mod.rs Refactored Python client generation to place flags before -- separator, consistent with TypeScript and Rust. No issues found.
lib/src/sdk/typescript/wrappers.rs Updated TypeScript client generation to emit flags before -- separator. Alias getters now emitted inside the class body correctly. No issues found.

Reviews (11): Last reviewed commit: "fix(sdk/rust): address PR review feedbac..." | Re-trigger Greptile

Comment thread lib/src/sdk/rust/client.rs Outdated
Comment thread lib/src/sdk/rust/client.rs
Comment thread lib/src/sdk/rust/client.rs Outdated
Comment thread lib/tests/sdk_compile.rs
Comment thread lib/src/sdk/rust/client.rs Outdated
Comment thread lib/src/sdk/rust/client.rs Outdated
gaojunran and others added 4 commits June 7, 2026 00:29
…structor borrow-after-move

Flags are now inserted before the '--' separator instead of after it,
ensuring CLI parsers correctly recognize them as flags rather than
positional arguments. This fix applies to all three SDK generators
(Rust, Python, TypeScript).

Also fixes the non-root constructor to emit 'runner,' after
'runner.clone()' calls, preventing borrow-after-move compile errors
for nested subcommands.
- Use let cmd_args (no mut) when command has no args and no flags
- Only generate {Name}Flags struct when command has its own flags;
  commands that only inherit global flags use GlobalFlags directly
…rved keywords

- Filter out choice enum names from client.rs imports since they are
  only referenced in types.rs, not in client.rs
- Add missing Rust reserved keywords to sanitize_rs_ident: priv, do,
  try, become, final, typeof, unsized, virtual
- Remove 'default' which is not a reserved keyword in Rust
@gaojunran gaojunran marked this pull request as ready for review June 6, 2026 17:35

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
lib/tests/sdk_compile.rs (1)

144-188: ⚡ Quick win

Add cargo availability check for consistency with Python test.

The Rust compilation test should verify cargo is available before running, matching the pattern used in the Python test (Line 95). Without this check, the test will panic with a confusing error if cargo is not installed.

🔧 Proposed fix to add cargo availability check
 #[test]
 fn test_rust_sdk_compiles() {
+    if !tool_exists("cargo") {
+        eprintln!("Skipping Rust SDK compilation test - cargo not found");
+        return;
+    }
+
     let spec = full_spec();
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@lib/tests/sdk_compile.rs` around lines 144 - 188, The test_rust_sdk_compiles
test should check that the "cargo" binary is available before invoking
Command::new("cargo") to avoid a confusing panic when cargo is missing; add an
availability check (e.g. call Command::new("cargo").arg("--version").output() or
.status() and test for Err or non-success) immediately before the existing
Command::new("cargo") invocation and if cargo is not found, print/elog a short
message and return/skip the test instead of continuing to run cargo check;
update the test_rust_sdk_compiles function (which uses usage::sdk::generate and
later builds the Command) to perform this pre-check.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@lib/src/sdk/rust/types.rs`:
- Around line 461-463: escape_rs_string currently only handles backslash and
double-quote and fails to escape control/non-printable characters; change its
implementation to build a fully escaped string by iterating chars and using each
char's escape_default (e.g. s.chars().flat_map(|c|
c.escape_default()).collect::<String>()) and then ensure double quotes are
escaped (e.g. replace '"' with r#"\""#) so that control characters like \n, \r,
\t, \0 and other non-printables are emitted as valid Rust escapes when used by
the generator (function escape_rs_string, which is used to embed spec metadata
such as spec.about).

---

Nitpick comments:
In `@lib/tests/sdk_compile.rs`:
- Around line 144-188: The test_rust_sdk_compiles test should check that the
"cargo" binary is available before invoking Command::new("cargo") to avoid a
confusing panic when cargo is missing; add an availability check (e.g. call
Command::new("cargo").arg("--version").output() or .status() and test for Err or
non-success) immediately before the existing Command::new("cargo") invocation
and if cargo is not found, print/elog a short message and return/skip the test
instead of continuing to run cargo check; update the test_rust_sdk_compiles
function (which uses usage::sdk::generate and later builds the Command) to
perform this pre-check.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 97b0195e-3daf-425e-8d7c-c48d4598f82b

📥 Commits

Reviewing files that changed from the base of the PR and between f1d6e61 and 8bc4ed2.

⛔ Files ignored due to path filters (56)
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_client.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_client_edge_cases.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_count_flag_build.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_deep_nesting.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_double_dash_automatic.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_exec_edge_cases.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_flag_edge_cases-2.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_flags_only_subcommand.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_full_feature_client.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_global_flags_flags_only.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_multiple_aliases.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_negate_flag_build.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_arg_defaults.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_boolean_flag_default_false.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_choice_collision.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_client.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_config_all_optional.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_config_boolean_default_false.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_config_props.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_config_string_with_default.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_count_flag_build.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_deep_nesting.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_double_dash_automatic.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_example_without_lang.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_flag_edge_cases-2.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_flag_edge_cases.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_flag_with_choices.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_flag_with_env.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_flags_only_subcommand.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_full_feature_client.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_full_feature_types.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_global_flags_flags_only.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_global_repeatable_flags.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_hyphenated_subcommands.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_lib.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_minimal.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_multiple_aliases.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_negate_flag_build.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_optional_arg_empty_flags.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_optional_variadic_arg.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_package_name_override.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_required_flag_type.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_runtime.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_types.snap is excluded by !**/*.snap
  • lib/src/sdk/rust/snapshots/usage__sdk__rust__tests__rust_var_value_flag_with_default.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__deep_nesting.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__flags_only_subcommand.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__full_feature_client.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_client.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_client_edge_cases.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_count_flag_build.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_double_dash_automatic.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_flag_edge_cases-2.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_global_flags_flags_only.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_multiple_aliases.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_negate_flag_build.snap is excluded by !**/*.snap
📒 Files selected for processing (14)
  • cli/assets/fig.ts
  • cli/src/cli/generate/sdk.rs
  • cli/usage.usage.kdl
  • docs/cli/reference/commands.json
  • docs/cli/reference/generate/sdk.md
  • docs/cli/sdk.md
  • lib/src/sdk/mod.rs
  • lib/src/sdk/python/mod.rs
  • lib/src/sdk/rust/client.rs
  • lib/src/sdk/rust/mod.rs
  • lib/src/sdk/rust/runtime.rs
  • lib/src/sdk/rust/types.rs
  • lib/src/sdk/typescript/wrappers.rs
  • lib/tests/sdk_compile.rs

Comment thread lib/src/sdk/rust/types.rs
@gaojunran

gaojunran commented Jun 6, 2026

Copy link
Copy Markdown
Contributor Author

@jdx ready for review! remaining comments are for add cargo cli existence check in ci and I don't think it's needed lol.

and coverage workflow fails strangely and may need a check

@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown

This PR currently has failing checks. If this continues for 7 days, it will be closed automatically.

This is warning day 1 of 7.

Please update the PR when you have a chance. Feel free to reopen or create a new PR if it is closed and you'd like to continue working on it.

This comment was generated by an automated workflow.

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

This PR currently has failing checks. If this continues for 7 days, it will be closed automatically.

This is warning day 2 of 7.

Please update the PR when you have a chance. Feel free to reopen or create a new PR if it is closed and you'd like to continue working on it.

This comment was generated by an automated workflow.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

This PR currently has failing checks. If this continues for 7 days, it will be closed automatically.

This is warning day 3 of 7.

Please update the PR when you have a chance. Feel free to reopen or create a new PR if it is closed and you'd like to continue working on it.

This comment was generated by an automated workflow.

@gaojunran

gaojunran commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

@jdx sorry to bother you but could you check this PR? it fails in coverage test and it'll be closed if no actions are performed.

@github-actions

Copy link
Copy Markdown

This PR currently has failing checks. If this continues for 7 days, it will be closed automatically.

This is warning day 4 of 7.

Please update the PR when you have a chance. Feel free to reopen or create a new PR if it is closed and you'd like to continue working on it.

This comment was generated by an automated workflow.

@github-actions

Copy link
Copy Markdown

This PR currently has failing checks. If this continues for 7 days, it will be closed automatically.

This is warning day 5 of 7.

Please update the PR when you have a chance. Feel free to reopen or create a new PR if it is closed and you'd like to continue working on it.

This comment was generated by an automated workflow.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
lib/src/sdk/mod.rs (1)

15-21: ⚠️ Potential issue | 🟠 Major

#[non_exhaustive] on SdkLanguage is a semver-breaking public API change.

SdkLanguage is a pub enum; adding #[non_exhaustive] (line 16) forces downstream crates to handle future variants via a wildcard arm for exhaustive matches, making existing exhaustive matches fail to compile. If this isn’t an intentional breaking release, keep the enum exhaustive.

Suggested change
 #[derive(Debug, Clone)]
-#[non_exhaustive]
 pub enum SdkLanguage {
     TypeScript,
     Python,
     Rust,
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@lib/src/sdk/mod.rs` around lines 15 - 21, The addition of #[non_exhaustive]
to the public enum SdkLanguage makes this a semver-breaking change; revert that
by removing the #[non_exhaustive] attribute from the SdkLanguage declaration
(the enum with variants TypeScript, Python, Rust) so downstream crates with
exhaustive match statements continue to compile, or if you intended to permit
extension, keep the attribute but document the breaking change and update
callers to use wildcard match arms for SdkLanguage.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@lib/src/sdk/mod.rs`:
- Around line 15-21: The addition of #[non_exhaustive] to the public enum
SdkLanguage makes this a semver-breaking change; revert that by removing the
#[non_exhaustive] attribute from the SdkLanguage declaration (the enum with
variants TypeScript, Python, Rust) so downstream crates with exhaustive match
statements continue to compile, or if you intended to permit extension, keep the
attribute but document the breaking change and update callers to use wildcard
match arms for SdkLanguage.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 692105cb-97e3-4174-abe9-e4735bb1eb4c

📥 Commits

Reviewing files that changed from the base of the PR and between eb3a9ac and 20b96db.

📒 Files selected for processing (1)
  • lib/src/sdk/mod.rs

- Add cargo availability check in test_rust_sdk_compiles (matches Python test pattern)
- Emit #[allow(deprecated)] on build_flag_args when deprecated flags exist
- Use char::escape_default() in escape_rs_string for complete control char handling
@github-actions

Copy link
Copy Markdown

This PR currently has failing checks. If this continues for 7 days, it will be closed automatically.

This is warning day 1 of 7.

Please update the PR when you have a chance. Feel free to reopen or create a new PR if it is closed and you'd like to continue working on it.

This comment was generated by an automated workflow.

@github-actions

Copy link
Copy Markdown

This PR currently has failing checks. If this continues for 7 days, it will be closed automatically.

This is warning day 2 of 7.

Please update the PR when you have a chance. Feel free to reopen or create a new PR if it is closed and you'd like to continue working on it.

This comment was generated by an automated workflow.

@github-actions

Copy link
Copy Markdown

This PR currently has failing checks. If this continues for 7 days, it will be closed automatically.

This is warning day 3 of 7.

Please update the PR when you have a chance. Feel free to reopen or create a new PR if it is closed and you'd like to continue working on it.

This comment was generated by an automated workflow.

@github-actions

Copy link
Copy Markdown

This PR currently has failing checks. If this continues for 7 days, it will be closed automatically.

This is warning day 4 of 7.

Please update the PR when you have a chance. Feel free to reopen or create a new PR if it is closed and you'd like to continue working on it.

This comment was generated by an automated workflow.

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.

2 participants