Repository navigation
Enable: repair "do not overwrite" retention to circular (#73) - #80
Merged
Merged
Conversation
Test failed a kit log set to Retain ("do not overwrite events"), but
Enable never changed retention, so the FAIL stayed. Enable now runs
wevtutil sl /rt:false on such a log, with a warning, and the state
snapshot records each log's LogMode so -Rollback restores Retain
(/rt:true) where it was the original mode. AutoBackup ("archive when
full") is left alone. Rollback copies from earlier versions get LogMode
backfilled from the current state on the next run (earlier versions
never changed it), without counting as new settings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 40 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: spydisec/WinLogKit/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Closes #73. From the review of Yamato WELA #379.
Problem: Test fails a kit log whose retention is Do not overwrite events (Retain: logging stops when the log fills), but Enable never changed retention, so the FAIL stayed until someone fixed it by hand.
Change (Enable only)
wevtutil sl <log> /rt:false(overwrite as needed, per Microsoft'swevtutildocs), reported asretention "do not overwrite" -> overwrite as needed, with a yellow warning explaining it, that-Rollbackrestores it, and what to do if it was deliberate. AutoBackup ("archive the log when full") keeps logging, so it's left alone, matching Test (which only fails Retain).Get-CurrentKitStaterecords each log'sLogMode./rt:trueonly where the recorded mode was Retain; other modes and older baselines leave retention alone.Add-NewItemsToFirstRunbackfillsLogModeinto pre-Enable: repair "do not overwrite" retention to circular #73 channel entries from the current state (earlier versions never changed retention, so current = pre-kit) and writes the file, without counting it as new settings.Checks: Pester 64/64 on PowerShell 7 and 5.1 (2 new: backfill of a pre-#73 baseline;
/rt:falseonly on apply and/rt:trueonly on rollback). PSScriptAnalyzer clean for the kit;mkdocs build --strictpasses.Not verified here: the apply and rollback of retention need an elevated run on a host with a Retain log; the self-checks cover the logic, not a live change.
🤖 Generated with Claude Code