Commit ff75842
authored
fix(ai): normalize boolean scores in onlineEval scoresSummary (#263)
## Overview
- `onlineEval()` was writing raw boolean scores (`true`/`false`) into
the parent eval span's `eval.case.scores` attribute, while child scorer
spans correctly normalized them to `1`/`0` with `eval.score.is_boolean`
metadata via `normalizeBooleanScore()`
- Apply the same `normalizeBooleanScore()` call when building
`scoresSummary` so both parent and child spans produce consistent
numeric scores
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Small telemetry-only change that affects how scores are serialized
into span attributes; low risk aside from potential downstream
expectations of boolean values.
>
> **Overview**
> Ensures `onlineEval()` writes consistent numeric scores into the
parent eval span’s `eval.case.scores` summary by normalizing boolean
`score` values (`true/false` → `1/0`) and propagating the corresponding
`eval.score.is_boolean` metadata.
>
> This updates `onlineEval.ts` to call `normalizeBooleanScore()` while
building `scoresSummary`, and only emits normalized metadata when
non-empty.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
bfa6ce7. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 87f5add commit ff75842
1 file changed
+9
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
359 | 360 | | |
360 | 361 | | |
361 | 362 | | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
362 | 368 | | |
363 | 369 | | |
364 | | - | |
365 | | - | |
366 | | - | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
367 | 373 | | |
368 | 374 | | |
369 | 375 | | |
| |||
0 commit comments