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 more.
Assistant
Now let me look at the
checkReadinessfunction, especially the eval discovery logic.Assistant
Now let me look at the workspace package functions used:
FindEval,DetectContext,LooksLikePath, andresolveWorkspace.Assistant
Now I understand the structure. Let me look at the
resolveWorkspacefunction and the workspace_resolve.go file.Assistant
Let me look at the actual repo's skills directory structure and how coverage discovers skills.
Assistant
Let me look at the coverage command to understand how it discovers skills/evals successfully.
Assistant
Now let me look at the existing tests for check and workspace detection to understand expected behavior.
Assistant
Now I see the existing tests use a flat structure (
skills/skill-one/SKILL.md). The issue is about a nested structure with category subdirectories (skills/development/skill-creator/SKILL.md).Let me look at the workspace tests to understand more.
Assistant
Now I have a clear understanding. Let me reproduce the issue by creating a test workspace with the nested category structure described.
Assistant
Build succeeded. Now let me reproduce the issue.
Assistant
I've reproduced both issues. Now let me check where
resolveEvalPathand related functions are used.Assistant
Let me look at
internal/checks/eval_suite.gosince it's part of the checks run bycheck.Assistant
Let me check where
EvalSuiteCheckeris instantiated and the checker registry.Assistant
EvalSuiteCheckeris not in SpecCheckers or AdvisoryCheckers. So it's not run bycheck's step 7. It's a separate checker, maybe used byscorecommand. Let me check where it's instantiated.Assistant
I've confirmed both bugs. The root cause is:
scanForSkillsininternal/workspace/workspace.goonly scans immediate children, so nested skills likeskills/development/skill-creator/SKILL.mdaren't discovered (whilecoverageuses recursiveWalkDir).- In
checkReadiness, the auto-detect block callsDetectContext(wd)without the project config options, and doesn't ensure the skill is in the context.
Let me look at the exact section of workspace.go to edit.
Assistant
Now let me view the DetectContext step 3 section to make the edit.
Assistant
Now let me make the edits. First, add
io/fsto the imports.Assistant
Now update step 3 and 3b to use recursive scanning:
Assistant
There are leftover duplicate lines (135-137) from the old code. Let me remove them.
Assistant
Now let me find the
scanForSkillsfunction and add the recursive version plus a helper. Let me view it.Assistant
Now let me add the recursive scan function and a helper after
scanForSkills.Assistant
Now let me verify the workspace package builds.
Assistant
There's a leftover
return skillsand}from the old function. Let me remove it.Assistant
The struct fields got lost and there are stray lines. Let me fix lines 370-376.
Assistant
My earlier edit removed the
skillsDirdeclaration. Let me view that area.Assistant
I accidentally removed the
skillsDirdeclaration block. Let me restore it.Assistant
Now let me fix
checkReadinessincmd_check.go— the auto-detect block needs to use config options and ensure the skill is in context. Let me view the relevant section.Assistant
Now let me add a helper
findEvalForSkilltoworkspace_resolve.gothat uses config-aware detection and ensures the skill is in the context.Assistant
Let me add a shared helper
findEvalForSkilland refactorresolveEvalPathto use it.Assistant
Now update the auto-detect block in
checkReadinessto use the helper:Assistant
The edit was applied to the wrong file (workspace_resolve.go) because it was the open file. Let me remove the stray block from workspace_resolve.go.
Assistant
Now let me apply the edit to
cmd_check.gousing the--fileoption to target it directly.Assistant
Let me open
cmd_check.goat the relevant line and apply the replace.Assistant
Now let me build the whole project and rebuild the binary.
Assistant
Now let me re-test the reproduction workspace.
Assistant
Both bugs are fixed. The schema errors are just from my minimal test eval.yaml. Let me create a more complete multi-skill workspace matching the issue exactly to verify the full experience, including
waza check .with multiple skills.Assistant
The multi-skill
check .produced no grep matches. Let me run it fully to see what's happening.Assistant
The
waza check .case still fails because.is treated as a path (looks for SKILL.md in the current dir). For consistency withwaza coverage ., when the given path is a directory without a direct SKILL.md, it should fall back to workspace detection. Let me view the path branch.Assistant
The replace tool requires the search text to be within the displayed window. The file is open at line 423 area earlier; let me re-open at line 176 and run replace there.
Assistant
Now I need to add the
dirContainsSkillhelper. Let me add it nearcheckReadiness.Assistant
The edit introduced a stray
}and a duplicatefunc checkReadinesssignature. Let me fix lines 366-389.Assistant
There's a duplicate
report := &readinessReport{}at lines 388-389. Let me fix it.Assistant
There's a duplicate comment
// 1. Check for SKILL.mdat lines 390-391. Let me fix it.Assistant
Now let me build and verify.
Assistant
waza check .now discovers all three nested skills with a summary table. All cases work. Now let me run the existing tests to ensure I didn't break anything.Assistant
A test broke:
TestCheckCommandNoSkillMd. Let me examine it.Assistant
The issue:
configDetectOptions()loads config from cwd and produces absolute paths tied to the repo root. Whencheck <tmpDir>is called,DetectContextstill scans the cwd's absolute skills dir. I need config detection rooted at the given directory. Let me look atprojectconfig.Load.Assistant
I'll make config detection support a base directory. Let me update
workspace_resolve.goto addconfigDetectOptionsFor(dir).Assistant
Now update the path branch in
cmd_check.goto useconfigDetectOptionsFor(skillDir).Assistant
Now let me build and run the check tests.
Assistant
All check command tests pass now. Let me run the full cmd/waza test suite and the workspace tests.
Assistant
Now let me re-verify the reproduction scenarios with the rebuilt binary, including the multi-skill
check .case.Assistant
All scenarios work. Now let me verify the
runcommand tests still pass (since I refactoredresolveEvalPath).Assistant
Let me run the broader test suite to catch any regressions across packages that use workspace detection.
Assistant
All tests pass. Let me check whether the recursive scan would newly discover any unexpected nested SKILL.md files in the repo's own
skills/directory (which could affectdev/other commands).Assistant
Only flat SKILL.md files exist in the repo, so the recursive scan discovers the same set — no behavior change for the repo itself.
Let me check the grader config schema to make a valid eval for final confirmation that
coverageandcheckagree.Assistant
The grader uses
type(notkind) andname. Let me check valid grader kinds and create a clean valid eval to confirmcoverageandcheckfully agree.Assistant
Let me look at an existing valid eval example to model my repro correctly.
Assistant
This is the co-located eval layout (
examples/code-explainer/eval.yamlnext toSKILL.md). Let me look at the full eval.yaml to model valid graders and tasks.Assistant
Now I understand the valid eval format. Let me regenerate the repro evals with valid graders so
coverageparses cleanly andcheckshows full agreement.Assistant
Excellent!
coverage .shows 100% (3/3 fully covered) andcheck .discovers all three skills with evals Found — they fully agree now. Let me verify the JSON output format works too.Assistant
JSON output correctly reports eval found with the resolved path. Let me review the full diff to ensure everything is clean.
Assistant
The diff looks clean. I notice
workspace_resolve.golost its trailing newline. Let me fix that and restore the blank line I removed in workspace.go to keep the diff minimal.Assistant
Now let me restore the blank line in workspace.go that I inadvertently removed.
Assistant
Now let me run
gofmtto ensure formatting is correct, then rebuild and rerun the relevant tests.Assistant
All tests pass. Let me do a final verification of the exact issue scenarios plus a few edge cases (co-located and nested evals, single-skill workspace).
Assistant
The
runcommand gets past eval resolution (it now fails on a spec-validation detail in my test eval, not discovery). Let me verify edge cases: co-located eval (skill-dir/eval.yaml) and nested eval (skill-dir/evals/eval.yaml) discovered bycheckvia both path and name.Assistant
All edge cases work. Let me test a single-skill workspace (cwd directly contains SKILL.md) to confirm no regression.
Assistant
Single-skill workspace works in all invocation modes. Let me run
go veton the changed packages and a final full test sweep.Assistant
Let me get a cleaner test summary to confirm zero failures.
Assistant
All 43 packages pass with no failures. Let me check git status to confirm only the intended files changed and no stray files in the repo.
Assistant
Only the three intended files are modified. Let me do a final review of
workspace_resolve.goto confirm correctness.Assistant
Let me quickly check the
dev/copilot.goresolveWorkspaceEvalDirsince it also usesDetectContextand now benefits from recursive scanning.Assistant
All changes are clean and complete. Let me run the workspace and check tests once more verbosely for the key tests to be fully confident before submitting.
Assistant
All tests pass. The fix is complete and verified. Let me provide a summary of the changes and submit.
Summary
The root cause was that
waza checkused different (shallower) discovery rules than and :
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.