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 understanding the repository structure and the issue at hand. The issue is about
waza checknot discovering eval suites consistently in multi-skill workspaces, whilewaza coverageandwaza runwork correctly.Let me first explore the repository to understand its structure.
Assistant
Let me explore the structure more systematically.
Assistant
This is a Go project. Let me look at the command structure to understand where the
checkcommand is implemented.Assistant
Let me look at the
cmd_check.gofile since it's the main file for thecheckcommand:Assistant
Let me continue reading the file to see the
checkReadinessfunction which is responsible for checking eval discovery:<tool_call> <function=bash_terminal> <parameter=command> cat /waza/cmd/waza/cmd_check.go | head -n 400 | tail -n 200 </tool_call>
Assistant
Let me look at the checkReadiness function which is likely where the eval discovery happens.
Assistant
Let me look at the
checkReadinessfunction starting at line 358.Assistant
Now let me look at the workspace package to understand the
FindEvalfunction:Assistant
Let me look at the workspace.go file to understand how
FindEvalworks.Assistant
Now let me look at the
resolveWorkspacefunction inworkspace_resolve.go:Assistant
Now let me look at the coverage command to understand how it discovers evals:
Assistant
Let me look at the coverage command more closely.
Assistant
Assistant
Let me look at the coverage command to understand how it discovers skills and evals.
Assistant
Assistant
Let me look at the project config package to understand how the config is loaded.
Assistant
Let me look at the projectconfig/config.go file to understand how the config is loaded.
Assistant
Assistant
Let me read the workspace test file to understand the expected behavior.
Assistant
Now I have a clear understanding of the codebase. Let me summarize the issue and my plan:
Issue Analysis:
waza check skills/development/skill-creatorfails to find eval becausecheckReadinessis called withwsCtx=nil, and the fallback usesDetectContextwithout project config optionswaza check skill-creatorfails becausescanForSkillsonly scans immediate children of the skills directory, not recursively
Fix Plan:
- Make
scanForSkillsrecursive inworkspace.goto handle nested skill structures - Add direct eval discovery in
checkReadinessusing project config for the path-based invocation case
Let me first create a test to reproduce the issue:
Assistant
Let me set up the Go environment and build the project:
Assistant
The issue is that Go module cache isn't set. Let me set GOPATH and try again.
Assistant
The build is failing because of missing environment variables. Let me set them up.
Assistant
Build succeeded. Now let me create a test scenario to reproduce the issue:
Assistant
Now let me test the current behavior to reproduce the issue:
Assistant
Issue reproduced! Now let me also test the name-based invocation:
Assistant
Both issues are reproduced. Let me also verify that
waza coverageworks:Assistant
I've successfully reproduced both issues:
waza check skills/development/skill-creatorshows "Evaluation Suite: Not Found" (should find it)waza check skill-creatorshows "no SKILL.md found" (should find the skill)
Now let me implement the fix. The root cause is in
scanForSkillswhich only scans immediate children of the skills directory, not recursively. Let me also add direct eval discovery incheckReadiness.Assistant
Let me look at the current
scanForSkillsfunction:Assistant
Now I understand the issue completely. Let me implement the fix. There are two parts:
-
Fix
scanForSkillsto be recursive - This handles the case when skills are nested in subdirectories (fixeswaza check skill-creator) -
Add direct eval discovery in
checkReadinessusing project config - This handles the case when a path is given (fixeswaza check skills/development/skill-creator)
Let me start with the first fix:
-
Assistant
Now I understand the full picture. Let me implement the fix. There are two parts:
- Fix
scanForSkillsto be recursive - so skills in nested directories are found (fixeswaza check skill-creator) - Add direct eval discovery in
checkReadinessusing project config - so evals are found even when wsCtx is nil (fixeswaza check skills/development/skill-creator)
Let me start with the first fix in
workspace.go:- Fix
Assistant
The first fix has been applied to make
scanForSkillsrecursive. Now I need to:- Verify the fix works for the first issue (
waza check skill-creator) - Apply the second fix for
checkReadinessto use project config when discovering evals - Rebuild and test
Let me continue with the implementation.
- Verify the fix works for the first issue (
Assistant
The import wasn't added correctly. Let me check and fix the import section.
Assistant
The fs import wasn't added correctly. Let me fix it properly:
Assistant
I need to open the file first before editing. Let me use the open command.
Assistant
The edit command requires me to open the file first. Let me use the open command to open the file.
Assistant
I need to use the special commands to edit the file. Let me open it first.
Assistant
Let me use sed to fix the import and the function properly:
Assistant
The scanForSkills function is already modified to be recursive, but it uses
fs.DirEntrywithout importing theio/fspackage. Let me fix the imports:Assistant
Now let me rebuild and test:
Assistant
Build succeeded. Now let me test if the first fix works:
Assistant
Excellent! The first fix works! Now
waza check skill-creatorcorrectly finds "Evaluation Suite: Found". Let me also verify the path-based invocation:Assistant
Both issues are now resolved. The fix to make
scanForSkillsrecursive has resolved both:waza check skill-creator- now finds the skill by namewaza check skills/development/skill-creator- now finds the eval suite
The reason both work is because the recursive
scanForSkillsnow discovers skills in nested directories, which allowsresolveWorkspaceto find the workspace context with the skill list. Then whencheckReadinessis called with the workspace context,FindEvalcan correctly locate the eval.yaml.Let me run the existing tests to make sure I haven't broken anything:
Assistant
The test
TestDetectContext_WithCustomSkillsDiris failing because my recursivescanForSkillsis now finding skills in step 4 (scanning workspace root) that should not be found there. The test creates skills in a custom directory "my-skills/" and expects default detection to NOT find them.I need to modify my fix: make the recursive scanning only apply to the skills directory scan (step 3), not the workspace root scan (step 4). Let me update the code:
Assistant
The test is failing because step 4 of
DetectContextnow recursively scans the workspace root, finding skills in directories that shouldn't be scanned with default settings. I need to:- Keep the recursive scan for the configured skills directory (step 3)
- Keep the immediate-children-only scan for the workspace root (step 4)
Let me create two functions - one recursive for the skills dir, one non-recursive for the root:
Assistant
The user wants me to continue fixing the issue. Let me check the current state of the file and verify the changes were made correctly.
Assistant
Good, the build succeeded. Now let me run the tests again to see if the failing test passes now.
Assistant
All workspace tests pass now. Let me verify the fix still works for the issue cases:
Assistant
Both test cases now show "Evaluation Suite: Found". Let me run the check command tests to ensure everything is working:
Assistant
All check command tests pass! Let me run a broader set of tests to make sure nothing else was broken:
Assistant
Let me check the full test output to make sure everything passes:
Assistant
All tests pass. Let me also run the workspace tests to confirm:
Assistant
All tests pass! Let me test some additional edge cases to ensure the fix is robust:
Assistant
Let me continue verifying the fix handles all edge cases properly and then summarize the changes.
Assistant
The fix is working well for both flat and deeply nested structures. Let me continue verifying edge cases and then wrap up.
Assistant
Let me verify the fix is complete and run the remaining tests to ensure everything works correctly. I should also check the multi-skill workspace test case mentioned in the issue.
Assistant
All tests pass and all edge cases work correctly. Let me now verify the final state of the changes before submitting.
Assistant
Good, my changes are minimal and focused. The diff shows I've made two key changes to
internal/workspace/workspace.go:-
Made
scanForSkillsrecursive - Now usesfilepath.WalkDirto recursively scan the configured skills directory for SKILL.md files, handling nested structures likeskills/development/skill-creator/SKILL.md -
Added
scanForSkillsImmediate- Keeps the original non-recursive behavior for step 4 ofDetectContext(scanning workspace root for immediate children), which preserves backward compatibility with existing tests likeTestDetectContext_WithCustomSkillsDir
Let me run a comprehensive test to ensure everything works:
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.