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 locate relevant files. Let's first see the root directory.
- Assistant
I see the waza repository. Let me examine the .waza.yaml file to understand configuration:
- Assistant
Let me explore the repository structure to understand how the
waza checkcommand works and find the relevant code. - Assistant
Let me look at the cmd directory to understand the structure better.
- Assistant
Let me explore the cmd/waza directory to understand the check command implementation.
- Assistant
Let me examine the
cmd_check.goto understand how the check command discovers evals: - Assistant
Let me continue reading the check command implementation to understand how it discovers evals.
- Assistant
Now I need to understand how
workspace.FindEvalworks. Let me look at the workspace package: - Assistant
Great! I can see there's a
FindEvalfunction ininternal/workspace/workspace.go. Let me examine that function to understand how it discovers evals: - Assistant
Let me see more of the FindEval function:
- Assistant
Now I need to understand what
FindSkilldoes and whatWorkspaceContextcontains. Let me examine theFindSkillfunction and theWorkspaceContextstructure. - Assistant
Now I need to understand how
FindSkillworks and how it resolves skill names. Let me look at theWorkspaceContextstructure and how skills are discovered. - Assistant
Let me now examine how
workspace_resolve.goworks since it's mentioned in the issue (it handles workspace resolution forcheck): - Assistant
Now let me look at the full
cmd_check.goto understand how the check command discovers evals. Let me focus on therunCheckfunction: - Assistant
Let me now look at the
checkReadinessfunction which is the core of the check logic: - Assistant
Now I need to understand how the
checkcommand handles the case where a user provides a path likeskills/development/skill-creator. Let me look at theLooksLikePathfunction: - Assistant
Now I understand the issue! When the user runs
waza check skills/development/skill-creator, theLooksLikePathfunction returns true because it contains a/. This causes the command to take the path-based branch (line 167-187) which callscheckReadiness(skillDir, nil)with a nil workspace context.When
checkReadinessis called with a nil workspace context, it tries to auto-detect from the working directory but doesn't pass the config options from.waza.yaml. This means it won't know about the configuredevals/path.Let me also look at how the
runcommand discovers evals to compare: - Assistant
Let me check the
coveragecommand to see how it discovers evals: - Assistant
Now let me look at the test files to understand the expected behavior:
- Assistant
Now let me look at the workspace test file to understand the FindEval behavior and test cases:
- Assistant
Now I need to understand the issue better. Let me look at the workspace test for FindEval:
- Assistant
Let me now understand what happens when
waza check skill-creatoris called with a skill name in a multi-skill workspace: - Assistant
Now let me try to run the waza check command to see the actual behavior:
- Assistant
Let me build the binary first.
- Assistant
Now let me reproduce the issue:
- Assistant
I can see the issue. When we call
waza check skill-creator, it usesresolveWorkspace(args)which callsworkspace.FindSkill(ctx, "skill-creator"). Let me trace the issue:FindSkilllooks for a skill whoseName == "skill-creator"in the context2. The workspace context is built byDetectContext, which discovers skills- Let me check how
DetectContextdiscovers skills
Let me look at how skills are discovered in the workspace.
- Assistant
Let me test the other command:
- Assistant
Now let me look at
DetectContextto understand how skills are found in multi-skill workspaces: - Assistant
Let me go back to the actual repository directory.
- Assistant
Now I understand the core issue. Let me trace through the problem:
-
scanForSkillsis NOT recursive — it only scans immediate children of the skills directory. In the workspace structureskills/development/skill-creator/SKILL.md, the immediate children ofskills/aredevelopment/,copilot-exclusive/,testing/— not the skill directories themselves. -
When
checkReadinessis called with a path andnilwsCtx, the auto-detection doesn't useconfigDetectOptions(). -
The auto-detected context never has the skill in it, so
FindEvalfails.
Let me verify by checking how
coveragediscovers skills: -
- Assistant
Coverage uses
filepath.WalkDirwhich is recursive, whilescanForSkillsonly checks immediate children. That's why coverage finds skills in nested directories butcheckdoesn't.Let me look at the discover functions:
- Assistant
Now let me also check how
rundiscovers skills/evals: - Assistant
Now I have a complete understanding of the issue. The root cause is:
coverageusesdiscoverSkillFiles()withfilepath.WalkDir()which recursively findsSKILL.mdat any depth.checkandrunuseworkspace.DetectContext()→scanForSkills()which only checks immediate children of the skills directory.
So with the structure
skills/development/skill-creator/SKILL.md,scanForSkills("skills/")only looks atskills/development/,skills/copilot-exclusive/,skills/testing/— none of which haveSKILL.mddirectly.Additionally, in
checkReadinesswhen called with a path arg (nil wsCtx), the auto-detection doesn't useconfigDetectOptions().Let me look at the test file for workspace detection:
- Assistant
Now I have a complete understanding of the issue. Let me create a reproduction script first:
- Assistant
I've confirmed both issues:
waza check skill-creator(by name) fails with "no SKILL.md found" — workspace detection can't find the skill in nested dirs.waza check skills/development/skill-creator(by path) works but shows "Evaluation Suite: Not Found" — the auto-detection doesn't use config options.waza coverage .works correctly — it uses recursivefilepath.WalkDir.
Now let me implement the fix. The root cause is that
scanForSkillsonly scans immediate children: - Assistant
Now let me replace the
scanForSkillsfunction with a recursive version: - Assistant
Let me open the file first and then edit:
- Assistant
I need to use
editwith--fileoption. Let me try again. - Assistant
Good, now I need to add the
osimport since I'm usingos.DirEntry. Let me check: - Assistant
Good,
osis already imported. Now I need to fix the second issue: thecheckReadinessfunction should useconfigDetectOptions()when auto-detecting workspace context. Let me look at the relevant section: - Assistant
I see the issue. On line 426, when
wsCtxis nil, the auto-detection callsworkspace.DetectContext(wd)without any options. I need to fix this to useconfigDetectOptions(): - Assistant
Now let me verify the imports in
cmd_check.goare correct: - Assistant
Good, all necessary imports are present. Now let me build and test:
- Assistant
Good, the build succeeded. Now let me run the reproduction script to verify the fix:
- Assistant
Both tests now pass! Both
waza check skill-creator(by name) andwaza check skills/development/skill-creator(by path) now find the eval suite. Let me run the existing tests to make sure I haven't broken anything: - Assistant
One test is failing. Let me look at that test:
- Assistant
I see the issue. The test expects that step 4 (fallback scan of CWD) should only scan immediate children. But my change made
scanForSkillsrecursive, which causes step 4 to find skills in nested subdirectories of the workspace root.I need a more targeted fix. The recursive scanning should only apply to the configured skills directory (step 3), not to the fallback CWD scan (step 4). Let me revert and take a different approach:
- Assistant
Good. Now I need to update
DetectContextto usescanForSkillsDeepfor the configured skills directory (step 3) and keepscanForSkillsfor the fallback (step 4). Let me find the relevant section: - Assistant
Now I need to update lines 132-141 to use
scanForSkillsDeepfor the configured skills directory and GitHub skills directory: - Assistant
Good. Now let me build and run the tests again:
- Assistant
Good. Now let me run the workspace tests:
- Assistant
All workspace tests pass. Now let me run the check command tests:
- Assistant
All tests pass. Now let me verify the fix with the reproduction script again:
- Assistant
Both tests now show "Evaluation Suite: Found". Let me also test with the full workspace structure from the issue description with multiple skills:
- Assistant
Excellent! All tests pass with the multi-skill workspace structure. Now let me run the full test suite to make sure I haven't broken anything:
- Assistant
All tests pass. Let me also run the complete test suite for the workspace package:
- Assistant
All tests pass. Let me also run the checks package tests:
- Assistant
All tests pass. Let me also run the workspace resolve tests:
- Assistant
All tests pass. Let me also run a comprehensive edge case test to make sure the fix handles various scenarios correctly:
- Assistant
All edge cases work correctly:
- Deeply nested skill (3 levels) by name → Found
- Immediate skill by name → Found
- Hidden skill by name → Not found (correct, hidden directories are skipped)
- Deeply nested skill by path → Found
- Coverage → Works correctly, finds both non-hidden skills
Let me also verify that the
runcommand still works correctly: - Assistant
All tests pass. Let me now review the changes I've made:
- Assistant
The changes look clean. Let me run a final comprehensive test to make sure everything works:
- Assistant
All tests pass. Let me also run the specific test suites that are most relevant to the changes:
- Assistant
All tests pass. Let me now run a final verification with the original reproduction script:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.