feat(cli): --threshold flag for suite-level quality gates#760
Merged
Conversation
Design document for suite-level quality gate threshold flag that fails CI when mean eval score drops below a specified value. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: 1604663b3709
8-task TDD plan covering core extractor, YAML schema, CLI flag, threshold check, JUnit integration, and manual UAT. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: 6cfbff7718f7
PR #757 moved content from CLAUDE.md to AGENTS.md but accidentally dropped several sections: Evaluator Type System, Git Workflow (issue claiming, PRs, worktrees), Version Management, Package Publishing, and Python Scripts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: 1ed266d094ed
…698) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add threshold to ExecutionSchema in Zod, wire extractThreshold through yaml-parser.ts (import, re-export, EvalSuiteResult type, loadTestSuite), and regenerate eval-schema.json. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
process.exitCode was being reset by the cmd-ts handler wrapper. Return thresholdFailed from runEvalCommand and call process.exit(1) in the handler instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add CLI range validation (0-1) for --threshold flag - Document threshold in running-evals.mdx, eval-files.mdx, and SKILL.md - Remove temporary plan files before merge Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Deploying agentv with
|
| Latest commit: |
5ea4e4b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://da03569e.agentv.pages.dev |
| Branch Preview URL: | https://feat-threshold-flag.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
--threshold <0-1>CLI flag toagentv evalthat exits with code 1 if mean quality score falls below the thresholdexecution.thresholdYAML config field (CLI flag takes precedence)Closes #698
Changes
Core (
packages/core/):extractThresholdin config-loader (followsextractFailOnErrorpattern)thresholdfield inExecutionSchema(Zod validation: 0-1)yaml-parser.tsintoEvalSuiteResultCLI (
apps/cli/):--thresholdoption inrun.tscommand definitionrun-eval.tsformatThresholdSummary()instatistics.tsJunitWriterOptionsprocess.exit(1)when threshold fails (avoids cmd-ts resettingprocess.exitCode)Docs & Skills:
running-evals.mdx: Suite-Level Quality Threshold sectioneval-files.mdx: threshold in execution field tableSKILL.md: threshold section + CLI flag in command referenceTest Plan
extractThreshold(8 cases),formatThresholdSummary(4 cases), JUnit threshold (2 cases)🤖 Generated with Claude Code