Fix --output-dir having no effect for single-skill runs#109
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes waza run --output-dir <dir> being ignored for the common “single-skill” execution path by ensuring the same structured output writing logic runs regardless of number of skills.
Changes:
- Add
--output-dirhandling to the single-skill branch inrunCommandE()by callingwriteOutputDir(). - Add a regression test that runs a single spec with
--output-dirand asserts a result JSON file is written.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cmd/waza/cmd_run.go | Writes structured output for single-skill runs when --output-dir is set. |
| cmd/waza/cmd_run_test.go | Adds coverage to ensure --output-dir produces files for single-skill runs. |
richardpark-msft
approved these changes
Mar 10, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #109 +/- ##
=======================================
Coverage ? 72.97%
=======================================
Files ? 131
Lines ? 14825
Branches ? 0
=======================================
Hits ? 10818
Misses ? 3205
Partials ? 802
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
waza run --output-dir <dir>silently produces no output files when running a single skill (the most common case). Multi-skill runs work correctly.Root Cause
In
cmd/waza/cmd_run.go, the single-skill code path returns early without ever checking theoutputDirflag:The
writeOutputDir()call only existed in the multi-skill path further down the function.Fix
Added
outputDirhandling to the single-skill path, calling the samewriteOutputDir()function used by the multi-skill path: