chennaji9 opened a new pull request, #5896:
URL: https://github.com/apache/rocketmq-dashboard/pull/5896

   ### Which Issue(s) This PR Fixes
   
   None — self-contained fix found by inspection (no issue tracked). Different 
component than the (closed, unimplemented) #5098: that one was the web 
one-time-window form; this is the server-side recurring-schedule resolver.
   
   ### Brief Description
   
   `AlertSilenceSchedule` rebuilds each occurrence with 
`ZonedDateTime.of(LocalDateTime.of(date, time), zone)`, which always picks the 
**earlier** offset for wall-clock times that exist twice on fall-back days. 
Consequences:
   
   - A silence seeded at the **second** pass of an ambiguous time (e.g. 
`startsAt = 2026-11-01T06:30Z` = 01:30 EST in `America/New_York`, where 01:30 
also exists at 05:30Z EDT) rebuilds its first occurrence at 05:30Z. That lands 
before `startsAt`, so the check `start.isBefore(scheduleStart)` skips it — 
**the seeded window itself is never active**, and alerts fire during a window 
the user silenced.
   - Later occurrences on overlap days drift to the earlier pass the same way 
(active an hour early).
   
   Fix: rebuild every occurrence with `ZonedDateTime.ofLocal(local, zone, 
preferredOffset)` carrying the offsets the seed was created with — one for the 
start boundary, one for the end boundary. The seeded window resolves back to 
its exact instants; later overlap days keep the same pass; unambiguous days and 
spring-gap days behave exactly as before (`ofLocal` falls back to standard 
rules when the preferred offset is invalid).
   
   ### How Did You Test This Change?
   
   `cd server && mvn -B -ntp test 
-Dtest='AlertSilenceScheduleTest,AlertSilenceServiceTest,AlertStateMachineTest,AlertSilenceControllerTest'
 -DfailIfNoTests=false` → **Tests run: 32, Failures: 0, Errors: 0**.
   
   Red-green on the two new tests 
(`recurrenceHonorsSeedOffsetDuringFallBackOverlapTest`, 
`recurrenceKeepsSeedOffsetOnLaterOverlapDaysTest`):
   - before the fix: both fail — the seeded 06:30Z–07:30Z window returns null 
at 06:45Z, and the next year's overlap day (2027-11-07) is wrongly active at 
05:45Z;
   - after the fix: both pass.
   - The 9 pre-existing schedule tests — including 
`dailyWindowKeepsWallClockTimesAcrossSpringDstTest` — stay green, pinning 
unchanged behaviour on normal and spring-gap days.
   
   Not run: full `mvn test` (integration tests need MySQL 8); the change is 
confined to the package-private resolver used by the silence service, which is 
covered above.
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in
   - [x] Commit subject follows Conventional Commits (`fix:`)
   - [x] Tests added or updated for non-trivial changes (2 new red-green tests)
   - [x] New UI text has both Chinese and English entries under `web/src/i18n/` 
(n/a — no UI change)
   - [x] Architecture constraints stay green (same class, same package, no new 
dependency)
   - [x] New source files carry the ASF license header (n/a — no new source 
file)
   - [x] Documentation touched where behaviour changed (n/a — behaviour now 
matches the documented "window starts at the configured local time" intent)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to