Skip to content

[fix] Resolve small open issues#4414

Merged
junaway merged 2 commits into
release/v0.100.2from
fix/resolve-small-open-issues
May 25, 2026
Merged

[fix] Resolve small open issues#4414
junaway merged 2 commits into
release/v0.100.2from
fix/resolve-small-open-issues

Conversation

@junaway
Copy link
Copy Markdown
Contributor

@junaway junaway commented May 25, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 25, 2026 14:01
@vercel
Copy link
Copy Markdown

vercel Bot commented May 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment May 25, 2026 2:01pm

Request Review

@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label May 25, 2026
@junaway junaway merged commit 53a0acf into release/v0.100.2 May 25, 2026
12 checks passed
@dosubot dosubot Bot added bug Something isn't working python Pull requests that update Python code labels May 25, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 25, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0fb0e9a2-6cb4-4c27-8b91-99b4a3da4495

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/resolve-small-open-issues

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses a couple of small robustness issues across the evaluator execution templates and shared exception formatting.

Changes:

  • Updated TypeScript evaluator templates to simplify numeric coercion/normalization of evaluate() results.
  • Made EntityCreationConflict.__str__ resilient to conflict=None before iterating.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
sdks/python/agenta/sdk/engines/running/templates.py Adjusts TypeScript evaluator wrapper result handling/normalization logic.
api/oss/src/core/shared/exceptions.py Guards conflict iteration in __str__ to avoid NoneType errors.
Comments suppressed due to low confidence (2)

sdks/python/agenta/sdk/engines/running/templates.py:142

  • The TypeScript template now annotates result as number | null, which can break compilation when user-provided evaluate() returns a string (or is inferred to return a string) even though the wrapper later coerces via Number(...). To keep the template compatible with evaluators returning string | number | null, avoid narrowing the type here (e.g., use unknown/any for the raw result and only type the coerced value).
// Execute and capture result
let result: number | null = evaluate(inputs, outputs, trace);

// Ensure result is a number
const resultNum = Number(result);
result = Number.isFinite(resultNum) ? resultNum : null;

sdks/python/agenta/sdk/engines/running/templates.py:142

  • Coercing with Number(result) will turn an explicit null return from evaluate() into 0, so a user trying to signal “no score” via null gets recorded as a numeric score instead. If null is meant to be preserved (the runner accepts null), add an explicit check for null/undefined before numeric coercion so null stays null.
// Ensure result is a number
const resultNum = Number(result);
result = Number.isFinite(resultNum) ? resultNum : null;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 68 to +73
// Execute and capture result
let result = evaluate(app_params, inputs, output, correct_answer);
let result: number | null = evaluate(app_params, inputs, output, correct_answer);

// Ensure result is a number
result = Number(result);
if (!Number.isFinite(result)) {{
result = null;
}}
const resultNum = Number(result);
result = Number.isFinite(resultNum) ? resultNum : null;
Comment on lines 71 to +73
// Ensure result is a number
result = Number(result);
if (!Number.isFinite(result)) {{
result = null;
}}
const resultNum = Number(result);
result = Number.isFinite(resultNum) ? resultNum : null;
@github-actions
Copy link
Copy Markdown
Contributor

Railway Preview Environment

Preview URL https://gateway-production-9b8d.up.railway.app/w
Image tag pr-4414-b0fc88c
Status Failed
Railway logs Open logs
Logs View workflow run
Updated at 2026-05-25T14:13:18.504Z

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

Labels

bug Something isn't working python Pull requests that update Python code size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants