Commit 5a100f8
amabito
fix(evaluators): budget R5 -- isfinite guard on estimated cost
R5 finding: Inf pricing rates produced inf cost, permanently locking
buckets in exceeded state. max(0.0, inf) = inf.
Fix: isfinite + negative check on _estimate_cost return value.
Tests: Inf pricing rate test, strengthened negative pricing assertion.
59 budget tests passing.1 parent 0b41ae9 commit 5a100f8
2 files changed
Lines changed: 20 additions & 2 deletions
File tree
- evaluators/builtin
- src/agent_control_evaluators/budget
- tests/budget
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
149 | 151 | | |
150 | 152 | | |
151 | 153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
480 | | - | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
0 commit comments