run --output-dir groups files by timestamp#153
Conversation
There was a problem hiding this comment.
Pull request overview
Updates waza run --output-dir to avoid overwriting prior runs by writing artifacts into a per-run timestamped subdirectory, and adjusts docs/tests accordingly.
Changes:
- Write structured output to
{outputDir}/{timestamp}/...instead of directly under{outputDir}. - Add testable
writeOutputDirAt(..., now time.Time)and update tests to validate timestamped layout and non-collision behavior. - Document the new
--output-dirbehavior and mutual exclusivity with--output.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| site/src/content/docs/reference/cli.mdx | Documents timestamped subdirectory behavior for --output-dir. |
| cmd/waza/cmd_run_test.go | Updates output-dir tests to validate new directory structure and repeat-run separation via fixed timestamps. |
| cmd/waza/cmd_run.go | Implements timestamped run directory via writeOutputDirAt and updates flag help + comments. |
| README.md | Documents timestamped --output-dir output layout and exclusivity with --output. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #153 +/- ##
=======================================
Coverage ? 73.53%
=======================================
Files ? 141
Lines ? 15861
Branches ? 0
=======================================
Hits ? 11663
Misses ? 3351
Partials ? 847
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:
|
spboyer
left a comment
There was a problem hiding this comment.
Clean timestamp grouping for output-dir looks great, tests and docs included. Approving.
Today,
waza run --output-dir foowrites files likefoo/model.jsonthat subsequent runs with the same arguments overwrite. With this PR,run --output-dir fooinstead writes files likefoo/<timestamp>/model.json. The timestamp has millisecond precision, so it's still possible in principle for one run to overwrite another's results, however I doubt this matters in practice given our expected usage patterns.