Repository navigation
feat!: run the judge as one workflow step - #25
TheGreatAxios wants to merge 2 commits into
Conversation
jev() keeps thresholds and escalation only. judgeModel, exported from the workflow entry, forces a single step whose input is the case payload.
|
Triage: Pass No changes needed from you. A maintainer will review this pull request. Skipped:
Waiting on a maintainer to approve: approve, request review. |
TheGreatAxios
left a comment
There was a problem hiding this comment.
Review · Request changes
Runs the judge as one workflow step whose input is the case payload { state, questions }. A bare step() does that. A one-step defineWorkflow() is rejected before the step runs.
Findings
src/workflow.ts:107—assertJudgeStepthrowsjudgeModel: step must not set inputfor a workflowdefineWorkflowbuilds. Both the plural form (steps: { only: step({ agent }) }) and the singular form (defineWorkflow({ id, agent })) stamp the only step withinput: { from: "trigger.payload" }even when the author omitsinput.judgeModeloverwritesinputto that same value only after this check, so the normalized default is a false rejection. README saysmodelmay be a one-step workflow, and that form never receives the case payload. Callers have to pass a barestep()or a hand-built definition that skipped normalization.
A bare step() input was exactly { state, questions } for the case. A two-step workflow, a map, and a childWorkflow were rejected. A null step output failed closed as a parse error, and the step timeout aborted request.signal. bun test tmp/critique-tests/judge-model.test.ts exited 1 on the two defineWorkflow forms. That probe was deleted.
defineWorkflow stamps a lone step with { from: "trigger.payload" } even when the author omits input. judgeModel treated that stamp as a custom input and never ran the step.
Review · Follow-upCommit
|
|
Superseded by the 0.2.0 release: #32 |
Summary
jev()keeps thresholds and escalation only. It no longer takes an endpoint, model, API key, or HTTP client.judgeModel()runs that judge as one workflow step. It is exported only from@corbits/evals/workflow.runEvaluationthrows before cases when a string oraskscorer has nojudge.invoke. Code-only scorers do not need a judge.Verification
bun run checkexited 0 (typecheck, oxlint, oxfmt, unit tests, 56 e2e tests).cc8e6b0found no defects.Stacked on #24.
Fixes CL-11499