fix(report): an execution with no scores is the worst one, not the best - #21
Merged
Merged
Conversation
Two Codex findings on the merged UI work, both real. - reportBlocks picked the best execution per row by mean score and returned positive infinity for an execution with no scores at all. An execution with no scores is an *errored* one, and it is the most interesting thing that can have happened to a row — ranking it as the best candidate hid it behind a sibling that happened to score. It now sorts last (negative infinity), so the failure is what the reader sees. This is the same "absent is not zero" shape I had already avoided elsewhere in this file, applied inconsistently here. - PrecisionPanel read `precision.resolution` and `precision.target_resolvable` from the top level only, but the report writes both nested under `precision.run` for a single-run report; the panel silently rendered nothing. It now falls back to the nested block. `target_resolvable` is also read as three-state: absent is unknown, not "not resolvable" — a missing field was rendering the assertive "target not reachable" copy on reports that never computed it. New `text_target_unknown` string in both en and it. Three regression tests, 26 -> 29. tsc --noEmit clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EZ4u82zdoa8naYm75kppMC
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.
Work item
Branch or work item:
claude/review-round-1— two Codex findings on the merged report-UI work.Summary
An errored execution (no scores at all) was ranking as the best candidate for a row and hiding the failure, and the precision panel read fields only from the top level while single-run reports nest them under
precision.run.Changes
Files/subsystems changed:
resources/js/utils/reportBlocks.ts,resources/js/components/report/PrecisionPanel.tsx,resources/js/i18n/messages.ts,resources/js/components/report/reportPanels.test.tsx.reportBlocks.ts— unscored ranks lastPicking the best execution per row by mean score returned positive infinity when an execution had no scores. An execution with no scores is an errored one, and it is the most interesting thing that can have happened to a row — ranking it best hid it behind a sibling that happened to score. It now sorts last (
Number.NEGATIVE_INFINITY), so the failure is what the reader sees.This is the same "absent is not zero" shape already handled correctly elsewhere in the same file — applied inconsistently here.
PrecisionPanel.tsx— nested block + three-state resolvabilityresolutionandtarget_resolvablewere read from the top level only, but the report writes both nested underprecision.runfor a single-run report: the panel silently rendered nothing. It now falls back to the nested block.target_resolvableis read as three-state. Absent means unknown, not "not resolvable" — a missing field was rendering the assertive "target not reachable" copy on reports that never computed it.UI/UX changes
New
text_target_unknownstring (en + it): a neutral line when resolvability was not computed, replacing a wrong assertion.Documentation changes
None — no documented behaviour changes; the panel now renders on report shapes where it previously rendered nothing.
Test gate
tsc --noEmitcleanStability impact
@apiclasses/methods/constants changed? NoSecurity / privacy impact
Risk / rollback
Generated by Claude Code