chore(trackers): log which rename signal fired - #262
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthroughThe release policy now returns structured modified-release detections with stable signals. Tracker rules use SRRDB signals for strict failures and other signals for waivable failures. Diagnostic logging records signals and dispositions without exposing source paths. ChangesModified-release diagnostics
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant ReleasePolicy
participant EvaluateRules
participant DebugLogger
ReleasePolicy->>EvaluateRules: Return modified-release detection
EvaluateRules->>EvaluateRules: Derive disposition from signal
EvaluateRules->>DebugLogger: Record signal and disposition
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
|
No code findings. This remains valid after the latest #273 changes: equivalent signal-level diagnostics are still absent. Current state after #273
Changes required after #273 merges
Required coverage
ValidationNo shared API, workflow, CLI, or WebUI contract change is required. |
22106d0 to
21ef3b0
Compare
DetectModifiedRelease fires on three separate detections — the authoritative
srrdb scene comparison, an *arr rename token, and the whitespace rename check —
but reported a deliberately generic user-facing reason for all three, since the
reason is disclosed and must not reveal which detection tripped. That left no
way to tell them apart when diagnosing a false positive.
It now returns a typed ModifiedReleaseDetection carrying the signal that fired
as a stable ModifiedReleaseSignal (srrdb, arr-token, space-rename); the zero
value means no detection. Detection and signal classification stay in
releasepolicy, while disposition and logging stay in the tracker rules.
evaluateRules derives the strict-versus-waivable disposition from that signal
instead of separately re-reading SceneRenamed, so a single authority decides it
— srrdb strict, both heuristics waivable, unchanged from before. When the rule
fires it emits one debug line with stable fields:
trackers: rule matched tracker=%s rule=modified_release signal=%s disposition=%s
The signal is diagnostic-only: it never enters the disclosed failure reason,
operation failures, workflow snapshots, API contracts, or WebUI output, and the
log carries no source or video paths. Personal-release and disc exemptions,
skipped-group behavior, candidate order, and the generic reason are unchanged.
Pure observability, no behavior change. Also reindents a pre-existing
misformatted test block in rules_test.go that gofmt flagged in passing.
21ef3b0 to
b59e9e1
Compare
|
I missed what this was doing earlier. I am strongly opinionated against providing any avenue for a user to determine what triggered the signal. A rename could also indicate a hash mismatch, and when this signal fires, users should properly access the lineage of the file. A logging signal just wires in a potential short-circuit to proper lineage checking. Scene renames remain hard blocked, but the other cases are waivable after #273 I need to take a moment to process my own internal conflict regarding UTP. I am not a fan, at all, of their stance on renaming releases. |
isRenamedReleasefires on three separate heuristics — the srrdb scene comparison, an *arr rename token, and the space-rename check — but reports a deliberately generic user-facing reason for all three, since the reason is disclosed and must not reveal which detection tripped.That left no way to tell them apart when diagnosing a false positive. A user reports "modified_release fired and it shouldn't have" and there is nothing in the logs saying which of the three did it.
isRenamedReleasenow returns the signal name (srrdb,arr-token,space-rename) as a third value, andEvaluateRuleslogs it at debug alongside the source path, video path and group. The disclosed reason is unchanged — the signal is logging-only, which the doc comment states explicitly so nobody wires it into user-facing output later.Pure observability, no behaviour change.
go build ./...,go vetand the trackers suite (28 packages) pass.Summary by CodeRabbit
Bug Fixes
Tests