Moved normalised-date() to top level to use in sla_violation_profiler…#856
Conversation
… and used it Signed-off-by: JanAms130 <AmsJan@web.de>
|
Warning Review limit reached
More reviews will be available in 37 minutes and 11 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis pull request introduces a module-level ChangesDate Normalization Integration
🎯 3 (Moderate) | ⏱️ ~25 minutes
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@sla_violation_profiler.py`:
- Around line 105-110: The current loop unconditionally continues when a
rescoring has the same calendar day as the finding, which prevents any later SLA
checks (iter_policy_violations) for that finding; change the logic so same-day
rescoring does not suppress SLA evaluation unless the rescoring explicitly
removes SLA info. Replace the unconditional continue in the loop over
sorted_rescorings (the block using
rescore.utility.normalise_date(rescoring.meta.creation_date) and
finding_creation_date) with a conditional that only skips to the next rescoring
when that rescoring does not set a due_date or allowed_processing_time (i.e.,
rescoring has no SLA fields); otherwise allow the code to proceed to the
iter_policy_violations path so finite due_date/allowed_processing_time can still
produce overdue violations.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6205b181-bc6d-4d57-8580-d0fc5b7fb8ff
📒 Files selected for processing (2)
rescore/utility.pysla_violation_profiler.py
Signed-off-by: JanAms130 <AmsJan@web.de>
… and used it
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Release note: