Skip to content

Improve error handling and logging in evaluation judge#1706

Merged
dgageot merged 1 commit intodocker:mainfrom
dgageot:llm-judge
Feb 12, 2026
Merged

Improve error handling and logging in evaluation judge#1706
dgageot merged 1 commit intodocker:mainfrom
dgageot:llm-judge

Conversation

@dgageot
Copy link
Member

@dgageot dgageot commented Feb 12, 2026

  • Propagate stream errors instead of silently ignoring non-EOF errors
  • Return idiomatic (passed, reason, error) from parseJudgeResponse instead of a custom struct with a parsed bool
  • Add structured logging for parse failures and successful responses
  • Wrap JSON parse errors with fmt.Errorf for proper error chaining

Assisted-by: cagent

- Propagate stream errors instead of silently ignoring non-EOF errors
- Return idiomatic (passed, reason, error) from parseJudgeResponse
  instead of a custom struct with a parsed bool
- Add structured logging for parse failures and successful responses
- Wrap JSON parse errors with fmt.Errorf for proper error chaining

Assisted-by: cagent
@dgageot dgageot requested a review from a team as a code owner February 12, 2026 12:51
Copy link

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Code looks good! No issues found in the changed code.

The PR successfully improves error handling:

  • Stream errors are properly propagated instead of being silently ignored
  • The function signature change to (passed, reason, error) is idiomatic Go
  • Error wrapping with fmt.Errorf provides proper error chains
  • Structured logging adds helpful observability for debugging

All test cases align with the implementation and error paths are correctly handled.

@dgageot dgageot merged commit ba7530a into docker:main Feb 12, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants