Repository navigation
Conversation
dcramer
force-pushed
the
dcramer/test/migrate-vitest-evals-harness
branch
from
June 27, 2026 18:49
8507ed7 to
da42106
Compare
Move the eval suite to the current vitest-evals harness and judge APIs, using the existing embedded-agent provider factory so evals run against the configured provider credentials. Update the eval docs and mocks for the OpenRouter-backed path. Co-Authored-By: GPT-5 Codex <[email protected]>
Keep agent evals on the same default judge threshold as the other eval helpers and make explicit Sentry syntax deterministic without requiring a discovery call. Co-Authored-By: GPT-5 Codex <[email protected]>
Describe the whoami value as an email address instead of a prequoted Sentry search token. This keeps issue event search guidance consistent with the rule to avoid quoting simple email values. Co-Authored-By: GPT-5 Codex <[email protected]>
Allow MSW test setup to bypass OpenAI, Anthropic, OpenRouter, and Azure OpenAI provider calls while continuing to fail on unmocked product API requests. Co-Authored-By: GPT-5 Codex <[email protected]>
Restore targeted datasetAttributes filters for custom field discovery while keeping common-field search paths tool-free. Update stdio testing docs to use the supported Node 22.13 minimum and a newer Node 24 check instead of Node 20. Co-Authored-By: Codex <[email protected]>
Handle the AI SDK streaming response union before asserting the non-streaming agent tool result. Co-Authored-By: OpenAI Codex <[email protected]>
dcramer
force-pushed
the
dcramer/test/migrate-vitest-evals-harness
branch
from
July 28, 2026 21:47
609a077 to
6a699d0
Compare
Treat malformed or relative request URLs as non-provider traffic so MSW can report the intended unhandled request error. Co-Authored-By: OpenAI Codex <[email protected]>
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 39d5d8d. Configure here.
Expect substring and numeric-type filters in search-event agent discovery calls so strict eval matching rewards the current prompt guidance. Co-Authored-By: OpenAI Codex <[email protected]>
This was referenced Nov 5, 2026
dcramer
added a commit
that referenced
this pull request
Nov 5, 2026
The Eval workflow on `main` reports green, but no evals have run. `eval:ci` fails at startup: ``` Failed to load custom Reporter from vitest-evals/reporter cause: Package subpath './reporters' is not defined by "exports" (ERR_PACKAGE_PATH_NOT_EXPORTED) ``` The cause is that vitest-evals 0.4.0 imports `vitest/reporters`, which vitest 5 removed. `continue-on-error` on "Run evals" hides the failure, so no `eval-results.json` gets written and the status check step throws. Example run: https://github.com/getsentry/toolkit/actions/runs/41951775819 This PR moves the eval package to vitest-evals 0.18.0, which supports vitest 5 (getsentry/vitest-evals#113, peer range `vitest >=5 <6`). The whole repo stays on vitest 5; there is no vitest 4 pin. ## Changes - **Bump `vitest-evals` to `^0.18.0`.** I added `[email protected]` and its `@vitest-evals/[email protected]` and `@vitest-evals/[email protected]` dependencies to `minimumReleaseAgeExclude`, because they were published today. Drop those entries once they are past the 24h window. - **Import from `vitest-evals/legacy`.** 0.18 keeps the scorer-first API (`describeEval` with `data`/`task`/`scorers`, `ToolCallScorer`, `Score`, `ScoreFn`, `BaseScorerOptions`) under `vitest-evals/legacy`. This is an import-path change only, in the 33 eval imports and the example in `docs/testing/overview.md`. The eval code is unchanged. - **Remove the unused root `vitest-evals` dev dependency.** Nothing at the root imports it. - **Set `SENTRY_CLI_NO_TELEMETRY=1` for the scorer's `sentry mcp` process.** - `ToolPredictionScorer` starts `pnpm --dir packages/cli run cli mcp` from source. On `main`, that process exits immediately with ``Package subpath './client' is not defined by "exports"``, and every scorer then fails with `MCPClientError: Connection closed`. - The exit comes from `lazyTelemetry()` in `src/lib/db/index.ts`. It loads `../telemetry.js` with `createRequire`, so its imports resolve `@sentry/api/client` under the `require` condition, but `@sentry/api` exports `./client` only for `import`. - Evals shouldn't send CLI telemetry anyway. The CLI bug itself is not fixed here: `pnpm --filter sentry run cli help` also fails from source. It needs its own CLI fix. `continue-on-error` and the eval status check are unchanged. ## Verification - **Local, no LLM key:** with no key in the sandbox, `pnpm eval:ci` on vitest 5.0.5 loads the reporter, collects and runs all 27 files and 121 evals, and writes `eval-results.json`. On `main` it stops at startup. Every eval failed, and the only cause was the missing provider key. No `Connection closed` errors. - **Checks:** `pnpm run tsc`, `pnpm run lint`, and `pnpm install --frozen-lockfile` pass. The full `pnpm run test` didn't finish inside my sandbox's time limit, so I'm relying on CI for it. ## Related - #1132 (draft, "Migrate to vitest-evals harness") moves these evals to the harness API. It touches the same eval files, so expect import conflicts there. This PR keeps the current scorer-first suite running until then. - #1972 (Roach recordings for evals) depends on this, because Roach records nothing while the suite doesn't run. Both PRs change `pnpm-lock.yaml` and `pnpm-workspace.yaml`, so #1972 needs a rebase after this merges. <!-- junior-request-attribution:start --> via @dcramer. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3A1de0f02c391e347294cc7ce28353bcfe --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3A1de0f02c391e347294cc7ce28353bcfe) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A1de0f02c391e347294cc7ce28353bcfe/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: David Cramer <[email protected]>
Contributor
|
Closing as stale: #1973 moved the eval suite onto vitest-evals 0.18 (legacy API). A move to the new harness API is easier to redo than to rebase. |
This branch was previously 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.

The eval suite now uses the current vitest-evals harness and judge APIs instead of the old scorer-style wiring. The shared helpers keep the eval files small while preserving the existing expected tool calls and structured output checks.
Eval model setup now goes through the existing embedded-agent provider factory, so OpenRouter-backed credentials work the same way as the runtime AI tools. The PR also tightens the affected search prompts from eval traces and updates the eval docs, mocks, and suite-wide timeout configuration to match the new harness.