Skip to content

feat(core): configurable threshold + naming taxonomy cleanup#951

Merged
christso merged 8 commits intomainfrom
feat/925-threshold-taxonomy-cleanup
Apr 6, 2026
Merged

feat(core): configurable threshold + naming taxonomy cleanup#951
christso merged 8 commits intomainfrom
feat/925-threshold-taxonomy-cleanup

Conversation

@christso
Copy link
Copy Markdown
Collaborator

@christso christso commented Apr 6, 2026

Summary

  • Rename PASS_THRESHOLDDEFAULT_THRESHOLD with deprecated alias
  • Thread configurable threshold through orchestrator → evaluator pipeline
  • Wire per-test execution.threshold in YAML parser (resolution: CLI > test > suite > default)
  • Add min_score (0-1 scale) to assertions and rubrics, deprecating required: number and required_min_score (0-10)
  • Rename studio pass_thresholdthreshold with backward-compatible fallback
  • Regenerate eval-schema.json, update docs, examples, skill references
  • Update AGENTS.md with live eval + agent-browser studio verification requirements

Test plan

  • All 1817 unit tests pass (1365 core + 67 eval + 385 cli)
  • Build + typecheck + lint pass
  • 53/53 example YAML files validate
  • Live eval with --threshold 0.5 correctly classifies 6/7 tests as passing
  • Studio settings page renders, displays threshold, saves correctly as studio.threshold
  • Studio API returns {"threshold":0.6} after save (not pass_threshold)
  • Config YAML writes studio.threshold and cleans legacy pass_threshold
  • Code review pass — no issues found

E2E Evidence

Green: Live eval with configurable threshold

$ bun apps/cli/src/cli.ts eval examples/features/basic/evals/dataset.eval.yaml --target azure --threshold 0.5
RESULT: FAIL  (6/7 scored >= 0.5, mean: 0.851)

Threshold of 0.5 correctly used (not hardcoded 0.8). 6/7 tests pass at the lower threshold.

Green: Studio config API

$ curl -s http://localhost:3847/api/config
{"threshold":0.8}                    # Before save (default)
{"threshold":0.6}                    # After saving 0.6 via UI

Green: Config file persistence

studio:
  threshold: 0.6                     # New field name, not pass_threshold

Closes #925

🤖 Generated with Claude Code

christso and others added 5 commits April 6, 2026 03:47
…configurable threshold

- Rename PASS_THRESHOLD to DEFAULT_THRESHOLD with deprecated alias
- Add threshold parameter to scoreToVerdict()
- Thread threshold through orchestrator: evaluateCandidate → runEvaluatorsForCase → runEvaluatorList
- Wire per-test execution.threshold in yaml-parser
- Fix evaluate() API: add EvalConfig.threshold, pass to computeSummary()
- Fix required gate to use configurable threshold instead of hardcoded 0.8
- Replace local PASS_THRESHOLD constants in benchmark-writer and artifact-writer with import
- Resolution order: CLI --threshold > test execution.threshold > suite execution.threshold > DEFAULT_THRESHOLD

Closes #925 (partial)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add min_score (0-1) to EvaluatorCommonSchema and all 22 evaluator config types
- Parse min_score from YAML via parseRequiredAndMinScore helper
- Deprecated: required: <number> now emits warning, parsed as required: true + min_score
- Orchestrator required gate reads min_score preferentially over required: number
- Add min_score to EvalAssertionInput (programmatic API)

Closes #925 (partial)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…min_score (0-10)

- Add min_score to RubricItemSchema and RubricItem type (0-1 scale)
- Parser: min_score takes priority over deprecated required_min_score
- Parser: required_min_score emits deprecation warning, converts to min_score
- LLM grader: compare normalized score against min_score (avoids rounding issues)
- Prompt generation: prefer min_score for criterion labels
- Inline rubrics: support both min_score and required_min_score

Closes #925 (partial)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- StudioConfig.pass_threshold → StudioConfig.threshold
- loadStudioConfig: reads studio.threshold, falls back to studio.pass_threshold, then root pass_threshold
- saveStudioConfig: writes threshold, cleans legacy pass_threshold from both root and studio
- StudioConfigResponse: add threshold field, deprecate pass_threshold
- Update all studio components to read threshold with pass_threshold fallback
- serve.ts: destructure as { threshold: pass_threshold } for minimal component diff

Closes #925 (partial)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…threshold

- Regenerate eval-schema.json with min_score fields
- Update rubric example: required_min_score: 8 → min_score: 0.8
- Update rubrics docs: add min_score, note required_min_score deprecation
- Update skill reference: add min_score field, deprecate required_min_score
- Update AGENTS.md: add live eval + agent-browser studio verification steps
- Fix lint formatting issues

Closes #925 (partial)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Apr 6, 2026

Deploying agentv with  Cloudflare Pages  Cloudflare Pages

Latest commit: b10e335
Status: ✅  Deploy successful!
Preview URL: https://34edc061.agentv.pages.dev
Branch Preview URL: https://feat-925-threshold-taxonomy.agentv.pages.dev

View logs

@christso christso marked this pull request as ready for review April 6, 2026 04:11
christso and others added 3 commits April 6, 2026 05:33
…Schema 2019-09

- Remove required_min_score from RubricItemSchema (Zod) and regenerated eval-schema.json
- Parser still handles required_min_score at runtime with deprecation warning
- Upgrade schema from JSON Schema draft-07 to 2019-09 (newest supported by zod-to-json-schema)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@christso christso merged commit decc906 into main Apr 6, 2026
4 checks passed
@christso christso deleted the feat/925-threshold-taxonomy-cleanup branch April 6, 2026 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: configurable threshold + naming taxonomy cleanup

1 participant