ISSUE DESCRIPTION waza check eval discovery is inconsistent with coverage and run in…
- User
ISSUE DESCRIPTION
waza checkeval discovery is inconsistent withcoverageandrunin multi-skill workspacesSummary
In a multi-skill workspace,
waza coverage .andwaza run evals/.../eval.yamlboth recognize the eval structure, butwaza checkdoes not discover the related eval suite consistently.This creates a confusing user experience because the workspace appears valid for coverage and execution, but readiness checks report that no eval exists or fail to find the skill.
Environment
- Waza version:
0.31.0 - OS: Windows
- Shell: PowerShell
Workspace shape
This was reproduced in a repository with this structure:
repo/ ├── .waza.yaml ├── skills/ │ ├── development/skill-creator/SKILL.md │ ├── copilot-exclusive/mcp-ecosystem/SKILL.md │ ├── copilot-exclusive/fleet-parallel/SKILL.md │ ├── testing/eval-harness/SKILL.md │ └── copilot-exclusive/background-agent/SKILL.md └── evals/ ├── skill-creator/eval.yaml ├── mcp-ecosystem/eval.yaml ├── fleet-parallel/eval.yaml ├── eval-harness/eval.yaml └── background-agent/eval.yamlThe root
.waza.yamlincludes:paths: skills: skills/ evals: evals/ results: results/ server: resultsDir: resultsSteps to reproduce
From the workspace root:
waza coverage . waza check skills/development/skill-creator waza check skill-creator waza run evals/skill-creator/eval.yaml --task create-dev-skill-001 --trials 1 --output-dir results -vActual behavior
waza coverage .Coverage recognizes the pilot evals and shows the skill as partially covered.
Example outcome:
skill-creatorappears with2tasks- other pilot skills also appear in the coverage grid
waza run evals/skill-creator/eval.yaml ...Run executes successfully enough to:
- load the skill directories
- run the selected task
- apply graders
- save a result JSON file under
results/...
waza check skills/development/skill-creatorOutput includes:
Evaluation Suite: Not Found - Waza version:
Assistant
I'll start by exploring the repository structure to understand the codebase and find the relevant files.
Assistant
This is a Go repository. Let me explore the structure to understand the codebase.
Assistant
I need to make single tool calls. Let me explore the structure.
Assistant
There's a
checksanddiscoverydirectory. Let me look at the relevant files for thecheckcommand and discovery logic.Assistant
Let me look at the key files:
cmd_check.go, the discovery logic, the eval_suite check, and the coverage command for comparison.Assistant
The file is long. Let me look at the
checkReadinessfunction specifically, and the eval discovery logic.Assistant
Let me look at the
checkReadinessfunction in detail, especially the eval discovery logic around lines 358-460.Assistant
Now let me look at the workspace discovery logic and
FindEvalfunction.Assistant
Now let me look at the coverage command and
resolveWorkspaceto understand how they handle discovery.Assistant
Now let me look at the coverage command to see how it discovers skills (since the issue says coverage works).
Assistant
Now I understand the structure. The key difference is that
coverageusesfilepath.WalkDir(recursive) to find SKILL.md files, whileworkspace.scanForSkillsonly scans immediate child directories. The multi-skill workspace has skills nested two levels deep (skills/<category>/<skill-name>/SKILL.md).Let me look at the workspace tests to understand conventions.
Assistant
Now let me reproduce the issue. Let me first build the binary and create a test workspace matching the issue's structure.
Assistant
The build failed because of module cache issues. Let me set up the Go environment.
Assistant
The build succeeded. Now let me create a test workspace matching the issue's structure and reproduce the bug.
Assistant
The binary wasn't created. Let me re-run the build and check the output.
Assistant
The build succeeded now. Let me reproduce the issue.
Assistant
I've reproduced the issue. The root cause is clear:
coverageuses recursivefilepath.WalkDirto find SKILL.md filesworkspace.scanForSkillsonly scans immediate child directories, missingskills/<category>/<skill-name>/SKILL.mdcheckReadiness's fallback usesDetectContext(wd)without.waza.yamlconfig options
Let me check the repo's own skills structure and how
runresolves things.Assistant
Let me check the workspace tests for
checkandrunto understand the test fixtures and ensure I don't break them.Assistant
Let me look at the
eval_suite.gocheck and the run command's workspace handling.Assistant
Let me check whether
EvalSuiteCheckeris part of the spec/advisory checkers used bycheck, and check for import cycles.Assistant
Now I have a clear understanding. The root cause is that
scanForSkillsonly scans immediate child directories, so it can't find skills nested asskills/<category>/<skill-name>/SKILL.md. This is the shared discovery logic used bycheck(and other commands), whilecoverageuses its own recursiveWalkDir.Let me make the fix. First, the recursive
scanForSkills:Assistant
Now let me replace
scanForSkillswith a recursive version:Assistant
Now let me fix the
checkReadinessfallback incmd_check.goto use config options. Let me view the relevant section.Assistant
Now let me update the fallback
DetectContextcall to use the project config options so discovery is consistent withcoverageandrun:Assistant
Let me check where
EvalSuiteCheckeris used, to decide whether it also needs the config fix.Assistant
EvalSuiteCheckeris only used in its own tests, not in thecheckflow. The recursivescanForSkillsfix benefits it too. Now let me rebuild and verify the fix.Assistant
Both cases now report "Evaluation Suite: Found". Let me verify the broader scenarios — the no-arg multi-skill case and other skills.
Assistant
The multi-skill case works (shows "Evaluation Suite: Found"). But the
check copilot-exclusive/mcp-ecosystempath case shows nothing for "Evaluation Suite" — that's because there's no SKILL.md for mcp-ecosystem (I only created skill-creator). Let me check what happened.Actually, I only created the skill-creator skill and eval. The other directories are empty (no SKILL.md). So
check copilot-exclusive/mcp-ecosystemwould fail because there's no SKILL.md. Let me verify.Assistant
That's expected — there's no SKILL.md there. Let me add a second nested skill to verify multi-skill discovery thoroughly, including the no-arg summary.
Assistant
Excellent! Now
check(no args) discovers both nested skills and finds their evals, consistent withcoverage. Let me run the existing tests to make sure nothing is broken.Assistant
There's a test failure. The test
TestDetectContext_WithCustomSkillsDirasserts that default detection should NOT find skills under a non-skills/directory likemy-skills/. My recursive change to step 4 (the root sibling scan) over-reaches intomy-skills/.The correct approach: steps 3 and 3b (the configured
skills/and.github/skills/directories) should be scanned recursively to support the category structure, but step 4 (root sibling scan) must remain immediate-only to avoid finding skills in arbitrary nested directories.Let me restructure: revert
scanForSkillsto immediate-only and add a recursive variant for the configured skills directories.Assistant
Let me update steps 3 and 3b to use the recursive scan, keeping step 4 with the immediate scan:
Assistant
Now let me update the
scanForSkillsfunction: revert it to immediate-only and add the recursive variant.Assistant
Now let me rebuild and re-run the workspace tests.
Assistant
Workspace tests pass. Let me verify the reproduction again and run the check/run/coverage tests.
Assistant
All three cases now find the eval suite. Let me run the broader test suite for the affected packages.
Assistant
All tests pass. Let me test additional edge cases: co-located eval and nested eval subdir within a category-nested skill, plus
waza rundiscovery by name.Assistant
Both co-located and nested evals work with category structure. Now let me verify
waza rundiscovery by name resolves the eval path (it may fail later on execution, but discovery should work).Assistant
waza run skill-creatornow resolves the eval path correctly — it found/tmp/ws/evals/skill-creator/eval.yaml. The remaining error is just my test eval.yaml having an invalid grader format. Let me check the correct grader schema and fix the test data to confirmrunproceeds.Assistant
The grader config uses a different schema. This is just my test data issue — discovery works. Let me check the correct grader format to fully confirm
runproceeds past discovery.Assistant
The grader uses
type(notkind) andname. Let me fix my test eval to a valid format and confirmrunproceeds past discovery.Assistant
Discovery works —
waza run skill-creator(by name, nested workspace) now loads the eval. The remaining error is a config field in my test data. Let me add the config to fully confirm.Assistant
Discovery is fully fixed —
waza run skill-creator(by name) now resolves and loads the eval, getting all the way to engine setup (the remaining error is just no Copilot SDK configured in this test env, unrelated to discovery).Let me run the broader test suite to ensure nothing is broken.
Assistant
All internal tests pass. Let me run the full command-level test suite and
go vetto be thorough.Assistant
All tests pass and
go vetis clean. Let me verify the existingrunworkspace testdata (eval-skill-search) still works correctly with the recursive change, since it uses.github/conventions.Assistant
The run workspace tests pass. Let me look at the specific run workspace test to understand what it validates with my change.
Assistant
The run workspace tests use the flat structure and pass; my change handles both flat and nested. I've thoroughly validated the fix via CLI reproduction. Let me review the final diff and clean up temp files.
Assistant
The diff is clean. Let me run the dev package tests with
-count=1(no cache) to confirm the recursive change doesn't affect the dev command's skill discovery, and clean up temp files.Assistant
All tests pass. Let me do a final build to confirm everything compiles cleanly.
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.