Closes the tabled "Easter's own octave" mechanism gap. resolveDay only ever checked yesterday/tomorrow for an inbound transfer - a single hop - so anything impeded in Holy Week just vanished rather than reappearing after the Octave. Live-verified the real behavior first (2033 proof year): a candidate skips the whole privileged span and keeps walking forward, FIFO by native date, until it lands; a transferred-in candidate never gets the "still gets a nod" commemoration a native occurrence of the same rank would along the way (confirmed with the Annunciation, zero commemoration anywhere in the span). Also fixed Low Sunday itself, which needed the same privileged-sunday treatment as Easter Day. Built resolveForwardTransferLanding: a bounded queue simulation that reuses applyIncomingTransfer unchanged per hop - its existing privileged-feria-major no-op was already the right single-hop refusal, it just needed a real cascade around it instead of a dead end. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017XMSokiTD2Qc5vPP2YQu3Q
This commit is contained in:
@@ -107,3 +107,96 @@ describe('transfer mechanism (resolveDay integration)', () => {
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
// A forward transfer can chain through more than one impeded day in a
|
||||
// row — the whole Holy Week/Easter Day/Easter Octave/Low Sunday span
|
||||
// (2026-09-01: found real, live-verified precedence bugs in exactly this
|
||||
// area, then built the actual multi-hop mechanism per direct
|
||||
// instruction). `resolveForwardTransferLanding` in calendar/index.ts
|
||||
// walks up to `MAX_FORWARD_TRANSFER_LOOKBACK_DAYS` days back to find
|
||||
// where a still-unlanded candidate actually lands, in strict native-date
|
||||
// (FIFO) order against every other pending candidate.
|
||||
describe('multi-hop forward transfer through Holy Week/the Easter Octave', () => {
|
||||
it('2033: St. Leo I (native Easter Monday, Duplex) chains all the way past the whole privileged span to land on Easter+8 — verified against the real reference engine', () => {
|
||||
// Easter 2033 is Apr 17. Live-verified against the reference engine
|
||||
// (Monastic Tridentinum 1617, 2026-09-01): Leo transfers off Apr 11
|
||||
// (Monday of Holy Week) with no commemoration anywhere in Holy Week,
|
||||
// Easter Day, the Octave, or Low Sunday (Apr 24), landing outright on
|
||||
// Apr 27 there (Apr 25/26 already spoken for by St. Mark and Ss.
|
||||
// Cletus & Marcellinus in the reference's own calendar). vu's own
|
||||
// calendar differs on Apr 25-27 (different saints assigned), so this
|
||||
// asserts the *mechanism* — Leo reaching a day past the whole span in
|
||||
// the right relative order — not the exact reference-engine landing
|
||||
// day, which depends on which calendar is in play.
|
||||
const holyMonday = resolveDay('2033-04-11');
|
||||
expect(holyMonday.winner).toEqual({ kind: 'temporal', id: 'palm-sunday' });
|
||||
expect(holyMonday.commemorations).toEqual([]);
|
||||
expect(holyMonday.transferredAway?.candidate.id).toBe('st-leo-i');
|
||||
|
||||
for (const impededDate of ['2033-04-13', '2033-04-17', '2033-04-21', '2033-04-24']) {
|
||||
const day = resolveDay(impededDate);
|
||||
expect(day.commemorations.some((c) => c.kind === 'sanctoral' && c.id === 'st-leo-i')).toBe(false);
|
||||
}
|
||||
|
||||
// Lands the first day past the whole span not already spoken for by
|
||||
// vu's own calendar (Apr 25 = St. Mark, native and unaffected).
|
||||
const landing = resolveDay('2033-04-25');
|
||||
expect(landing.winner).toEqual({
|
||||
kind: 'sanctoral',
|
||||
id: 'st-mark',
|
||||
name: 'St. Mark, Evangelist',
|
||||
nameLa: 'Sanctus Marcus, Evangelista',
|
||||
rank: 'duplex-2-classis',
|
||||
});
|
||||
expect(landing.commemorations).toEqual([
|
||||
{
|
||||
kind: 'sanctoral',
|
||||
id: 'st-leo-i',
|
||||
name: 'St. Leo I, Pope, Confessor and Doctor of the Church',
|
||||
nameLa: 'Sanctus Leo I, Papa, Confessor et Ecclesiæ Doctor',
|
||||
rank: 'duplex',
|
||||
transferredFrom: '2033-04-11',
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it('2033: three simultaneously-pending candidates (Leo, Hermenegild, Ss. Tiburtius/Valerian/Maximus) land in strict native-date order, none skipping ahead', () => {
|
||||
const leo = resolveDay('2033-04-25').commemorations.find((c) => c.kind === 'sanctoral' && c.id === 'st-leo-i');
|
||||
const hermenegild = resolveDay('2033-04-26').commemorations.find((c) => c.kind === 'sanctoral' && c.id === 'st-hermenegild');
|
||||
const tiburtius = resolveDay('2033-04-27').commemorations.find(
|
||||
(c) => c.kind === 'sanctoral' && c.id === 'ss-tiburtius-valerian-and-maximus',
|
||||
);
|
||||
expect(leo?.kind === 'sanctoral' ? leo.transferredFrom : undefined).toBe('2033-04-11');
|
||||
expect(hermenegild?.kind === 'sanctoral' ? hermenegild.transferredFrom : undefined).toBe('2033-04-13');
|
||||
expect(tiburtius?.kind === 'sanctoral' ? tiburtius.transferredFrom : undefined).toBe('2033-04-14');
|
||||
});
|
||||
|
||||
it("2035: the Annunciation (native Easter Sunday itself, Duplex I. classis) transfers past the whole span with zero commemoration anywhere in it — matching the real reference engine's own behavior, not just a native-date-order queue effect", () => {
|
||||
// Easter 2035 is Mar 25 -- the Annunciation's own fixed date. Live-
|
||||
// verified 2026-09-01: the real Monastic 1617 engine shows her
|
||||
// transferring off Easter Day with no commemoration anywhere in Holy
|
||||
// Week/the Octave/Low Sunday (Apr 1 that year), unlike a same-ranked
|
||||
// *native* occurrence there (e.g. St. Mark, Duplex II. classis,
|
||||
// commemorated when native within some other year's Octave) --
|
||||
// confirming a transferred-in candidate never gets the "duplex-majus+
|
||||
// still gets a nod" treatment on these days, only a native one does.
|
||||
const easterSunday = resolveDay('2035-03-25');
|
||||
expect(easterSunday.winner).toEqual({ kind: 'temporal', id: 'easter-sunday' });
|
||||
expect(easterSunday.transferredAway?.candidate.id).toBe('annunciation');
|
||||
|
||||
for (const impededDate of ['2035-03-26', '2035-03-29', '2035-04-01']) {
|
||||
const day = resolveDay(impededDate);
|
||||
expect(day.commemorations.some((c) => c.kind === 'sanctoral' && c.id === 'annunciation')).toBe(false);
|
||||
}
|
||||
|
||||
const landing = resolveDay('2035-04-04');
|
||||
expect(landing.winner).toEqual({
|
||||
kind: 'sanctoral',
|
||||
id: 'annunciation',
|
||||
name: 'The Annunciation of the Blessed Virgin Mary',
|
||||
nameLa: 'Annuntiatio Beatæ Mariæ Virginis',
|
||||
rank: 'duplex-1-classis',
|
||||
transferredFrom: '2035-03-25',
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user