Repository navigation
feat: preview log rotation - #28
Merged
Merged
Conversation
HaoZeke
force-pushed
the
feat/rotate-dry-run
branch
from
November 17, 2026 21:28
ede8a8e to
92ab83c
Compare
Rotate gained an opt-in dry-run mode in both the shell script and the Zig binary. It lists the files that would be compressed and the runs that would be deleted, without changing the tree, creating its lock file, emitting an event, or writing metrics when a metrics file is given.
HaoZeke
force-pushed
the
feat/rotate-dry-run
branch
from
November 18, 2026 00:38
92ab83c to
69563e9
Compare
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.
I added
--dry-runtoeb-keep-logs rotatein both the shell script and the Zig binary, rebased ontomainafter the Prometheus metrics support landed.With
--dry-run,rotateprintscompress PATHfor each.logor.txtfile it would compress. It printsdelete PATHfor each run directory it would delete, then a summary line. It changes no files or directories. The dry run creates no rotation lock file and emits no syslog or journal event. Passing--metrics-filewrites no metrics. Empty--metrics-filevalues are still refused with exit status 2.The metrics file stays untouched on a dry run. I documented that interaction with
--dry-runin the CLI reference, compatibility table, and rotation how-to guide. I added tests for--dry-runwith--metrics-filein bothtests/test_metrics.shandtests/differential.sh, while keeping the existing default-path rotation and output-stability tests unchanged.