feat(config)!: hard-deprecate the graders: config block — a grader is just a target - #1705
Merged
Conversation
… just a target
Peer-framework research this session (Margin-Lab/evals, Harbor) found neither
maintains a separate grader/judge schema type distinct from their target/agent
config — Margin-Lab's own docs say it outright: "there is no separate grader
abstraction." AgentV's own design principles already prefer config-level
grader selection through `defaults.grader` over target-level `grader_target`,
and the live `.agentv/targets.yaml` execution path already resolves
`grader_target`/`defaults.grader` against the same target-id namespace. The
only place a separate "grader" entity still existed was the newer, dead
`graders:` top-level config-graph schema (`NormalizedGraderConfig`) — zero
implementation depth, nothing ever turned it into a Provider. A grader can
also need grading itself (oracle/calibration checks), which only works for
free if it's addressable the same way as any other target.
- config-graph.ts: remove `NormalizedGraderConfig`/`parseGraders`/the
`graders` field from `ComposableConfigGraph`; authoring a `graders:` block
now throws a clear error pointing at folding entries into `targets`.
`defaults.grader` now validates against the same `graph.targets` pool as
`defaults.target`, instead of the removed `graph.graders`.
- eval-file.schema.ts: same hard-rejection for the Zod schema backing the
published eval.schema.json (IDE-autocomplete surface), matching the existing
pattern for other removed fields (`eval_cases`, `providerPromptMap`).
- config-loader.ts: drop the `graders` pass-through.
- Updated the one place in docs, README.md, and the readme-quickstart example
that authored a `graders:` block, folding each grader into `targets:`.
readme-quickstart's targets.yaml/graders.yaml also still had the legacy
`${{ VAR }}` env syntax (pre-existing, unrelated breakage) — fixed to
`{{ env.VAR }}` in the same pass since the file needed touching anyway.
- Added a CONCEPTS.md entry disambiguating grader-selection (a target) from
grader-method (an assertion type) and grader-prompt (criteria/rubric).
Verified: full workspace typecheck and lint clean; 935 tests across the
touched loader/validation/orchestrator suites pass; all 109 example eval
files validate; live CLI check confirms the error fires end-to-end and the
folded-into-targets shape validates cleanly.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Deploying agentv with
|
| Latest commit: |
6e7c322
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4f84be5a.agentv.pages.dev |
| Branch Preview URL: | https://fix-deprecate-graders-schema.agentv.pages.dev |
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.
Summary
Follow-up to PR #1703 (wired
defaults.graderas a config-level fallback). This session's research (peer frameworks + this repo's own design principles + the live execution path) converged on: a grader is not a distinct entity, it's a target selected for a grading role..agents/product-boundary.mdalready lists "config-level grader targets selected throughdefaults.grader... not target-level grader configuration" as a preferred pattern..agentv/targets.yamlexecution path already resolvesgrader_target/defaults.graderagainst the same target-id namespace — there was never a real separate grader concept there.config-graph.ts'sgraders:top-level array (NormalizedGraderConfig) — confirmed zero implementation: nothing ever turned it into a Provider.Changes
config-graph.ts: removedNormalizedGraderConfig/parseGraders/thegradersfield. Authoring agraders:block now throws:Field 'graders' in ... has been removed. A grader is just a target — move each entry into 'targets' and select it via 'defaults.grader' or an assertion's target override.defaults.gradernow validates against the samegraph.targetspool asdefaults.target(previously checked the now-removedgraph.graders).eval-file.schema.ts: same hard-rejection viaz.never(), matching the existing pattern for other removed fields (eval_cases,providerPromptMap) — this backs the publishedeval.schema.jsonIDE-autocomplete surface.config-loader.ts: dropped the deadgraderspass-through.targets/configuration.mdx,targets/coding-agents.mdx,targets/cli-provider.mdx,targets/custom-providers.mdx,targets/llm-providers.mdx,evaluation/running-evals.mdx), rootREADME.md, and thereadme-quickstartexample all had agraders:block — folded each intotargets:. (Swept every othergraders:-in-README hit first and confirmed the rest are an unrelated, still-valid pattern: per-assertion script graders like{name, type: script, command}, not this schema.)readme-quickstart's.agentv/targets.yaml/graders.yamlalso still had the legacy${{ VAR }}env syntax (pre-existing, unrelated breakage from an earlier hard-deprecation pass that missed this example) — fixed to{{ env.VAR }}in the same pass since the file needed touching anyway.CONCEPTS.mdentry disambiguating grader-selection (a target) from grader-method (an assertiontypelikellm-rubric/code-grader) and grader-prompt (criteria/rubricvalue) — three senses of "grader" that collide in this codebase.Known pre-existing gap noticed but NOT fixed here (out of scope)
This repo's own root
.agentv/config.yamlcurrently failsagentv validatefor an unrelated reason:execution.verbose/execution.keep_workspacesaren't supportedexecutionfields (onlymax_concurrencyis). Untouched by this PR — flagging separately rather than scope-creeping this change.Test plan
config-graph.tsrejects an authoredgraders:block (directloadComposableConfigGraphtest);eval-file.schema.tsrejects it too (Zod schema test). Both also updated their sibling "accepts composable graph fields" tests to fold grader intotargets:.bun test packages/core/test/evaluation/loaders packages/core/test/evaluation/validation— 656 pass. Plus the 4 files I hand-edited individually — 279 pass (includes overlap).bun run typecheck(full workspace) — clean.bunx biome checkon touched source/test files — clean.bun run validate:examples— 109/109 example eval files valid..agentv/config.yamlwith an authoredgraders:block fails with the new error message end-to-end viabun apps/cli/src/cli.ts validate; the folded-into-targets:version validates cleanly.🤖 Generated with Claude Code