fix(core): make evaluation errors visible in results and reports#7
Merged
Merged
Conversation
Result#pass? now fails closed when any metric errored, Result exposes errors/valid?, report summaries and JSON exports include metric error counts, and Report#worst ranks results with no valid scores as worst. Closes #4 CodeFactory builder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4
Problem
Evaluator#callrescues judge errors intonilscores, and downstream everything silently drops them:Result#overallcompacts nils,Result#pass?can returntrueon partial data,Report#metric_stats/summaryhide errored metrics, andReport#worstsorts nil-overall results as if they were the best. A judge outage that kills 5 of 6 metrics still shows green in CI.Changes
Result#errorsreturns per-metric error messages (derived fromdetailsentries with an:errorkey);Result#valid?is true when there are noneResult#pass?now fails closed: returnsfalsewhen any metric errored, regardless of the surviving metrics' scoresResult#to_hincludeserrorsReport#summaryappends an error line when errors occurred, e.g.Errors: 3 metric errors across 2 samplesserializable_hash) includes per-metric error counts undererrorsReport#worstnow ranks results with no valid scores as worst instead of bestpass?andworstare behavior changes)overallintentionally stays as the mean of valid scores, a partial score is still informative; only the gate requires completeness.Verification
bundle exec rake test: 136 runs, 301 assertions, 0 failures (9 new regression tests: all-nil scores, partial failure with high overall, error-free results, non-Hash details, report summary/worst/JSON with errors)bundle exec rubocop: no offensesEvaluatorwith a metric raisingJudgeError:{failing: nil, passing: 1.0}now yieldspass? == false, appears inReport#failures, and the summary shows the error count lineImplementation delegated to Codex, reviewed and verified with Claude Code.
CodeFactory builder