fix(judge): normalize invalid criterion container errors - #739
Conversation
|
Warning Review limit reached
Next review available in: 59 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe criterion parser now raises ChangesCriterion validation
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai review Review exact current head |
|
|
Test-first reliability gap
Protected
main914127ba227d3e02d0564aeeb4f27d76137610f9now exposes the contextual LLM-judge contract from #733. The publicContextualOrchestratorJudge.judge(criteria=...)path normalizes malformed criterion fields to stableValueError, but a criterion element that is neitherJudgeCriterionnor a mapping still raisesTypeErrordirectly from_criteria.That is inconsistent with the package's benign arbitrary-input/fuzzing contract and with adjacent criterion validation. This Draft starts with an intentional test-only RED requiring the same stable
ValueErrorsurface for a non-contract criterion element.Valid RED
tests/test_llm_judge.py::test_judge_criteria_reject_non_contract_values_with_value_errormust reach_criteriathrough the installed public judge and fail because current production raisesTypeError. Setup/import/fixture/changelog failure is not valid evidence.Minimum GREEN after RED proof
JudgeCriterion/non-mapping_criteriaelement error fromTypeErrorto the existing stableValueErrorvalidation family;No numerical psychometric arithmetic, contextual-orchestrator code, dependencies/workflows, version/release, hosted state, or canonical #604 documentation belongs in this slice.
Summary by CodeRabbit
Bug Fixes
ValueErrorwith a clear, stable error message.Tests