contracts 1.24.0: devotionals two years ahead; Apps fetch 2 weeks

CROSSCODE_DEVOTIONALS_SCHEDULE_MONTHS (24) for how far ahead the Hub
schedules Cross Code's devotionals, CROSSCODE_DEVOTIONALS_FETCH_DAYS (14)
for what GET /api/v2/devotionals answers. The CSV takes 800 rows and
8 MB, so two years fit in one file. CROSSCODE_DEVOTIONALS_AHEAD_MONTHS
kept, deprecated. Docs: Hub 2.26.1, hub-protocol.md §3c, the App plan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-30 23:23:18 +02:00
co-authored by Claude Opus 5.5
parent 986d69d51d
commit 9cf2956aff
9 changed files with 77 additions and 29 deletions
+3 -2
View File
@@ -264,9 +264,10 @@ X-Hub-Install / X-Hub-Timestamp / X-Hub-Signature (as in §3)
`GET /api/v2/devotionals?from=YYYY-MM-DD` (contracts `hub.DEVOTIONALS_PATH`), with
`Authorization: Bearer <the install's licence token>` (§4); no signature. An App set to "From
Cross Code" calls it once a night (and on "Sync now") and keeps what it gets, so a Hub outage
changes nothing.
of less than 2 weeks changes nothing.
- `from` defaults to today (South Africa); the answer covers `from` to 3 months on, one
- `from` defaults to today (South Africa); the answer covers `from` and the 13 days after it
(2 weeks, contracts `CROSSCODE_DEVOTIONALS_FETCH_DAYS`; Hub 2.26.0 answered 3 months), one
devotional per day at most, oldest first (`devotionalsReplySchema`, `crosscode.devotional/1`,
each with `source: "crosscode"`). The App replaces its copy of that range: a day missing from
the list was removed in the Hub.