Repository navigation
compile: directory argument silently no-ops instead of auto-discovering or erroring #867
Description
Summary
ado-aw compile <dir> silently produces 0 compiled, N skipped instead of either (a) auto-discovering the *.md files in that directory, or (b) failing loudly with a clear "expected a file, got a directory" error.
Repro
$ ado-aw compile tests/safe-outputs/
# Detects 26 lock files, reports "(up to date)" for each, then
# emits "Warning: source ... not found for ... skipping" for each,
# and exits 0 with "0 compiled, 26 skipped, 0 failed".tests/safe-outputs/README.md (line 102–107) currently documents this exact form as the canonical recompile command:
# Recompile every fixture in this directory (idempotent):
cargo run -- compile tests/safe-outputs/…so the README is also out of sync with actual behavior.
What works today
ado-aw compile <file.md>— single file, works as documented.ado-aw compile(no args) — autodiscovers from cwd, works as documented.- Per-file loop:
for md in tests/safe-outputs/*.md; do ado-aw compile --force "$md"; done— works but is awkward. cd tests/safe-outputs/ && ado-aw compile— autodiscovers the 26 lock files but theirsource: tests/safe-outputs/...headers are relative to repo root, so each one is skipped with a "source not found" warning.
Observed in the wild
The recompile-safe-output-fixtures agentic workflow (PR #863, fixed in #864) was triggered against release v0.31.1 and silently did nothing because it used the documented compile tests/safe-outputs/ form. Full log: https://github.com/githubnext/ado-aw/actions/runs/27020309715/job/79746499042.
The agent then correctly inspected the lock files, saw version=0.31.1 matching the latest release, and emitted noop — masking the fact that the compile invocation never did any work. A subsequent integrity check would have caught the masking, but the root cause is the silent skip on a directory argument.
Proposed behaviour
When path resolves to an existing directory:
- Walk it (non-recursively, or recursively — match the autodiscovery behaviour) for
*.mdfiles that are agentic-pipeline sources. - Compile each.
- Print the same per-file summary lines that the no-args form prints.
If walking yields zero candidates, exit with a non-zero code and a clear error rather than 0 compiled, 0 skipped.
Less-good alternatives
- Reject directory args with a hard error and a hint pointing at the no-args form. Better than the current silent-skip behaviour but worse than DWIM.
- Update only the README to document the per-file loop. Doesn't fix the surprise for everyone else.
Workaround for now
for md in tests/safe-outputs/*.md; do
ado-aw compile --force "$md"
doneThis is what the recompile-safe-output-fixtures workflow now does (PR forthcoming after this issue is filed).
Activity
fix(workflows): add integrity heuristic and per-file compile loop to …