<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lectio.git/internal/calendar/precedence_ef_test.go, branch main</title>
<subtitle>offline Catholic daily readings and liturgical calendar in Go, with CLI, TUI and web clients</subtitle>
<id>https://git.labunix.xyz/lectio.git/atom?h=main</id>
<link rel='self' href='https://git.labunix.xyz/lectio.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/lectio.git/'/>
<updated>2026-08-12T11:06:18Z</updated>
<entry>
<title>precedence_ef: a II-class privileged feria yields to a feast (defect 2)</title>
<updated>2026-08-12T11:06:18Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-12T11:06:18Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/lectio.git/commit/?id=61a2d658fea1c9a1640cb54bb203a8441bbb17a9'/>
<id>urn:sha1:61a2d658fea1c9a1640cb54bb203a8441bbb17a9</id>
<content type='text'>
precedenceEF's equal-class tie-break only distinguished "ordinary
III/IV-class feria yields" from "everything else wins" -- Sundays,
named feasts, Lent/Passiontide ferias, AND II-class privileged ferias
(the Ember days, the late-Advent 17-23 Dec ferias) were all bucketed
into the same "wins its tie" branch. RG 91 disagrees at class 2:
entry 15 (Sundays) sits ABOVE entry 16 (II-class feasts of the
universal Church), so a Sunday wins -- but entry 16 sits ABOVE entry
18 (II-class ferias, including the Ember days), so those FERIAS
yield instead, the opposite direction from a Sunday. St Matthew (21
September, II class) was losing to the September Ember Wednesday
every time the two coincided; St Thomas (21 December, II class) was
losing to an ordinary late-Advent feria the same way once the
previous commit correctly promoted those ferias to II class.

The fix distinguishes a II-class Sunday from a II-class feria using a
Sunday flag that already existed on `candidate` (used by the OF path)
but was never wired up for EF: temporal_ef.go's efCel always set
Sunday: false, even on an actual Sunday. A new efSunday helper (efCel
plus the flag) replaces the three efCel calls inside temporalEF's
Sunday branch, and computeEF now propagates td.Sunday into the day's
temporal candidate.

precedence_ef_test.go's own pre-existing witness ("at equal class, the
temporal office wins") encoded exactly the bug: a bare class-2
temporal candidate with no Sunday/season information, standing in for
"the temporal office" in general. It is rewritten into two explicit
cases (Sunday wins its tie; a privileged feria yields) plus the
existing Lent/Passiontide-vs-ordinary III/IV-class case restated
explicitly rather than left implicit.

Witness (precedence_ef_repro_test.go): TestMatthewBeatsSeptemberEmberWednesday.
Fails before this commit with:
  2016-09-21 observed = "ef-september-ember-wed" want matthew (RG 91
    entry 16 beats entry 18)
  2022-09-21 observed = "ef-september-ember-wed" want matthew (RG 91
    entry 16 beats entry 18)

With this commit, all seven named defects are fixed:
LECTIO_EF_ORACLE_STRICT=1 go test ./internal/calendar/... -run TestOracleEF
passes (0 unallow-listed rank/colour mismatches over 730 days). The
gate stays in place for this commit; a following commit removes it.
</content>
</entry>
<entry>
<title>feat(calendar): precedenceEF (1960 occurrence by class + temporal-before-sanctoral)</title>
<updated>2026-07-27T11:59:02Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-07-27T11:59:02Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/lectio.git/commit/?id=ba5b6b54819b5dbea10213138d9f210373b2c629'/>
<id>urn:sha1:ba5b6b54819b5dbea10213138d9f210373b2c629</id>
<content type='text'>
</content>
</entry>
</feed>
