Repository navigation
Conversation
Fix the inverted inline comment introduced in PR google#2422 and replace the opaque Integer.MAX_VALUE sentinel in CheckBulkComplianceAction's handleActiveDomainOverage() with explicit control flow across all four notification states: - Never notified (Optional.empty()): send initial 30-day cure warning. - < 30 days since last notification: cure window active, send nothing. - 30-39 days since last notification: uncured warning, send upgrade notice. - >= 40 days since last notification: prior violation was cured during days 30-39 (lastNotificationSent is not cleared when activeDomains returns below maxDomains), so treat as a new violation episode and send a fresh 30-day warning. Add unit tests in CheckBulkComplianceActionTest covering never-notified packages and exact day-29, day-30, day-39, and day-40 boundaries. BUG= http://b/586480278
|
Closing this without merging. On further investigation there is no runtime bug here. The
That is the same logic as the original if/else chain from #1867. #2422 collapsed it into a single boolean without changing behavior, but the one-line comment it added describes the opposite of what the code does. That misleading comment is what prompted this PR.
Any future work on this action belongs together under http://b/261763205: routing and scheduling it, finalizing the email templates (still the placeholders from #1867), notification throttling and error handling, and the recipient changes from #1900. If the action is retired instead, that bug tracks deleting it. |
Fix the inverted inline comment introduced in PR #2422 and replace the
opaque Integer.MAX_VALUE sentinel in CheckBulkComplianceAction's
handleActiveDomainOverage() with explicit control flow across all four
notification states:
notice.
Add unit tests in CheckBulkComplianceActionTest covering never-notified
packages and exact day-29, day-30, day-39, and day-40 boundaries.
BUG= http://b/586480278
This change is