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 then locate the relevant code for the
check,coverage, andruncommands.Assistant
This is a Go project. Let me explore the structure more, particularly the cmd and internal directories.
Assistant
Let me look at the
checkcommand and thecoveragecommand to understand how they discover evals and skills:Assistant
Now let me see the
checkReadinessfunction and how it discovers evals:Assistant
Now let me look at the
workspace.FindEvalfunction to understand how it discovers evals:Assistant
Now let me look at the
resolveWorkspacefunction to understand how it works with arguments:Assistant
Now let me look at how the
coveragecommand discovers evals:Assistant
Now I understand the issue. Let me look at the key differences:
-
coveragecommand: UsesdiscoverEvalFileswhich scansevals/directory and looks foreval.yamloreval.ymlfiles in nested directories. It then usesinferSkillNameFromEvalPathto determine which skill an eval belongs to based on its path structure (e.g.,evals/skill-creator/eval.yaml→ skill nameskill-creator). -
checkcommand: Usesworkspace.FindEvalwhich relies onworkspace.FindSkillto first find the skill in the workspace context. Then it looks for evals at{root}/evals/{skill-name}/eval.yaml.
The issue is in the
runCheckfunction. Let me trace the logic:-
Assistant
Now let me look at the beginning of
runCheckmore carefully:Assistant
Now I see the problem! When the user runs
waza check skills/development/skill-creator, the pathskills/development/skill-creatorlooks like a path (contains/), so it goes through the first branch:if len(args) > 0 && workspace.LooksLikePath(args[0]) { skillDir := args[0] ... report, err := checkReadiness(skillDir, nil) // <-- wsCtx is nil!When
wsCtxisnil,checkReadinesscannot properly discover the eval using the workspace-aware detection. Let me verify thecheckReadinessfunction with nil context:Assistant
I see! So even when
wsCtxisnil, it falls back to auto-detecting the workspace from the working directory. Let me check if that works. The key issue is:- When passing
skills/development/skill-creator, the path is treated as a direct path,wsCtxis passed asnil - In
checkReadiness, whenwsCtxis nil, it tries to auto-detect usingworkspace.DetectContext(wd)but without passing the config options from.waza.yaml!
Let me verify this by checking what
DetectContextis called with:- When passing
Assistant
Found it! When
wsCtxisnil, the fallback usesworkspace.DetectContext(wd)without any options, meaning it uses the default directories (skills/andevals/). But the issue says the skills are atskills/development/skill-creator/, notskills/skill-creator/.Wait, let me re-read the issue more carefully. The workspace structure shows:
skills/ ├── development/skill-creator/SKILL.md ├── copilot-exclusive/mcp-ecosystem/SKILL.md └── ...And the
.waza.yamlhas:paths: skills: skills/ evals: evals/So the skills directory is
skills/, and within it, there are subdirectories. Let me look at howscanForSkillsworks:Assistant
I see -
scanForSkillsonly scans immediate child directories, so it would findskills/development/but notskills/development/skill-creator/. Let me checkDetectContextagain for how it handles nested skills:Assistant
Now I understand the issue better. Let me examine how
scanForSkillsworks versus howcoveragediscovers skills:Assistant
The coverage command uses
filepath.WalkDirwhich recursively walks the directory tree, finding skills at any depth. The workspace detection inscanForSkillsonly scans immediate child directories.This is a key mismatch. The workspace detection only finds skills one level deep in the
skills/directory, whereas coverage recursively scans.But wait - let me re-read the issue more carefully. When the user runs
waza check skills/development/skill-creator:Assistant
For now, let me continue analyzing the issue to understand the full picture before making any changes.
Assistant
Now let me check how the project config is loaded:
Assistant
Now I understand the issue. Let me summarize:
Problem Analysis:
When running
waza check skills/development/skill-creator:- The argument
skills/development/skill-creatoris detected as a path (contains/) - The code calls
checkReadiness(skillDir, nil)with wsCtx = nil - In
checkReadiness, whenwsCtxis nil, the fallback workspace detection usesworkspace.DetectContext(wd)without config options from.waza.yaml - This means the eval discovery doesn't know about custom paths configured in
.waza.yaml
When running
waza check skill-creator(skill name only):- The argument doesn't look like a path
- The code calls
resolveWorkspace(args)which properly loads.waza.yamlconfig - But
resolveWorkspacecallsworkspace.FindSkill(ctx, "skill-creator")which may fail becausescanForSkillsonly scans immediate child directories ofskills/
Let me verify my understanding of
scanForSkills- it only scans one level deep:- The argument
Assistant
Yes,
scanForSkillsonly scans immediate children. So for a structure like:skills/ development/ skill-creator/SKILL.mdIt would find
skills/development/as a child, buttryParseSkill("skills/development/")would fail because there's noSKILL.mddirectly inskills/development/.So the issue is two-fold:
- When a path is provided,
wsCtxisniland config options aren't used - The skill scanning doesn't recursively find nested skills
Let me check the test case that was added for workspace with separated eval to understand the expected behavior:
- When a path is provided,
Assistant
The test uses a flat structure:
skills/eval-test/SKILL.mdandevals/eval-test/eval.yaml. This works becausescanForSkillsfindsskills/eval-test/as an immediate child.But the issue reports a nested structure like
skills/development/skill-creator/SKILL.md. Let me create a reproduction test first:Assistant
Good, the existing test passes. Now let me write a test script to reproduce the issue described - using nested skill directories:
Assistant
Let me create a simpler test script that I can run in the existing test suite:
Assistant
I've confirmed the issue:
- Test 1 (by skill name):
waza check skill-creatorfails with "no SKILL.md found" - this is becausescanForSkillsdoesn't recursively find nested skills - Test 2 (by path):
waza check skills/development/skill-creatorfinds the skill but reports "Evaluation Suite: Not Found" - even thoughevals/skill-creator/eval.yamlexists - Test 3 (coverage):
waza coverage .correctly finds both the skill and the eval, showing the skill with "Partial" coverage
Now I understand the two bugs:
- Bug 1: When checking by path,
wsCtxis passed asniltocheckReadiness, and the fallback workspace detection doesn't use config options - Bug 2:
scanForSkillsdoesn't recursively find nested skills
Let me fix the first bug by making the path-based branch also use workspace-aware detection:
- Test 1 (by skill name):
Assistant
Now let me look at the fix. The issue is that when a path is provided, the code:
- Uses the path directly as the skill directory
- Passes
nilaswsCtxtocheckReadiness - In
checkReadiness, whenwsCtxisnil, it tries to auto-detect the workspace but doesn't use the config options
The fix should be to still detect the workspace context (with config options) even when a path is provided, so that eval discovery works correctly. Let me modify the
runCheckfunction:Assistant
Now let me look at the full
runCheckfunction and understand what needs to change:Assistant
Now I need to fix the issue. The fix should be in the path-based branch - instead of passing
nilforwsCtx, we should detect the workspace context with config options. Let me make the change:Assistant
I need to provide the full edit command with proper syntax. Let me first open the file:
Assistant
Now let's test this fix with our reproduction script:
Assistant
The test still fails. The issue is that even with the workspace context, the skill isn't being found because
scanForSkillsdoesn't recursively scan nested directories. Let me trace the issue more carefully:resolveWorkspace(nil)is called, which detects the workspace- But
DetectContextusesscanForSkillswhich only finds immediate children ofskills/ - Since the skill is at
skills/development/skill-creator/, it's not found - So
wsCtx.Skillsis empty andwsCtxremainsnil
Let me verify this by checking what
resolveWorkspacereturns:Assistant
The flat structure works now. So my fix for passing
wsCtxworks when the workspace can detect the skill. The remaining issue is thatscanForSkillsdoesn't recursively find nested skills.Let me now fix the
scanForSkillsfunction to recursively scan for skills:Assistant
I need to make
scanForSkillsrecursive. Let me update it:Assistant
Now let's test the fix again:
Assistant
Excellent! Both tests pass now! The fix works:
- Test 1 (by skill name):
waza check skill-creatornow finds the nested skill and its eval ✅ - Test 2 (by path):
waza check skills/development/skill-creatornow finds the eval ✅ - Test 3 (coverage): Still works as before ✅
Now let me run the existing tests to make sure I didn't break anything:
- Test 1 (by skill name):
Assistant
One test failed:
TestDetectContext_WithCustomSkillsDir. Let me look at this test:Assistant
I see - the test expects that when scanning the default
skills/directory (which doesn't exist), it should NOT find the skills inmy-skills/. But my recursive scan is now scanning the root directory and finding skills in any subdirectory, includingmy-skills/.The issue is that step 4 in
DetectContext("Scan immediate children of dir for SKILL.md") is now scanning recursively and finding skills in subdirectories that shouldn't be found in that context.Let me look at the full
DetectContextfunction:Assistant
The issue is in step 4: "Scan immediate children of dir for SKILL.md". This was originally designed to scan only immediate children, but now my recursive implementation scans all subdirectories. This is too aggressive for step 4.
The fix should be to keep the recursive behavior only for step 3 (scanning the configured skills directory), but keep step 4 as non-recursive (only immediate children). This is because step 4 is a fallback for detecting workspaces where skills are scattered in the current directory.
Let me modify the approach:
Assistant
All workspace tests pass. Now let me run the check command tests:
Assistant
All tests pass. Let me also run the coverage tests and the full test suite to make sure nothing is broken:
Assistant
Now let me run our reproduction test one more time to confirm everything works:
Assistant
All tests pass. Let me also test the multi-skill workspace scenario with nested skills:
Assistant
The previous test was successful - all 5 skills were found, all 5 evals were detected, and the coverage report shows all skills. Now I should run a broader test suite to make sure I haven't broken anything else, then summarize my changes and submit.
Assistant
All tests pass. Let me also run the workspace tests one more time to be sure, and then review the changes I made before submitting.
Assistant
All tests pass. Let me review my changes and then submit.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.