Recurrence horizon guard: warn when resolving years beyond the lookup tables (2035) #61
Labels
No labels
area/ai
area/backend
area/frontend
area/infra
area/scheduler
area/wled
good-first-issue
priority/high
priority/low
priority/medium
type/bug
type/chore
type/ci-cd
type/docs
type/feature
type/qa
v1.0.0
v1.1.0
v1.2.0
v2.0.0
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/Iris-WLED#61
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
From the 2026-07-15 review follow-ups. The
hindu_lunarand somecomputedrecurrence functions use pre-computed tables ending at 2035 (services/recurrence.py). Resolution outside the range raisesValueError, which the loaders catch and log — so from 2036 those events (Diwali, Lunar New Year, …) silently vanish from the calendar.Done in #113, except the table extension, which is split to #114.
GET /api/v1/recurrence-horizonand a banner in the app shellExtend the tables while at it→ #114docs/troubleshooting.md, "Recurrence horizon"Why the extension moved
This asked to extend 2036–2045 as "cheap to add now". It isn't, and the reason is worth having on record:
holidaysstops at 2035 itself —country_holidays("IN", years=[2036])warns "available only from 2001 to 2035" and returns nothing for Diwali; no Chinese New Year entries either. The obvious escape hatch has the same horizon.astralhas no solstice or equinox function — sunrise, sunset, golden hour,sun_declination, but nothing yielding an equinox instant.So it needs an ephemeris library, a Chinese-calendar library, and a panchanga source for Diwali (tithi-based, not a plain lunar phase). Writing sixty dates by hand would have been silently wrong in a way far harder to notice than the events being absent — which is precisely what the guard now reports loudly. #114 carries the routes ranked by tractability, and the advice to validate any computation against the sixteen known years first.
table_horizon()is derived from the table data, so #114 will move it automatically once every table is extended — note it's the minimum across tables, so extending only some changes nothing.Closing.