Skip to content

Sawra/sdk go fix#104

Merged
sawradip merged 4 commits into
mainfrom
sawra/sdk_go_fix
Nov 19, 2025
Merged

Sawra/sdk go fix#104
sawradip merged 4 commits into
mainfrom
sawra/sdk_go_fix

Conversation

@sawradip
Copy link
Copy Markdown
Contributor

@sawradip sawradip commented Nov 19, 2025

Summary by CodeRabbit

Release Notes v0.1.41

  • New Features

    • Added public accessors to client: health_check(), agent_id(), entrypoint_tag(), extra_params(), and is_local() for easier configuration inspection.
    • Implemented Default trait support for simpler client configuration initialization.
  • Improvements

    • Enhanced API validation with improved error handling and connection status checks.
    • Improved JSON payload parsing in serialization utilities.
    • Strengthened type safety with enhanced mypy configuration.
  • Chores

    • Version bump across all SDKs (Python, Rust, Go, TypeScript).
    • Code formatting and whitespace cleanup.

- Adjusted formatting in async_example.rs, direct_construction_omitted.rs, and direct_construction.rs for consistency.
- Improved readability by adding line breaks and aligning method calls.
- Removed unnecessary whitespace in sync_example.rs and test_deserialize.rs.
- Enhanced code clarity in blocking.rs and rest_client.rs by refining method formatting.
- Cleaned up whitespace in various utility and type files for better maintainability.
- Updated tests to improve clarity by using a variable for VERSION check.
- Added default implementations for RunAgentClientConfig and AgentInputArgs structs.
- Applied clippy allows for better trait implementation guidance in REST and WebSocket client defaults.
- Refined serializer methods to ensure proper JSON handling and recursion checks.
- Updated all SDK versions to 0.1.41
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Nov 19, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Version bump to 0.1.41 across all SDKs with changelog documentation updates. Rust SDK receives functional enhancements: Default trait for RunAgentClientConfig, new public accessors on RunAgentClient, per-thread Tokio runtime in BlockingStream, and JSON payload parsing in serializer. Python tooling upgraded with stricter mypy configuration flags.

Changes

Cohort / File(s) Summary
Release Metadata Version Bumps
CHANGELOG.md, pyproject.toml, runagent-go/version.go, runagent-rust/runagent/Cargo.toml, runagent-ts/package.json, runagent/__init__.py, runagent/__version__.py
Version bumped from 0.1.40 to 0.1.41; CHANGELOG.md restructured with "Documentation" section and updated release notes.
Python Tooling Configuration
pyproject.toml
Enhanced mypy configuration with stricter flags (disallow_incomplete_defs, check_untyped_defs, disallow_untyped_decorators, no_implicit_optional, warn_redundant_casts, warn_unused_ignores, warn_no_return, warn_unreachable) and added pydantic.mypy plugin.
Rust Client API Enhancements
runagent-rust/runagent/src/client/runagent_client.rs, runagent-rust/runagent/src/client/rest_client.rs
Implemented Default trait for RunAgentClientConfig; added public accessor methods (health_check, agent_id, entrypoint_tag, extra_params, is_local) to RunAgentClient; added #[allow(clippy::should_implement_trait)] attribute; refactored validate_api_connection with explicit else branch.
Rust Runtime & Stream Handling
runagent-rust/runagent/src/blocking.rs
BlockingStream::new refactored to create dedicated Tokio Runtime per background thread with async loop polling via mpsc channel.
Rust Serializer Enhancement
runagent-rust/runagent/src/utils/serializer.rs
deserialize_object enhanced to attempt JSON parsing of string payloads; falls back to string if parsing fails. Added clippy allowances on private helper functions.
Rust Type & Trait Updates
runagent-rust/runagent/src/types/schema.rs, runagent-rust/runagent/src/lib.rs
AgentInputArgs now derives Default; replaced explicit Default impl with derive macro. Added public VERSION constant in lib.rs via env!("CARGO_PKG_VERSION").
Rust Module & Client Organization
runagent-rust/runagent/src/client/mod.rs, runagent-rust/runagent/src/client/socket_client.rs
Re-exports relocated within mod.rs; socket_client imports reordered and minor clippy allowance added to default() method.
Rust Example & Test Formatting
runagent-rust/runagent/examples/*, runagent-rust/runagent/src/types/responses.rs, runagent-rust/runagent/src/types/errors.rs, runagent-rust/runagent/src/utils/config.rs
Formatting adjustments in async_example.rs, direct_construction.rs, direct_construction_omitted.rs, sync_example.rs, test_deserialize.rs; tests refactored with aligned assertions and blank-line adjustments.
Rust Minor Whitespace & Lint Fixes
runagent-rust/runagent/src/constants.rs, runagent-rust/runagent/src/db/mod.rs, runagent-rust/runagent/src/db/service.rs, runagent-rust/runagent/src/types/mod.rs, runagent-rust/runagent/src/utils/mod.rs
Trailing newline and whitespace cleanup; no functional changes.

Sequence Diagram

sequenceDiagram
    participant App as Application
    participant BS as BlockingStream
    participant RT as Tokio Runtime
    participant S as Stream
    participant CH as mpsc Channel
    
    App->>BS: BlockingStream::new(stream)
    activate BS
    BS->>RT: Runtime::new() [per-thread]
    activate RT
    RT-->>BS: Runtime ready
    BS->>BS: Spawn background thread
    activate BS
    loop Poll Stream
        BS->>S: Poll item
        S-->>BS: Some(item)
        BS->>CH: Send via mpsc
        CH-->>App: Item available
    end
    Note over BS,RT: Runtime drives async loop<br/>in dedicated thread
    deactivate BS
    deactivate RT
Loading
sequenceDiagram
    participant C as Caller
    participant SO as deserialize_object
    participant P as JSON Parser
    
    C->>SO: {type, payload: "string"}
    activate SO
    SO->>P: Try parse string as JSON
    alt Parsing succeeds
        P-->>SO: Parsed JSON value
        SO-->>C: Return parsed value
    else Parsing fails
        P-->>SO: Parse error
        SO-->>C: Return string directly
    end
    deactivate SO
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Extra attention areas:
    • runagent-rust/runagent/src/blocking.rs: Per-thread Tokio runtime creation and background thread management require verification of thread safety and panic handling.
    • runagent-rust/runagent/src/utils/serializer.rs: JSON parsing fallback logic needs testing with edge cases (malformed JSON, nested structures).
    • runagent-rust/runagent/src/client/runagent_client.rs: New Default implementation and public accessor methods should be validated against usage patterns throughout codebase.
    • pyproject.toml: Verify mypy configuration flags don't introduce false positives in existing Python codebase.

Possibly related PRs

  • Latest Rust SDK  #97: Contains prior Rust SDK enhancements (defaults, accessors, VERSION constant) that this PR refines and builds upon.
  • Sawra/sdk fix ts #89: Coordinated multi-language version bumps and tooling config updates across the same project files.
  • Sawra/util fix #85: Overlapping serializer changes involving structured-string deserialization and JSON payload unwrapping logic.

Poem

🐰 Version 0.1.41 hops into the fold,
With Default traits and accessors bold!
Streams spawn runtimes, JSON strings parse true,
Mypy guards Python—old bugs bid adieu! 🌟

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sawra/sdk_go_fix

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3ed58c5 and d39f472.

⛔ Files ignored due to path filters (1)
  • runagent-ts/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (28)
  • CHANGELOG.md (1 hunks)
  • pyproject.toml (3 hunks)
  • runagent-go/version.go (1 hunks)
  • runagent-rust/runagent/Cargo.toml (1 hunks)
  • runagent-rust/runagent/examples/async_example.rs (1 hunks)
  • runagent-rust/runagent/examples/direct_construction.rs (1 hunks)
  • runagent-rust/runagent/examples/direct_construction_omitted.rs (1 hunks)
  • runagent-rust/runagent/examples/sync_example.rs (1 hunks)
  • runagent-rust/runagent/examples/test_deserialize.rs (1 hunks)
  • runagent-rust/runagent/src/blocking.rs (3 hunks)
  • runagent-rust/runagent/src/client/mod.rs (1 hunks)
  • runagent-rust/runagent/src/client/rest_client.rs (11 hunks)
  • runagent-rust/runagent/src/client/runagent_client.rs (15 hunks)
  • runagent-rust/runagent/src/client/socket_client.rs (12 hunks)
  • runagent-rust/runagent/src/constants.rs (0 hunks)
  • runagent-rust/runagent/src/db/mod.rs (0 hunks)
  • runagent-rust/runagent/src/db/service.rs (2 hunks)
  • runagent-rust/runagent/src/lib.rs (6 hunks)
  • runagent-rust/runagent/src/types/errors.rs (1 hunks)
  • runagent-rust/runagent/src/types/mod.rs (1 hunks)
  • runagent-rust/runagent/src/types/responses.rs (2 hunks)
  • runagent-rust/runagent/src/types/schema.rs (6 hunks)
  • runagent-rust/runagent/src/utils/config.rs (10 hunks)
  • runagent-rust/runagent/src/utils/mod.rs (1 hunks)
  • runagent-rust/runagent/src/utils/serializer.rs (12 hunks)
  • runagent-ts/package.json (1 hunks)
  • runagent/__init__.py (1 hunks)
  • runagent/__version__.py (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@sawradip sawradip merged commit 421bd1f into main Nov 19, 2025
1 of 2 checks passed
This was referenced Dec 20, 2025
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.

1 participant