Bug
_normalize_dow_field in trigger_service.py (added by #4918) correctly handles scalars (7→0) and pure ranges (1-7→1-6,0) but does not handle range-step tokens like 1-7/2.
The regex r'(\d+)-(\d+)' does not match 1-7/2 (because of the /2 suffix). The token falls through to the scalar branch, which returns 1-7/2 unchanged. When _parse_cron_field processes 1-7/2, it produces {1, 3, 5, 7} — the 7 is never mapped to Sunday (0), so the cron expression fires on an unrecognized day.
Reproducer
_normalize_dow_field('1-7/2') # returns '1-7/2' unchanged — should return '1-6/2,0' or equivalent
Fix
Extend _replace_token to match the pattern r'(\d+)-(\d+)/(\d+)' and replace hi=7 with 6 in the range portion, then add ,0 to include Sunday.
File
autobot-backend/services/trigger_service.py — _normalize_dow_field / _replace_token
Bug
_normalize_dow_fieldintrigger_service.py(added by #4918) correctly handles scalars (7→0) and pure ranges (1-7→1-6,0) but does not handle range-step tokens like1-7/2.The regex
r'(\d+)-(\d+)'does not match1-7/2(because of the/2suffix). The token falls through to the scalar branch, which returns1-7/2unchanged. When_parse_cron_fieldprocesses1-7/2, it produces{1, 3, 5, 7}— the7is never mapped to Sunday (0), so the cron expression fires on an unrecognized day.Reproducer
Fix
Extend
_replace_tokento match the patternr'(\d+)-(\d+)/(\d+)'and replacehi=7with6in the range portion, then add,0to include Sunday.File
autobot-backend/services/trigger_service.py—_normalize_dow_field/_replace_token