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 exploring the repository structure to understand the codebase.
Assistant
This is a Go project. Let me explore the structure further.
Assistant
Now let me look at the discovery logic in the workspace package.
Assistant
Now let me look at the check command.
Assistant
Let me look at the workspace_resolve.go file as it might be relevant.
Assistant
Now let me look at the coverage command to see how it discovers skills.
Assistant
Let me look at the project config to understand the
pathsconfiguration:Assistant
Let me set up a test workspace to reproduce the issue.
Assistant
Now let me create a test workspace to reproduce the issue:
Assistant
Now let me build the waza command and run the tests:
Assistant
Now let me reproduce the issue:
Assistant
I reproduced the first issue. Now let me reproduce the second case:
Assistant
Let me dig into the workspace detection logic to understand why it fails:
Assistant
Now I understand the workspace detection. It only looks at immediate children of
skills/. So for our case withskills/development/skill-creator/, the detection findsskills/development/but it doesn't have SKILL.md at the top level.Let me verify this:
Assistant
Now let me look at the rest of the workspace tests to understand the test conventions:
Assistant
Let me look at the existing check tests to understand the test conventions:
Assistant
Now let me look at the discovery logic to see if it walks recursively:
Assistant
Let me look at how
waza rundiscovers skills:Assistant
Let me look at how
scanForSkillsworks:Assistant
Let me also check the GitHub skills scenario:
Assistant
Let me check the EvalSuiteChecker more carefully:
Assistant
Let me run the existing tests to make sure they pass first:
Assistant
Let me look at the cmd_check.go more carefully to understand the runCheck flow:
Assistant
Now I have a clear understanding. Let me implement the fix.
First, let me make
scanForSkillswalk recursively:Assistant
Now let me make the first change - update
scanForSkillsto walk recursively:Assistant
Now let me update
scanForSkillsto walk recursively:Assistant
Now let me update the
scanForSkillsfunction to walk recursively:Assistant
Now let me make the changes. First, add
io/fsto imports:Assistant
Let me make the changes to the workspace.go file. First, I'll add the
io/fsimport, then updatescanForSkillsto walk recursively.Assistant
Now let me update
scanForSkillsto walk recursively:Assistant
Let me see the current state of the file:
Assistant
I see there's a leftover
return skills\n}from the old function. Let me fix it:Assistant
Good. Now I need to check the original line 282 to see if the previous function is intact:
Assistant
I need to add the missing closing brace to
parseAgentNameFromFile:Assistant
The file is in a bad state. Let me just rewrite the entire file:
Assistant
Let me reset the file and start over with a cleaner approach:
Assistant
Now let me look at the original file structure again:
Assistant
Now let me make the changes step by step, starting with the imports:
Assistant
Now let me update the
scanForSkillsfunction. Let me navigate to that location first:Assistant
Now let me update the comment in
DetectContextto reflect the new behavior:Assistant
Now let me build and test to see if this works:
Assistant
Let me look at this test:
Assistant
I see - the recursive walk breaks the test
TestDetectContext_WithCustomSkillsDirbecause step 4 (scan CWD) now findsmy-skills/alpha/SKILL.mdrecursively. The original step 4 was non-recursive, so this is a behavior change. Let me keep step 4 non-recursive to maintain backward compatibility:Assistant
Now I need to update step 4 in
DetectContextto use the shallow version:Assistant
Also update the comment in
DetectContextto match:Assistant
Now let me also look at the comment about step 3 since we changed the behavior:
Assistant
Now let me run the tests again:
Assistant
I have an extra
}at line 382. Let me remove it:Assistant
Let me clean up the duplicates:
Assistant
Let me fix the remaining duplicate:
Assistant
The file is in a bad state. Let me just rewrite the entire file using a clean approach:
Assistant
All existing workspace tests pass. Now let me also verify my fix works for the test case:
Assistant
The first case is now fixed. Let me also check the second case:
Assistant
Both cases are now fixed. Now let me make sure the
checkcommand also handles paths well by passing the workspace context. Let me look at the runCheck function:Assistant
Let me look at the
checkReadinessfunction more carefully:Assistant
Now let me also improve the
runCheckto pass the workspace context when a path is given, so the eval detection works with custom paths:Assistant
I see the original code was deleted. Let me restore it:
Assistant
I can see the issue. The
return fmt.Errorf(...)line was deleted, and the closing}was also affected. Let me fix this.Assistant
I see the issue. The line 161 lost the
}at the end. Let me check more carefully:Assistant
Now let me build and test:
Assistant
Let me also rebuild and verify:
Assistant
Both cases work. Let me also verify that the existing tests still pass:
Assistant
All tests pass. Now let me also think about edge cases and add tests for them:
Assistant
The go.mod change is unrelated to my fix. Let me revert it:
Assistant
Now let me think about more edge cases. Let me also verify the behavior is consistent for
waza run:Assistant
Now let me also verify the error message for the case where the skill is not found, to see if we can improve the messaging:
Assistant
The case where there's no eval works correctly. Now let me also verify the case where the user gives a non-existent skill name:
Assistant
Let me look at what
resolveWorkspacedoes when the skill name is not found:Assistant
Let me improve the error handling so users get a clearer error when the skill name is wrong:
Assistant
Now let me build and test:
Assistant
Now we get a clear error message. Let me also verify the other cases still work:
Assistant
Let me run the existing tests to make sure nothing is broken:
Assistant
Now let me also think about adding some new tests to verify the recursive discovery. Let me also think about a few more edge cases:
Assistant
All the test cases now work. The error on test 8 was just because the test script exited at test 7 due to the error. Let me re-run test 8 separately:
Assistant
Now let me also add tests for the new behavior. Let me add tests to the workspace_test.go and cmd_check_workspace_test.go:
Assistant
Now let me add tests for the new recursive behavior. Let me look at the existing test file to understand the conventions:
Assistant
Let me add tests for the new behavior. Let me append tests to the workspace_test.go file:
Assistant
All my new tests pass. Now let me also add tests for the cmd_check to verify the behavior:
Assistant
All my new tests pass. Now let me run the full test suite to make sure nothing else is broken:
Assistant
All tests pass. Let me also remove the temporary test scripts:
Assistant
Now let me also re-examine the changes to make sure everything is correct:
Assistant
Let me verify the full diff:
Assistant
Wait, the issue guidance says "UNDER NO CIRCUMSTANCES should you modify existing tests or add new tests to the repository". Let me remove the new tests I added:
Assistant
Now let me verify the tests still pass:
Assistant
Let me also re-verify the fix by writing a temporary script to reproduce the issue:
Assistant
Excellent! All test cases from the bug report work correctly:
- ✅
waza check skill-creator(by name) - now finds the eval (previously failed) - ✅
waza check skills/development/skill-creator(by path) - now finds the eval (previously failed) - ✅ All other skills (nested in different categories) are discovered
- ✅
waza check(no args) - discovers ALL skills (including nested ones) - ✅
waza check nonexistent-skill- returns a clear error message
Let me clean up:
- ✅
Assistant
Let me also check whether I might have missed something. Let me look at the
runCheckfunction once more:Assistant
Now let me also consider: when a path is given and it's a SKILL.md file (not a skill directory), my fix should still work. Let me verify:
Assistant
Good. Let me also think about what happens with
--format json. Let me verify that path too:Assistant
JSON output also works. Let me also clean up:
Assistant
Let me run the full test suite one more time to make sure everything is still working:
Assistant
All tests pass. Let me also run the linter to check for any code quality issues:
Assistant
No vet issues. Let me also verify the formatting:
Assistant
Formatting is clean. Let me also look at the diff one more time to make sure everything is consistent:
Assistant
The go.mod change is from the
go buildcommand and is unrelated. Let me revert it:Assistant
Let me also check the final state of the workspace.go file to ensure it's complete and correct:
Assistant
Looks great. Let me also do a final check by running the tests with verbose output:
Assistant
All existing tests pass. Now let me also look at the final fix summary to make sure I addressed everything from the issue:
Assistant
Let me also verify a single-skill case:
Assistant
Single-skill case also works. Let me also verify a flat multi-skill case:
Assistant
Let me do a final review of the complete diff:
Assistant
Now let me also verify by running the full test suite one more time:
Assistant
All tests pass. Now let me also document the checklist completion:
Checklist:
- If an error was reported in the issue description, I have successfully reproduced it. - I reproduced both issues:
waza check skill-creatorshowing "no SKILL.md found in " andwaza check skills/development/skill-creatorshowing "Evaluation Suite: Not Found". - If an error was reported in the issue description, I have confirmed that my fix resolves the error. - After my fix, both commands now correctly find the eval and report "Evaluation Suite: Found".
- I have thought about edge cases and made sure my fix handles them as well. - I considered:
- Single-skill workspaces (CWD or parent has SKILL.md): still works
- Flat multi-skill layouts: still works
- If an error was reported in the issue description, I have successfully reproduced it. - I reproduced both issues:
Assistant
Good, no temporary files left. Now let me also do one final test to verify everything works end-to-end:
Assistant
Both bugs from the issue are now resolved. Let me also check my final state:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.