Explain analysis hash changes in queue verification - #985
AbandonedCart wants to merge 5 commits into
Conversation
Reviewer's GuideQueue verification now explains analysis hash mismatches when they can be attributed to analyzer action or Chromaprint availability changes, otherwise emitting an explicit limitation-aware fallback; tests validate each outcome and logs include the explanation. Sequence diagram for analysis hash mismatch explanationsequenceDiagram
participant QueueVerifier
participant ConfigHasher
participant Logger
QueueVerifier->>ConfigHasher: ExplainAnalysisHashChange(config, mode, action, ffmpegValid, storedHash)
ConfigHasher->>ConfigHasher: Analysis(config, mode, previousAction, ffmpegValid)
alt stored hash matches alternate analyzer action
ConfigHasher-->>QueueVerifier: analyzer action changed from previousAction to action
else stored hash matches alternate Chromaprint availability
ConfigHasher->>ConfigHasher: Analysis(config, mode, action, !ffmpegValid)
ConfigHasher-->>QueueVerifier: Chromaprint availability changed
else no known alternate hash matches
ConfigHasher-->>QueueVerifier: limitation-aware fallback reason
end
QueueVerifier->>Logger: LogSeasonConfigHashChanged(..., reason)
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="IntroSkipper/Helper/ConfigHasher.cs" line_range="115-117" />
<code_context>
+ continue;
+ }
+
+ if (Analysis(config, mode, previousAction, ffmpegValid) == storedHash)
+ {
+ reasons.Add($"analyzer action changed from {previousAction} to {action}");
+ }
+ }
</code_context>
<issue_to_address>
**nitpick (bug_risk):** When both the analyzer action and Chromaprint availability changed since the stored analysis, neither alternate hash tested by `ExplainAnalysisHashChange` matches: it checks the old action with the current availability and the current action with the old availability, but never checks the combination of both previous values. It therefore returns the generic fallback instead of identifying either known change.
**Triggers:** When a stored hash was produced with, for example, `AnalyzerAction.Chapter` and `ffmpegValid: false`, while the current state uses `AnalyzerAction.Default` and `ffmpegValid: true`.
**Suggested fix:** Also recalculate the cross-product of alternate analyzer actions and the alternate Chromaprint availability, or report each matching dimension independently while testing the combined previous state.
</issue_to_address>
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 file)
Previous Review Summaries (3 snapshots, latest commit 191aaf1)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 191aaf1)Status: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Previous review (commit 2b1f7f6)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (3 files)
Fix these issues in Kilo Cloud Previous review (commit 4ebbb86)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (3 files)
Reviewed by gpt-5.6-luna · Input: 0 · Output: 0 · Cached: 0 |
| private static partial void LogSeasonQueuedForAnalysis(ILogger logger, AnalysisMode mode, int count, int total, string name, int season, AnalysisReason reason); | ||
|
|
||
| [LoggerMessage(Level = LogLevel.Information, Message = "[Mode: {Mode}] Queuing {Count} of {Total} items in {Name} season {Season} for analysis: analysis configuration hash changed from \"{StoredHash}\" to \"{ExpectedHash}\" (chromaprint available: {ChromaprintAvailable})")] | ||
| [LoggerMessage(Level = LogLevel.Information, Message = "[Mode: {Mode}] Queuing {Count} of {Total} items in {Name} season {Season} for analysis: analysis configuration hash changed from \"{StoredHash}\" to \"{ExpectedHash}\" (reason: one or more analysis settings changed; chromaprint available: {ChromaprintAvailable})")] |
There was a problem hiding this comment.
[WARNING]: The hardcoded reason is inaccurate for several causes of this hash mismatch. ConfigHasher.Analysis includes analyzer action, Chromaprint availability for some modes, and analyzer-version tokens in addition to configurable settings, so a change in any of those values is logged as one or more analysis settings changed. This makes the new diagnostic misleading; use wording that covers all hashed inputs or retain the explicit cause-specific explanation.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Summary by Sourcery
Explain analysis hash mismatches in queue verification logs to clarify why items are re-analyzed.
New Features:
Enhancements:
Tests: