feat(cli): validate only selected cases in run (#121)#131
Merged
Conversation
…ite (#121) Previously `skill-up run` validated the whole suite (eval + every case) before applying --include-case-name / --exclude-case-name filters, so one invalid unselected case blocked a filtered run — forcing smoke and full suites into separate eval files. Now run validates the eval-level config at load, then validates only the cases left after filtering. `skill-up validate` is unchanged and still checks the whole suite via ValidateAll. - Split Validator.ValidateAll into ValidateEvalConfig + new ValidateCases (dup-ID/dup-file + per-case checks over a given set). - Add CaseConfig.SourceFile (loader-populated, yaml/json "-"), keying duplicate-case detection off ID+SourceFile so it is correct for any subset. This also removes the fragile result.Cases↔Eval.Cases.Files index-alignment the #123 check relied on. - run.go: eval-level validation in loadFromEvalYAML; ValidateCases over the filtered set in loadAndPrepareConfig. - Document the run-vs-validate distinction (CLI help + cli-reference). Co-Authored-By: Claude Opus 4.8 <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.
Fixes #121.
Problem
skill-up runvalidated the whole suite (eval config + every case) before applying--include-case-name/--exclude-case-namefilters. So one invalid unselected case blocked a filtered run — forcing teams to split smoke and full suites into separate eval files even when they share the same skill/environment/engine/fixtures.Change
runnow validates the eval-level config at load, then validates only the cases left after filtering. An invalid case that is filtered out no longer blocks the run.skill-up validateis unchanged and still validates the whole suite (every case) regardless of filters.Implementation
Validator.ValidateAllintoValidateEvalConfig(suite-level) + newValidateCases(cases)(duplicate-ID / duplicate-file + per-case checks over whatever set is passed).ValidateAll = ValidateEvalConfig + ValidateCases(all), sovalidatebehavior is identical.CaseConfig.SourceFile(loader-populated,yaml:"-" json:"-"). Duplicate-case detection now keys offID+SourceFile, so it is correct for any subset — and this removes the fragileresult.Cases ↔ Eval.Cases.Filesindex-alignment the Validate duplicate case IDs and duplicate case file references #123 check relied on.run.go: eval-level validation inloadFromEvalYAML;ValidateCasesover the filtered set inloadAndPrepareConfig.run-vs-validatevalidation scope documented in the command help andcli-reference.md.Note: the
--auto/evals.jsonrun path now also validates its cases (previously unvalidated). This is safe — converted cases carry prompts, and their emptySourceFileskips the file-duplicate check.Verify (matches the issue's steps)
internal/clitest: an eval with a validsmokecase + an invalidfullcase (script judge, noscript_path).run --include-case-name smokesucceeds; unfilteredrunfails with thescript_patherror.ValidateCasesscoped duplicate detection;ValidateCases([valid])passes whileValidateCases([valid, invalid])fails.go test -race ./...green;gofmt/go vetclean.🤖 Generated with Claude Code