//patches:audition reports success after writing nothing #69

Open
opened 2026-09-05 23:17:49 +00:00 by bcox · 0 comments
Owner

bazel run //patches:audition -- /some/dir exits 0 when /some/dir does not
exist, having written no files. The only sign is a line on stdout per patch:

cannot write /some/dir/hello.wav: could not write /some/dir/hello.wav

...and then a clean exit. A caller checking the exit status -- a script, CI, or an
agent -- sees success.

This is the same shape as the --test_filter traps CLAUDE.md documents at length: a
green run that did nothing. It cost one wasted render cycle while verifying that branch
fm-followups left the factory bank byte-identical, and it would silently produce an
empty comparison for anyone doing the same.

Two fixes, either acceptable:

  • std::filesystem::create_directories on the output path before rendering.
  • Exit non-zero on the first write failure.

Probably both: create the directory, and still fail loudly if a write fails for another
reason (full disk, permissions).

While in there: the message says the same thing twice ("cannot write X: could not write
X"), and neither half carries the errno that would explain why.

`bazel run //patches:audition -- /some/dir` exits **0** when `/some/dir` does not exist, having written no files. The only sign is a line on stdout per patch: cannot write /some/dir/hello.wav: could not write /some/dir/hello.wav ...and then a clean exit. A caller checking the exit status -- a script, CI, or an agent -- sees success. This is the same shape as the `--test_filter` traps `CLAUDE.md` documents at length: a green run that did nothing. It cost one wasted render cycle while verifying that branch `fm-followups` left the factory bank byte-identical, and it would silently produce an empty comparison for anyone doing the same. Two fixes, either acceptable: - `std::filesystem::create_directories` on the output path before rendering. - Exit non-zero on the first write failure. Probably both: create the directory, and still fail loudly if a write fails for another reason (full disk, permissions). While in there: the message says the same thing twice ("cannot write X: could not write X"), and neither half carries the `errno` that would explain why.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bcox/tymbal#69
No description provided.