Skip to content

bug: fix gitignore and rust sdk with runagent cloud#81

Merged
RadeenXALNW merged 1 commit into
mainfrom
rad/gitignore_rust_fix
Nov 8, 2025
Merged

bug: fix gitignore and rust sdk with runagent cloud#81
RadeenXALNW merged 1 commit into
mainfrom
rad/gitignore_rust_fix

Conversation

@RadeenXALNW
Copy link
Copy Markdown
Collaborator

@RadeenXALNW RadeenXALNW commented Nov 8, 2025

Summary by CodeRabbit

  • Bug Fixes

    • Enhanced error logging for JSON parsing failures with detailed debug information.
  • Improvements

    • Updated API endpoint to use secure HTTPS protocol.
    • Improved response handling for JSON-encoded data in client operations.
  • Chores

    • Updated configuration files and agent identifiers across examples and templates.
    • Removed environment variable file from default ignore patterns.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Nov 8, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The PR updates configuration files across examples to add or modify agent_id fields, removes environment variables from config files, updates the default backend URL from HTTP to HTTPS, removes .env from gitignore patterns, and enhances JSON parsing in response handling.

Changes

Cohort / File(s) Summary
Configuration files with agent_id updates
examples/lead-agent/lead-score-flow/runagent.config.json, examples/recipe_creator/agents/runagent.config.json, templates/agno/default/runagent.config.json
Added or updated root-level agent_id field with UUID values. Removed env_vars block from lead-score-flow config.
Test and SDK files with agent_id updates
examples/lead-agent/runagent_sdk/python/test_sdk.py, examples/recipe_creator/sdk/python/test.py, test_scripts/python/client_test_agno.py
Updated RunAgentClient initialization with new or placeholder agent_id UUID values.
Backend and client response handling
runagent-rust/runagent/src/client/runagent_client.rs, examples/lead-agent/backend-rust/src/main.rs
Enhanced JSON response parsing to detect and deserialize JSON-encoded content. Added detailed debug logging for JSON parse errors with error messages and content previews.
Constants and defaults
runagent-rust/runagent/src/constants.rs
Updated DEFAULT_BASE_URL from http://20.84.81.110:8335/ to https://backend.run-agent.ai/.
Gitignore patterns
examples/lead-agent/lead-score-flow/.gitignore, runagent/utils/gitignore.py
Removed .env from ignore patterns, allowing .env files to be tracked or created by default.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant RunAgentClient
    participant ResponseHandler

    Client->>RunAgentClient: run() with agent_id
    RunAgentClient->>ResponseHandler: process response
    alt New response format
        ResponseHandler->>ResponseHandler: detect JSON in string
        ResponseHandler->>ResponseHandler: parse with serde_json::from_str
        ResponseHandler->>ResponseHandler: deserialize parsed JSON
        ResponseHandler-->>RunAgentClient: JSON object (deserialized)
    else Old response format fallback
        ResponseHandler->>ResponseHandler: detect JSON in output_data
        ResponseHandler->>ResponseHandler: parse with serde_json::from_str
        ResponseHandler->>ResponseHandler: deserialize parsed JSON
        ResponseHandler-->>RunAgentClient: JSON object (deserialized)
    else Parse error
        ResponseHandler->>ResponseHandler: debug log error + preview
        ResponseHandler-->>RunAgentClient: raw result (string)
    end
    RunAgentClient-->>Client: response
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Areas requiring attention:
    • JSON parsing enhancements in runagent_client.rs and backend-rust/src/main.rs—verify error handling and debug output don't introduce unintended side effects
    • Backend URL change to HTTPS—confirm all deployments and clients support the new domain
    • Removal of .env from gitignore patterns—ensure this aligns with security and deployment practices

Possibly related PRs

Suggested reviewers

  • sawradip

Poem

🐰 Hops through configs with glee,
Agent IDs now proudly seen,
HTTPS stands tall and bright,
JSON parsed just right,
.env files roam wild and free! 🌿

✨ 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 rad/gitignore_rust_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 0e56a2b and 3ddc51a.

⛔ Files ignored due to path filters (1)
  • examples/lead-agent/frontend/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (11)
  • examples/lead-agent/backend-rust/src/main.rs (1 hunks)
  • examples/lead-agent/lead-score-flow/.gitignore (0 hunks)
  • examples/lead-agent/lead-score-flow/runagent.config.json (1 hunks)
  • examples/lead-agent/runagent_sdk/python/test_sdk.py (1 hunks)
  • examples/recipe_creator/agents/runagent.config.json (1 hunks)
  • examples/recipe_creator/sdk/python/test.py (2 hunks)
  • runagent-rust/runagent/src/client/runagent_client.rs (2 hunks)
  • runagent-rust/runagent/src/constants.rs (1 hunks)
  • runagent/utils/gitignore.py (0 hunks)
  • templates/agno/default/runagent.config.json (1 hunks)
  • test_scripts/python/client_test_agno.py (2 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.

@RadeenXALNW RadeenXALNW merged commit 29beaba into main Nov 8, 2025
1 of 2 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Nov 8, 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