Repository navigation
test(evals): Move the last evals to the agent test fixture and use the judge matcher - #2038
Merged
Merged
Conversation
Move the eight evals that still used the old Slack harness to the agent test fixture, and remove the harness. Every eval that runs the agent now uses the fixture. Add the skills suite for the fixture skills and the two eval plugins with MCP tools. Move the file tool and GitHub skill evals into the coding suite. The fixture now replays the web pages that webFetch reads, at the HTTP boundary. Refs #2001 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The fixture contract lets a test run any vitest-evals judge on a call result. A judge that asks a model needs this harness. Refs #2001 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Rubric checks in agent evals now use the vitest-evals judge matcher. The
`criteria` option of `run()` and `continue()` is gone.
```ts
// Before: the fixture judged the call.
const conversation = await run(mention("what did i just ask?"), {
history,
criteria: rubric({ pass: ["Recalls the budget and Friday."] }),
});
// After: the test asserts with a vitest-evals judge.
const conversation = await run(mention("what did i just ask?"), { history });
await expect(conversation.evalRun).toSatisfyJudge(
RubricJudge,
rubric({ pass: ["Recalls the budget and Friday."] }),
);
```
With `criteria`, the fixture called its own judge function, wrote
`task.meta.eval` by hand, and asserted the threshold. vitest-evals
already does all three for `toSatisfyJudge()`.
- **`RubricJudge`** is a `createJudge()` judge with its own judge
harness. The prompt, the judge model, and the scores for each answer do
not change.
- **`rubric({ pass, fail })`** returns the matcher options and adds the
0.75 threshold. The default threshold of the matcher is 1.
- **Earlier messages** of the Conversation are on the session metadata
of `conversation.evalRun`. The judge reads them as context and scores
only the replies of that call, as before.
- **The abort signal** of the judge request comes from the current test.
Outside `describeEval()`, the matcher gives the judge no signal.
**Review focus**
- A codemod changed the 104 uses in 34 eval files. Each judge assertion
is directly after its call, so the order of judge and exact assertions
is the same. A call that had no variable now has one, named
`conversation` or `result`.
- This changes the contract in #2001, which lists `criteria` as a call
option.
- This pull request is on top of #2038.
Refs #2001
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 5.5 <[email protected]>
dcramer
marked this pull request as ready for review
October 6, 2026 15:21
A call result is now also the vitest-evals run of that call, so a test writes expect(conversation).toSatisfyJudge(...). The evalRun field is gone. Refs #2001 Co-Authored-By: Claude Opus 5.5 <[email protected]>
A call that timed out or threw left no run on the test. The eval report then counted the test as a failure outside the evals, and that fails the behavioral gate at any pass rate. The fixture now records the run with the error, so the test counts as a failed eval. Refs #2001 Co-Authored-By: Claude Opus 5.5 <[email protected]>
The webSearch tool asked the real search provider through the AI Gateway. Each search took 10 to 19 seconds, and the documentation links case sometimes was not idle within 60 seconds. The fixture now answers the search request. webSearchResults() sets the results of a test, and a search finds nothing without it. Refs #2001 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
3 screenshot changes — 3 changed · 0 added · 0 removed Review screenshots in Frameshift
|
State in its docs that the fixture always mocks the search provider. Refs #2001 Co-Authored-By: Claude Opus 5.5 <[email protected]>
10 tasks
This branch was successfully deployed
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.
Moves the last eight evals on the old Slack harness to the agent test fixture, and removes the harness. Rubric checks in all agent evals now use the vitest-evals judge matcher. Every eval that runs the agent uses the fixture, and the
agent-test-importslist in the test architecture baseline is empty.Where the evals are now
skillssuite (evals/skills/, new):action-review,providers,routing, andinvocation. The suite has the skills infixtures/skills/, the skills of the Agent Browser plugin, and theeval-mcpandeval-guardian-actionsplugins as TypeScript registrations. The Agent Browser plugin itself is not installed. Its sandbox packages take minutes to install, and the one case that needs its skills only checks which skill the agent loads.codingsuite:evals/coding/files.eval.tsandevals/coding/github.eval.ts.evals/agent/):researchandslack-user-status.Rubric checks use the vitest-evals matcher
The
criteriaoption ofrun()andcontinue()is gone. With it, the fixture called its own judge function, wrotetask.meta.evalby hand, and asserted the threshold. vitest-evals already does all three fortoSatisfyJudge().RubricJudgeis acreateJudge()judge with its own judge harness. The prompt, the judge model, and the score for each answer do not change.rubric({ pass, fail })returns the matcher options and adds the 0.75 threshold. The default threshold of the matcher is 1.expect(conversation).toSatisfyJudge(...). TheevalRunfield is gone.describeEval(), the matcher gives the judge no signal.Other fixture additions
webFetchreplay at the HTTP boundary.src/fixture/web.tsrecords the response to each request that has thewebFetchuser agent, and answers later requests from the recording. The old harness replaced the tool with atoolOverrideshook thatcreateApp()does not have. The recordings are now raw responses, so the real HTML extraction runs. The three Slack pages of the research eval are about 260 KB, where the old recordings of extracted text were about 30 KB.webSearchis mocked. The tool asks a search provider through the AI Gateway. The fixture answers that request, as it already does for image generation. The mock is always on, so no search reaches the real provider. A search finds nothing by default, andmockWebSearchResults()sets the results for one test. The documentation links case took about 40 seconds with two live searches and sometimes passed the 60 second limit. It now takes about 10 seconds.toolCallsOf()andmcpToolCallsOf()return the calls of one tool in any state. A call that Guardian rejects has theerrorstatus.Case changes
viewImagereads it from the sandbox. The oldview_image_filesoverride replaced the file read of the tool.event()forlocal/headless-fixture#42with a summary that told the agent what to change. It is now inevals/coding/subscriptions.eval.ts. The agent creates the watch, and a realcheck_suitewebhook delivers the failure. The GitHub plugin writes the event summary, so the fixture skill now says which pull request its checkout is and what thetestcheck needs.slackCanvasCreatetool call.Removed
src/behavior-harness.ts,src/harness/,src/helpers.ts,src/eval-result.ts, and their tests. This removes theinitialEvents,events,steer(),overrides, andpreloadHistoryeval input. Guardian and router evals keep their own harness.fixtures/plugins/andfixtures/guardian-action-plugins/. Their skills are infixtures/skills/.tests/fixtures/experimental-setup.tsfrom the behavioral and integration configs.createApp()sets the experimental features from its options, so the file had no effect on fixture evals.policies/evals.mdno longer names it.Review focus
criteriaas a call option,evalRunas a result field, andwebSearchas replayed. This change removes the first two and mockswebSearch.readEvalEgressFixtureState()and leavessrc/eval-egress.tsas it is, because fix(evals): Use account-backed Cloudflare tunnels in CI #1918 changes that file.Refs #2001
🤖 Generated with Claude Code