Skip to content

Commit 4216bed

Browse files
Tomkessclaude
andcommitted
fix(gooddata-eval): propagate best_run_latency_s on guardrail's no-verdict path
CodeRabbit catch on #1845: the JudgeResponseError raised when no run's judge verdict was readable at all left best_run_latency_s unset, unlike the equivalent branch in general_question.py. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 762a59c commit 4216bed

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • packages/gooddata-eval/src/gooddata_eval/core/agentic

‎packages/gooddata-eval/src/gooddata_eval/core/agentic/guardrail.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,10 +290,12 @@ def _write_scores(ctx: RunTraceContext) -> None:
290290
if not summary.scored_run_results:
291291
# No readable verdict for any run: an error, not K failures. Raised after the
292292
# trace link is queued so whatever the agent did is still linked.
293-
raise JudgeResponseError(
293+
exc = JudgeResponseError(
294294
f"judge returned no readable verdict for any of the {len(summary.run_results)} run(s): "
295295
+ " | ".join(unscored)
296296
)
297+
exc.best_run_latency_s = summary.best.run_latency_s
298+
raise exc
297299

298300
runs_passed = sum(1 for r in summary.scored_run_results if r.passed)
299301
runs_effective = len(summary.run_results)

0 commit comments

Comments
 (0)