Skip to content

run --output-dir groups files by timestamp#153

Open
chlowell wants to merge 2 commits intomicrosoft:mainfrom
chlowell:output-dir
Open

run --output-dir groups files by timestamp#153
chlowell wants to merge 2 commits intomicrosoft:mainfrom
chlowell:output-dir

Conversation

@chlowell
Copy link
Member

Today, waza run --output-dir foo writes files like foo/model.json that subsequent runs with the same arguments overwrite. With this PR, run --output-dir foo instead writes files like foo/<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.

Copilot AI review requested due to automatic review settings March 20, 2026 15:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-dir behavior 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-commenter
Copy link

codecov-commenter commented Mar 20, 2026

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@52e123f). Learn more about missing BASE report.

Files with missing lines Patch % Lines
cmd/waza/cmd_run.go 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #153   +/-   ##
=======================================
  Coverage        ?   73.53%           
=======================================
  Files           ?      141           
  Lines           ?    15861           
  Branches        ?        0           
=======================================
  Hits            ?    11663           
  Misses          ?     3351           
  Partials        ?      847           
Flag Coverage Δ
go-implementation 73.53% <85.71%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@chlowell chlowell marked this pull request as ready for review March 20, 2026 17:02
Copilot AI review requested due to automatic review settings March 20, 2026 17:02
@chlowell chlowell enabled auto-merge (squash) March 20, 2026 17:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants