Repository navigation
Set Verified Only When a Verification Ran - #1111
Conversation
With the Verify option off, VerifyAndRepair() marked every file Verified. Enabling Verify later skipped those files, and a metadata repair's VerifyFailed was cleared on the next run, so the repair was retried on every other run. VerifyAndRepair() now leaves the state unchanged with the option off. Verified also kept the idet and closed caption scans from running again. The new ScannedInterlace and ScannedCaptions flags record a clean scan, so each scan still runs once per file without a verify. A tool change clears them along with Verified. Fixes #1071 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A --quickscan caption scan reads only a sample, so it sets no ScannedCaptions flag, matching the interlace scan. Remove the unreachable Verify option check in Verify(), and test that a tool change clears the scanned flags. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A recorded local strict-review pass covers head |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 2 minutes. View limit details
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 |
PR Summary by QodoSet Verified Only After Verification Runs
AI Description
Diagram
High-Level Assessment
Files changed (6)
|
Code Review by Qodo
1. Rewritten videos skip fresh scan checks
|
There was a problem hiding this comment.
🟡 Changes recommended
Two critical findings remain: later media rewrites can preserve stale interlace and caption scan flags, causing subsequent runs to skip required scans of the new content.
2 open issues
What changed in this PR
This pull request ensures verification state is recorded only when verification runs and adds independent persisted state for successful interlace and closed-caption scans.
Changes:
- Preserves verification state when
Verifyis disabled. - Adds
ScannedInterlaceandScannedCaptionsflags with tool-change invalidation. - Expands regression tests for verification and scan-state behavior.
- Updates architecture documentation and 3.23 release history.
| File | Description |
|---|---|
PlexCleanerTests/VerifyToolErrorTests.cs |
Tests that disabled verification preserves existing state and launches no tools. |
PlexCleanerTests/ScanStateTests.cs |
Tests clean, failed, quickscan, and tool-change scan-state behavior. |
PlexCleaner/SidecarFile.cs |
Adds scan flags and clears them when configured tools change. |
PlexCleaner/ProcessFile.cs |
Controls verification and scan-state behavior. |
HISTORY.md |
Records the behavior changes for version 3.23. |
ARCHITECTURE.md |
Documents the updated verification, scanning, sidecar, and state-flow behavior. |
Review effort: Lite
Without a sidecar the scan flag is never persisted, and Refresh(false) would run the three media property probes again on unchanged media, failing a clean scan if one of them failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every step that only changes a file's state called Refresh(false), which with UseSidecarFiles off runs the three media property tools on unchanged media to save a state that is never written. SaveState() skips that refresh, and every state-only site uses it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A recorded local strict-review pass covers head |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A recorded local strict-review pass covers head |
|
Answering Qodo's two open comment-only findings, each declined with evidence in its review thread:
Declined in #1111 (comment). No later rewrite adds embedded captions or interlacing to media whose full-file scan was clean. The metadata checks run on every pass before either flag is read, on the props
Declined in #1111 (comment). FfMpeg and FfProbe are one tool family, installed from one package with one minimum version. The sidecar's |

With the
Verifyoption off,Verify()passed andVerifyAndRepair()setVerifiedand clearedVerifyFailed. EnablingVerifylater skipped those files. A metadata repair'sVerifyFailedwas cleared on the next run, so the repair ran again on every other run.VerifyAndRepair()returns with the state unchanged when theVerifyoption is off, soVerifiedis set only by a verification that ran. The unreachable option check inVerify()is removed, and thePostDecodeTimestampsclear no longer needs its own option check.Verifiedalso kept the idet and closed caption scans from running again. The newScannedInterlaceandScannedCaptionsstate flags record a clean scan of the whole file, so each scan runs once per file without a verify. A scan that finds something sets no flag, sinceDeInterlacedorClearedCaptionscovers that case. A--quickscancaption sample sets no flag, as the interlace scan already skips quickscan.Verified, the maintainer's choice in this session. Existing sidecars then cost no full-library rescan on upgrade. A file alreadyVerifiedstill skips a scan enabled later, as it does today.SaveState(), which skipsRefresh(false)withUseSidecarFilesoff. Without a sidecar that refresh ran the three media property tools again on unchanged media, to save a state that is never written.SidecarFile.Read()clears both scan flags along withVerifiedon a tool change withSidecarUpdateOnToolChangeon.ScanStateTestsdrives both scans with fake tools: a clean scan sets its flag and the next run launches no tool, a failed scan and a quickscan sample set nothing, and a tool change clears the flags.VerifyToolErrorTestscovers theVerify-off case, which leavesVerifyFailedand runs no tool.ARCHITECTURE.mddrops suspect branch S4 and redraws the Closed Captions, Deinterlace, Sidecar Refresh and Verify and Repair diagrams and the state table.HISTORY.mdrecords the change under 3.23.A sidecar an earlier version wrote with the
Verifyoption off can still holdVerified. Nothing tells it apart from a real verification, so it is not re-verified automatically, andHISTORY.mdpoints atcreatesidecarto reset it.Local frontier strict-review passes ran before each push. Every finding was on text this change wrote and is fixed, and the last pass on each head raised none.
The
commentslabel is set for the comment onSaveState().Fixes #1071
🤖 Generated with Claude Code