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.
Assistant
I'll start by exploring the repository structure.
Assistant
This is a Go project. Let me explore the structure further, focusing on the CLI commands like
check,coverage, andrun.Assistant
Now let me look at the
checkReadinessfunction and the workspace detection logic.Assistant
Now let me look at the workspace detection logic and the
FindEvalfunction, and howresolveWorkspaceworks.Assistant
Now let me look at the workspace.go file which contains
DetectContext,FindSkill,FindEval, andLooksLikePath.Assistant
Now I understand the workspace structure issue. The skills are nested TWO levels deep (
skills/development/skill-creator/SKILL.md), butscanForSkillsonly scans ONE level. Let me verify by examining howcoveragediscovers skills/evals.Assistant
I can now see the core difference:
coverageusesfilepath.WalkDir(recursive) to discover skills, whilecheck's workspace detection usesscanForSkillswhich only scans immediate children (one level deep). For nested skills likeskills/development/skill-creator/SKILL.md(two levels deep),scanForSkillsfinds nothing.Let me check the version and build the repo, then create a reproduction workspace.
Assistant
Build succeeded. Now let me create a reproduction workspace matching the issue's structure.
Assistant
Now let me reproduce the issue with the three commands.
Assistant
I've reproduced both issues:
check skills/development/skill-creator→ "Evaluation Suite: Not Found" (eval discovery fails)check skill-creator→ "no SKILL.md found in /tmp/repro" (skill name resolution fails)
Let me fix my eval.yaml grader format to match the schema, then confirm the core problem is in
scanForSkills.Assistant
Let me fix the eval.yaml to use correct grader format (
type/nameinstead ofkind/value).Assistant
coveragenow shows full coverage. Let me re-run the check commands.Assistant
I've confirmed both bugs. The root cause is
scanForSkillsonly scans immediate children (one level), while skills are nested two levels deep (skills/development/skill-creator/SKILL.md).coverageuses recursiveWalkDir, so it works.Let me check existing tests for
scanForSkills/DetectContextto understand expected behavior and avoid regressions.Assistant
Now I understand the existing tests. None test the nested (
skills/category/skill/SKILL.md) case. Let me check all usages ofDetectContextandscanForSkillsto ensure my fix is consistent across the codebase.Assistant
scanForSkillsis the central discovery function used byDetectContext, which is shared across many commands (check, init, dev, eval, tokens, new_task, checks). Making it recursive will fix discovery consistency everywhere — exactly what the issue asks for. Let me make the fix.First, the recursive
scanForSkills:Assistant
Now let me fix
checkReadiness's auto-detection to useconfigDetectOptions()for consistency with custom workspace paths:Assistant
Now let me rebuild and test the reproduction:
Assistant
Both cases are now fixed:
check skills/development/skill-creator→ "Evaluation Suite: Found"check skill-creator→ "Evaluation Suite: Found"
Let me test more thoroughly. First, the multi-skill scenario (checking all skills with no args), and a full check output for the name case:
Assistant
The eval discovery works. The schema errors are just due to my minimal test eval.yaml. Now let me test the multi-skill case (no args) with the full workspace from the issue, to verify all nested skills are discovered:
Assistant
The nested heredocs caused issues. Let me use a Python script to set up the workspace cleanly.
Assistant
Now let me test coverage, check (no args = all skills), and individual checks:
Assistant
All 5 nested skills are discovered consistently by both
coverageandcheck(no args → all skills), with evals found for each. Let me verify individual name and path checks for all skills:Assistant
All skill names resolve correctly. Now let me run the existing workspace tests to ensure no regressions:
Assistant
A test broke.
TestDetectContext_WithCustomSkillsDirexpects that with default options,my-skills/alpha/SKILL.md(two levels deep) is NOT found — because the root-fallback scan (step 4) should only scan immediate children, not recurse into arbitrary named dirs.My change made step 4 recurse too broadly. The correct fix: make the configured skills dir scan (step 3/3b) recursive, but keep the root fallback scan (step 4) one-level (as before). Let me restructure accordingly.
Assistant
Now update step 3 and 3b in
DetectContextto use the recursive scan:Assistant
Now let me rebuild and run the workspace tests:
Assistant
All workspace tests pass. Let me re-run the reproduction to confirm the fix still works:
Assistant
All cases work. The coverage grep just filtered rows by name. Let me run the broader test suite to ensure no regressions across the affected packages:
Assistant
All tests pass. Let me also test some edge cases to ensure robustness:
- A flat (one-level) skill layout still works.
- A skill nested three levels deep.
- Custom skills/evals dirs via
.waza.yaml.
Assistant
Both flat and three-level-deep nested skills are discovered consistently by
coverageandcheck. Now let me test custom skills/evals dirs via.waza.yaml:Assistant
checknow correctly discovers custom-dir nested skills (both name and path), thanks to theconfigDetectOptions()fix incheckReadiness. (Note:coverageitself doesn't honor custom.waza.yamlpaths — that's a pre-existing separate behavior and out of scope; the issue's reproduction uses standardskills//evals/dirs where coverage already works.)Let me run the full relevant test suite once more and review the final diff:
Assistant
The diff is clean and minimal. Let me verify a couple more edge cases —
check .(current dir is workspace root) and verify the full check output is complete:Assistant
check .at the workspace root (no SKILL.md there) reports "no SKILL.md found" — this is the pre-existing fallback behavior, not part of the reported bugs. The issue's two reported cases are fixed. Let me verify the single-skill workspace case (cwd contains SKILL.md) still works, plus run the broader test suite once more:Assistant
Single-skill workspace works in all invocation styles. Let me run the full test suite one final time to confirm no regressions across the whole repo's affected packages:
Assistant
All tests pass. Let me confirm the
internal/checkspackage (which also relies onDetectContext) passes, and clean up temp files:Assistant
All tests pass and temp files are cleaned up. Let me do a final review of the complete change:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.