Raxx · internal docs

internal · gated ↑ index

ADR 0019 — Founders Grace: business-day calendar library choice

Status: Proposed — open question; Kristerpher confirmation required before sub-card can be claimed Date: 2026-04-23 Deciders: software-architect (proposed) — needs Kristerpher confirmation Related: docs/architecture/founders-grace-transition.md §4 Parent card: #210


Context

The Founders grace window is 5 business days (one business week), computed from the UTC date when the trial expires. "Business day" means Monday–Friday, excluding US federal holidays. The computation must be:

Three candidates: pandas_market_calendars, workalendar (or its fork workalendar-core), and a custom hand-maintained holiday list via env var.


Decision (proposed — pending Kristerpher confirmation)

Use workalendar (or workalendar-core if the main package is unmaintained at implementation time) for UnitedStatesCalendar. This provides a maintained, tested US federal holiday schedule without pulling in the full pandas / numpy / pyexchange stack.

If workalendar is found to be unmaintained or unlicensed at implementation time, fall back to the custom env-var approach (see below).

The specific library is confirmed by feature-developer at implementation time, subject to: 1. License is MIT-compatible (MIT, Apache-2, BSD). 2. Package is receiving security updates. 3. Total dependency weight added to Raptor is < 5 MB.

If none of the above candidates pass, use the custom env-var approach without a third-party library.


Consequences

Positive (workalendar)

Negative (workalendar)

Custom env-var approach (fallback)

FOUNDERS_HOLIDAY_LIST is a JSON array of ISO-8601 date strings (e.g., ["2026-01-01", "2026-05-25"]). compute_grace_end iterates weekdays and skips dates in this list.


Alternatives considered

pandas_market_calendars

Has USFederalHolidayCalendar and NYSE/NASDAQ trading calendars. Rejected for v1 because it depends on pandas + numpy + pyexchange, adding significant weight to the Raptor container for a task that is a simple weekday-counting loop. The Founders grace window does not need market-hours granularity.

dateutil.rrule (python-dateutil)

Can generate business-day sequences via RRULE with BYDAY=MO,TU,WE,TH,FR. Does not include holiday awareness. Would require pairing with one of the above for holiday skipping. Rejected as incomplete on its own.

Python standard library only (no third-party)

calendar.weekday() + custom holiday list (as in the env-var fallback). Viable. If no acceptable third-party library exists at implementation time, this is the fallback.


Open question for Kristerpher

The library choice is proposed here but Kristerpher must confirm:

  1. Is the custom env-var approach acceptable for v1, or is a maintained library required?
  2. If a library: is workalendar acceptable, or is there a preference?
  3. Who owns the annual holiday-list update? (Applies to both the library upgrade path and the env-var path.)

This decision blocks the compute_grace_end implementation sub-card.


Revisit when