Repository navigation
feat(observe): run code evaluators on new traces - #759
Merged
Merged
Conversation
The daemon now runs enabled `code` evaluator rules on each trace whose root observation ends: filter + sample_rate decide, the rule source runs in the isolate sandbox (timeoutMs 2000), and the result is written as a `source: 'online'` score named after the rule. Ingest only hands the worker the ended roots' trace ids; matching and runs happen off the request, one at a time, with a bounded in-memory queue (drops are counted). Without isolated-vm, code rules are skipped with one warning. Adds POST /api/v1/evaluators/:id/test, a dry run on one trace that writes no score, and 'online' to the score sources. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- runOnce now returns undefined for a trace with no root observation (read once); POST /api/v1/evaluators/:id/test answers 404 for it. - Dry runs share one promise chain, so parallel /test calls never start parallel isolates. - The daemon ack test's fake sandbox waits 1000 ms, well past its 200 ms bound. - Studio's Scores screen lists the 'online' source. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The daemon always hands routes its worker, so the optional field only created an unreachable `throw new Error(...)` in the /test route (flagged by plainErrors.test.ts). RouteContext.evaluators is now required; route tests pass a real worker over their db. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LinuxDevil
force-pushed
the
obs/o24-code-evaluators
branch
from
October 28, 2026 22:33
85b5674 to
1c284f8
Compare
CI counted 853 entries with the online evaluator modules; keep ~10% headroom. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Online code evaluators: enabled code rules run in the isolate sandbox on each new trace's root end (off the ingest path, bounded queue), writing source:'online' scores; adds POST /api/v1/evaluators/:id/test as a dry run for Studio's test-on-trace.
Ticket: O24 (Forge Observe vs LangSmith evaluation follow-up)
Changes
Verification: focused vitest,
tsc --noEmit, eslint on changed files (details in the review package); full suite and fallow run in CI.🤖 Generated with Claude Code