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
Let me start by exploring the repository structure to understand what we're working with.
Assistant
Now let me look at the full file to understand the structure better.
Assistant
Let me look at the workspace package to understand how it discovers evals.
Assistant
Now let me look at the workspace_resolve.go file in cmd/waza.
Assistant
Let me look at how coverage and run do workspace detection.
Assistant
Let me trace what happens with
waza check skill-creatorandwaza check skills/development/skill-creator.Assistant
Let me look at how coverage handles multi-skill workspaces and how it scans for skills.
Assistant
Now I understand the issue. The
scanForSkillsfunction only scans immediate children of the skills/ directory, but the issue describes a workspace withskills/<category>/<skill-name>/SKILL.md. Let me reproduce the issue.Assistant
Let me create a reproduction workspace to verify the issue.
Assistant
Let me build waza and reproduce the issue.
Assistant
Let me wait for build to complete.
Let me wait for the build to complete. This is taking a while since downloading dependencies. Let me try again. Wait, it seems it just finished downloading. Let me retry:
Assistant
Now let me test
waza check:Assistant
I've reproduced issue 1. Now let me test
waza check skill-creator:Assistant
Let me look at the workspace tests to understand what's expected:
Assistant
Let me search for any tests covering nested skill directories:
Assistant
Let me check how
runhandles the case with a skill name:Assistant
Let me trace where
scanForSkillsis used and how its behavior matters:Assistant
So there's a
discoverypackage that already walks the directory and finds all SKILL.md files at any depth. This is whatcoverageand other commands could use. But the workspacescanForSkillsonly looks at immediate children.Let me check who uses the
discovery.Discoverfunction:Assistant
Let me look at the
checkcommand code more carefully:Assistant
Let me look at the existing
checktest file:Assistant
Now I have a clear understanding. Let me start implementing the fix. First, let me update
scanForSkillsto recursively find SKILL.md files:Assistant
Now let me update
scanForSkillsto recursively find SKILL.md files. I'll also update the comment to reflect the new behavior:Assistant
Let me continue with the implementation. I need to make
scanForSkillsrecursive.Assistant
Let me use a different approach with a script:
Assistant
Now let me build and run the existing tests to see if they pass:
Assistant
Let me check the failing test:
Assistant
The test failure indicates an issue. Let me look at the existing behavior expectations more carefully. The fallback
scanForSkills(absDir)should NOT find skills under custom directories likemy-skills/. Let me fix the implementation:Assistant
Now let me update
DetectContextto usescanForSkillsRecursivefor the skills/ subdir scan:Assistant
Now let me run the tests again to make sure they pass:
Assistant
All workspace tests pass. Now let me also run the cmd tests:
Assistant
All tests pass. Now let me verify the fix actually works for the original issue:
Assistant
Both tests now work correctly. Let me also verify the schema error:
Assistant
The fix works. Let me test all the scenarios:
Assistant
All three test cases now correctly find the eval. Now let me also test the case from the issue with
mcp-ecosystem(which is in a different category):Assistant
Excellent! Now let me also verify that the
runcommand also works correctly:Assistant
Let me also run all the tests to make sure nothing is broken:
Assistant
All tests pass. Now let me also improve the user experience by adding more helpful information when an eval is not found. Let me check the current message:
Assistant
Let me improve the error message to help users understand where
checklooked for the eval. Let me track the candidate paths:Assistant
Now let me also fix the fallback in
checkReadinessto use the project'sconfigDetectOptions()and track the candidate paths so the user can see where the eval was looked for:Assistant
Now let me add the
evalCandidatePathshelper function:Assistant
Let me add the
evalCandidatePathshelper function right beforeresolveSkillTokenLimit:Assistant
Now let me update the "Not Found" message to show the candidate paths:
Assistant
Now let me create a scenario where the eval is missing to verify the "Not Found" message:
Assistant
There's a bug with the duplicated path. Let me investigate:
Assistant
Assistant
OK so
findConfigFilereturns an absolute path, andcfg.Dir = filepath.Dir(configPath)is the absolute directory of the config file.Let me also check what
mergeConfigdoes withPaths.SkillsandPaths.Evals- they're using the values from the file, not joining withcfg.Dir.Let me check the config defaults:
Assistant
Let me check the actual file:
Assistant
Let me check if the binary was rebuilt:
Assistant
Let me write a small debug script to understand the issue:
Assistant
Let me look at the current code more carefully:
Assistant
Let me check git diff:
Assistant
Let me add some debug prints to trace through:
Assistant
Let me add some debug prints to my actual code to understand:
Assistant
Let me look at the actual function again:
Assistant
Let me add more debug output:
Assistant
Found the bug. The issue is that
wsCtx.EvalsDiris set to an absolute path byconfigDetectOptions(because it joins withcfg.Dir). My function needs to handle that case likeFindEvaldoes. Let me fix:Assistant
Now the path is correct. Let me verify all scenarios:
Assistant
Both work correctly. Let me also test with the
coveragecommand to ensure consistency:Assistant
Coverage also finds both skills. Now let me run the full test suite to make sure nothing is broken:
Assistant
All tests pass. Let me also test the case where there's a custom skills/evals dir:
Assistant
Custom paths work too. Let me also test the case where the user provides a relative path:
Assistant
All scenarios work. Let me also test edge cases:
Assistant
Excellent! All scenarios work correctly. Let me also test the case where a skill doesn't exist in the workspace but the user gives a path:
Assistant
Now let me verify the full test suite still passes:
Assistant
No failures. Let me also test the scenario from the original issue more thoroughly with a multi-skill workspace:
Assistant
Now let me run the test cases from the issue:
Assistant
All three test cases from the issue now work correctly! Let me also test the original failing case from the issue:
Assistant
All scenarios from the issue work correctly. Let me also verify all the existing tests still pass:
Assistant
Let me also test some edge cases:
Assistant
The check command on the workspace didn't find sub-skill. Let me check why. This is because when a skill is found at
skills/skill-a/, my recursive implementation stops descending into it. Soskills/skill-a/sub-skill/is not visited.This is actually the correct behavior for the current design - if a directory is already a skill, we don't recurse into it. But it could be surprising if a user has a "skill" that contains other "skills".
Let me think about this. The original behavior was: only top-level skill dirs. With my change, the behavior is: a skill dir is at any depth, but we don't recurse into skill dirs. This is the same as how
coverageworks (it walks all files and finds SKILL.md at any depth).Let me check how
coveragehandles this case:Assistant
Let me update
scanForSkillsRecursiveto not stop at skill dirs (since the test that would break is using non-recursivescanForSkills):Assistant
Let me update
scanForSkillsRecursiveto not stop at skill dirs to be consistent withcoverageanddiscovery.Discover:Assistant
Now both skills are found. Let me verify the existing tests still pass:
Assistant
All tests pass. Let me also verify all other tests:
Assistant
All tests pass. Let me also run the full test suite once more:
Assistant
Let me also verify some final edge cases:
Assistant
All scenarios from the issue are now working correctly. Let me do a final review of all the changes:
Assistant
Let me check there are no debug prints left:
Assistant
No debug prints. Let me also verify the final test status:
Assistant
All 43 test packages pass. Let me also create a small smoke test script to verify everything works end-to-end:
Assistant
All scenarios from the issue work correctly:
waza coverage .- shows all 5 skills (was already working)waza check skills/development/skill-creator- now finds the eval ✅waza check skill-creator- now finds the eval ✅waza check(no args) - now finds all evals for all 5 skills ✅waza run skill-creator- already worked (the "no test files" is just because we didn't define tasks)
Let me also clean up my temporary test directories:
Assistant
Let me verify the final state of my changes:
Assistant
Let me also do a final test of the full repository to be sure nothing is broken:
Assistant
Assistant
Let me also do a final check by reading the complete current state of the key changes:
Assistant
Let me do a final review and submit the changes.
Assistant
Now let me address the checklist:
Checklist reasoning:
-
✅ If an error was reported in the issue description, I have successfully reproduced it. I created a reproduction workspace matching the exact structure described in the issue (with
skills/<category>/<skill>/SKILL.md) and observed the same failures: "Evaluation Suite: Not Found" forcheck skills/<path>and "no SKILL.md found" forcheck <skill-name>. -
✅ If an error was reported in the issue description, I have confirmed that my fix resolves the error. After applying my fix, all three test scenarios from the issue produce consistent results with and . Both and correctly find the eval.
-
Assistant
All tests pass. Let me submit the changes:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.