Add fast_abstentions field and fix Dormition Fast fish-exception bug - #164
Merged
Conversation
Add a new fast_abstentions field (list of food categories to abstain
from, e.g. ['meat', 'fish', 'dairy', 'eggs']) derived from fast_level
and fast_exception -- a simpler alternative to fast_exception_desc's
traditional "X is allowed" phrasing for readers unfamiliar with it.
Purely additive to the API (version bumped 1.1 -> 1.2); the readings
page now shows both allowances and abstentions when there's a fast.
While building this, a user report ("our page shows a fish day for
Aug 9, 2026 but antiochian.org/goarch.org show wine-and-oil only")
led to a real fasting-logic bug: the Dormition Fast's Typikon has no
rank-based fish exception (unlike the Apostles'/Nativity fasts, where
Ch. 32-33 grants one to Vigil-rank feasts) -- it's strict throughout
except for one dated exception, the Transfiguration itself (Aug 6).
_apply_fasting_adjustments() didn't enforce that, so any Dormition
Fast row carrying a hand-baked rich fast_exception (regardless of its
own feast_level) stayed that way. This affected St Herman of Alaska's
Vigil-rank feast (Aug 9) and, caught for free by the same general
rule, the previously-unnoticed Leavetaking of the Transfiguration
(Aug 13). Fixed with a cap in the Dormition Fast case (mirroring the
existing Apostles'/Nativity downgrade pattern) rather than editing
the affected rows' data -- Herman's Vigil rank is real and un-touched;
only the wrong assumption that rank alone grants fish is corrected.
A separate, unrelated Greek-tradition data error on the same Aug 9
row (fast_exception baked onto a row with feast_level=0, no feast at
all to justify it) is fixed directly in fixtures/calendarium.json,
since that value reflected no underlying fact worth preserving.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hf6j2xXQXywHVh3HAVRxB3
…ontent to flake The feed view is wrapped in cache_page (calendarium/api_urls.py), backed by a real FileBasedCache outside local dev -- local_settings.py's DummyCache override is gitignored and never present in CI. Django's TestCase only rolls back the database between tests, not this cache, so an earlier test in FeedTest hitting the same URL at real wall-clock time (test_links, test_links_greek, etc.) would poison the cache for whichever test ran later and requested it -- including test_translation_changes_passage_content's @freeze_time request, which would silently get served that stale, non-frozen body instead of content reflecting its own frozen date. This is why the failure showed up depending on what day CI happened to run, unrelated to any code change. Clear the cache in FeedTest.setUp() so every test in the class starts clean regardless of execution order. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hf6j2xXQXywHVh3HAVRxB3
The previous run got stuck in a corrupted "queued" state during a GitHub Actions infra outage (Service Unavailable errors resolving action download info); this branch's concurrency group cancels the stale run and starts a clean one. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hf6j2xXQXywHVh3HAVRxB3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fast_abstentionsfield (e.g.['meat', 'fish', 'dairy', 'eggs']) derived fromfast_level/fast_exception, as a simpler alternative tofast_exception_desc's traditional "X is allowed" phrasing for readers unfamiliar with it. Purely additive to the API; version bumped1.1→1.2. The readings page now shows both allowances and abstentions when there's a fast._apply_fasting_adjustments()didn't enforce that — so a hand-baked richfast_exceptionon a Dormition Fast row stuck regardless of its ownfeast_level. Fixed with a cap in the Dormition Fast case (mirroring the existing Apostles'/Nativity downgrade pattern), not by editing the affected saint's data — St Herman of Alaska's Vigil rank is real and untouched; only the wrong assumption that rank alone grants fish during this particular fast is corrected. Caught a second, previously-unnoticed instance of the same mistake for free: the Leavetaking of the Transfiguration (Aug 13).fast_exceptionbaked onto a row withfeast_level=0, no feast at all) is fixed directly infixtures/calendarium.json.Test plan
docker compose run --rm tests): 140 tests, only the pre-existing unrelatedtest_translation_changes_passage_contentflake (confirmed present on a cleanmainbaseline before this branch).curl /api/gregorian/...) thatfast_abstentionsis present and correct.🤖 Generated with Claude Code
https://claude.ai/code/session_01Hf6j2xXQXywHVh3HAVRxB3