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:
textrepo/ ├── .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:yamlpaths: skills: skills/ evals: evals/ results: results/ server: resultsDir: resultsSteps to reproduce
From the workspace root:
powershellwaza 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:
- Waza version:
Assistant
Let me start by understanding the repository structure and the issue. The issue is about
waza checknot discovering eval suites consistently withwaza coverageandwaza runin multi-skill workspaces. Let me explore the repository first.Let me understand the codebase structure, find the relevant code for the
check,coverage, andruncommands, and understand how discovery works.Assistant
This is a Go project. Let me explore the structure more, focusing on the
cmddirectory andinternaldirectory to understand the commands.Assistant
Let me look at the main command structure.
Assistant
Let me look at the key files:
cmd_check.go,cmd_coverage.go, andworkspace_resolve.go.Assistant
Let me see the rest of the
cmd_check.gofile, especially thecheckReadinessfunction and eval path resolution.Assistant
Let me see the
checkReadinessfunction and the eval discovery logic.Assistant
Let me look at the
checkReadinessfunction more closely.Assistant
Now let me look at the
workspacepackage, specifically theFindEvalandDetectContextfunctions.Assistant
Let me look at the workspace.go file.
Assistant
Now let me look at
workspace_resolve.goin thecmd/wazadirectory to understand howresolveWorkspaceworks.Assistant
Now let me look at the
cmd_coverage.goto understand how coverage discovers skills differently.Assistant
Let me check the actual skills directory structure in this repo:
Assistant
Let me check the workspace tests:
Assistant
Now I have a clear picture of the issue. Let me verify my understanding by looking at the
scanForSkillsfunction more closely and comparing withdiscoverSkillFiles:Assistant
Let me see the full
scanForSkillsfunction:Assistant
Now I can clearly see the issue. The
scanForSkillsfunction only looks at immediate child directories ofparentDir, but in the issue's workspace structure, skills are organized in subcategory directories (e.g.,skills/development/skill-creator/). Thecoveragecommand usesfilepath.WalkDirwhich recursively walks the tree, finding skills at any depth.Let me implement the fix by making
scanForSkillsrecursive like coverage:Assistant
The open command uses different argument names. Let me try again.
Assistant
Let me check the imports at the top of the file:
Assistant
Now I have a clear understanding. Let me now implement the fix. The
scanForSkillsfunction needs to recursively walk directories to find SKILL.md files at any depth, not just one level deep. This is what makes coverage work (it usesfilepath.WalkDir) butcheckfail.Assistant
Good, imports updated. Now let me replace the
scanForSkillsfunction with the recursive version:Assistant
Now let me run the existing tests to make sure the changes work correctly:
Assistant
Let me set up the Go environment:
Assistant
Let me set up all the Go environment variables.
Assistant
There's a test failure. Let me look at the failing test more carefully:
Assistant
I need a more nuanced approach. Step 4 of
DetectContext(scanning CWD) should remain shallow to avoid false positives, but steps 3 and 3b (scanning the skills directories) should be recursive. Let me revertscanForSkillsand create a separate recursive function:Assistant
Now let me update
DetectContextto usescanForSkillsDeepfor the skills directory scans (steps 3 and 3b):Assistant
I need to replace
scanForSkillswithscanForSkillsDeepin steps 3 and 3b ofDetectContext:Assistant
Let me go to the relevant lines and make the edit:
Assistant
Now I can see the exact lines. Let me replace both occurrences:
Assistant
Now let me replace the second occurrence (step 3b):
Assistant
Now let me also fix the second issue - the fallback detection in
checkReadinessdoesn't use config options from.waza.yaml. Let me look at that code:Assistant
Let me first run the tests to make sure the workspace changes pass:
Assistant
All workspace tests pass. Now let me also fix the fallback detection in
checkReadinessto useconfigDetectOptions(), which ensures the.waza.yamlconfiguration is respected:Assistant
Now let me fix the fallback detection to use config options:
Assistant
Now let me also check if there are other places in the codebase that call
workspace.DetectContextwithout config options. Let me search for it:Assistant
Let me also check
internal/checks/eval_suite.gosince it's related to eval suite checking:Assistant
Let me search for how
EvalSuiteCheckeris used:Assistant
Let me verify the code compiles:
Assistant
Good, the code compiles. Let me now create a test to verify the fix works with the nested structure described in the issue:
Assistant
Let me write a test within the workspace package instead:
Assistant
The fix works correctly. Let me clean up the test file and run all workspace tests again:
Assistant
All workspace tests pass. Let me run the broader test suite to make sure nothing is broken:
Assistant
All internal tests pass. Let me also run the command tests:
Assistant
All tests pass. Let me review the final diff:
Assistant
Let me verify the import section looks correct (the blank line between imports and the next comment):
Assistant
Let me run
go fmtto make sure formatting is correct:Assistant
Let me run all tests one final time to confirm everything is good:
Assistant
All tests pass. Let me verify the build works:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.