test(#184): add missing no-criteria + inline-criteria tests for JudgeAgent#549
test(#184): add missing no-criteria + inline-criteria tests for JudgeAgent#549drewdrewthis wants to merge 1 commit into
Conversation
…or JudgeAgent Two new tests close the gap noted in issue #184: 1. When judgmentRequest is set but criteria is empty, the agent must short-circuit before calling the LLM and return failure with a 'No criteria' message. 2. When judgmentRequest carries inline criteria, the judge should use those (not the empty base list) and call the LLM normally. All 20 judge-agent tests now pass. Closes #184 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
b3925cf to
09814f4
Compare
|
Automated low-risk assessment This PR was evaluated against the repository's Low-Risk Pull Requests procedure.
An approving review has been submitted by automation. The PR may merge once required CI checks pass. |
|
[grinder] READY for human review CI: green (zero failing, zero pending) Verified by: |
Summary
The
judge-agent.test.tsfile had comprehensive coverage for trace-size paths but was missing thejudgmentRequestenforcement path tested in isolation. Closes #184.New tests added
"when no criteria provided and judgment requested"
returns failure with 'No criteria' reasoning without calling the LLM— verifies the early-return short-circuit whenjudgmentRequest != nullbut criteria list is emptyuses inline criteria from judgmentRequest when provided— verifies inline criteria injudgmentRequestoverride the agent's empty base list and the LLM is called normallyTest plan
pnpm exec vitest run src/agents/judge/__tests__/judge-agent.test.ts→ 20/20 passedCloses #184
🤖 Generated with Claude Code