summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-12 17:13:06 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-12 17:13:06 +0200
commita2654a1e4d8987a251bcefbad2b0f0b867a6c6e6 (patch)
tree39360eccd3fa8ee5379fc46276d1e0ef0e6ff2b5 /tools
parente19adb9c7ea369cafe76e7eff50e9248a4a954d0 (diff)
parente5b368dec8fdc9ab983ee0f1dee69c37883cbe12 (diff)
downloadcolitur-a2654a1e4d8987a251bcefbad2b0f0b867a6c6e6.tar.gz
colitur-a2654a1e4d8987a251bcefbad2b0f0b867a6c6e6.zip
Merge branch 'ef-rg16a': RG 16(a), RG 111(b), RG 113, and commemoration identity
Closes the largest known-wrong-output item on record (RG 16(a): a Feast of the Lord occurring on a II-class Sunday leaves the Sunday uncommemorated -- 5996 wrong days over 1583-9999) together with RG 111(b)'s rank floor on the day it holds, and gives the oracle layer the ability to compare commemoration identity rather than only presence and count. Also corrects a methodological defect that had produced wrong rulings in both this project and its sibling: docs/research/ holds an electronic transcription alongside two photographic scans, and the transcription silently drops commemoration lines -- seven across the year. Reasoning from its silence had convicted the oracle wrongly on 14 August and ruled a genuine 9 August commemoration spurious. The scans are the primary source; the rule is now recorded at the top of the register. RG 113 replaces an alphabetical same-rank tie-break that had no rubrical warrant. A bare Commemoratio has no row in RG 91's table at all, so band no longer hands one the entry of a III-class universal feast: 4451 days, all four reordered pairs verified against a photographic scan, zero observed-day changes.
Diffstat (limited to 'tools')
-rw-r--r--tools/extract_missalemeum_oracle.py21
1 files changed, 18 insertions, 3 deletions
diff --git a/tools/extract_missalemeum_oracle.py b/tools/extract_missalemeum_oracle.py
index 044aa54..a010b52 100644
--- a/tools/extract_missalemeum_oracle.py
+++ b/tools/extract_missalemeum_oracle.py
@@ -18,7 +18,7 @@
# exists for every day.
#
# One line per day, pipe-separated:
-# date|rank|colors|title|tempora|commemorations|displaced|n_masses
+# date|rank|colors|title|tempora|commemorations|displaced|n_masses|commemoration_ids
#
# - rank/colors/title/tempora/commemorations/displaced are info.rank,
# info.colors (sorted, concatenated, e.g. "pv"), info.title, info.tempora
@@ -31,6 +31,17 @@
# colors/tempora/commemorations/displaced are IDENTICAL across every Mass
# of the same day for all 730 days -- checked below, not assumed; see the
# task report for why entry[0] loses nothing).
+# - commemoration_ids (Task B, branch ef-rg16a) is the ";"-joined info.
+# commemorations[*].id, index-aligned with the commemorations field ("-"
+# for an empty list, same convention) -- e.g. "sancti:01-05:4:r". Added so
+# test_oracle.ml's identity comparison has a second, independent signal
+# beyond the title text (the id encodes the commemorated saint's own rank
+# and colour too, verified across the whole fixture to always carry the
+# SAME calendar date as the day itself -- a commemoration's own natural
+# fixed date, by construction, since only a saint impeded on their own day
+# is ever commemorated there). Never parsed for its date component by this
+# fixture or the comparator (info.rank/colors already give the day's own
+# values); kept opaque and compared as a plain string.
# - Spaces in tempora are turned to "_" (matching the "no field has an
# internal space" convention test/fixtures/lectio-ef-2005-2050.txt already
# uses, so this fixture can be read the same simple way -- split on '|',
@@ -62,8 +73,9 @@ def main():
if first[k] != o[k]:
print(f"WARNING: {date} masses disagree on {k}: {first[k]!r} vs {o[k]!r}", file=sys.stderr)
comm_titles = [c["title"] for c in first["commemorations"]]
+ comm_ids = [c["id"] for c in first["commemorations"]]
disp_titles = [d["title"] for d in first["displaced"]]
- for t in [first["title"]] + comm_titles + disp_titles:
+ for t in [first["title"]] + comm_titles + comm_ids + disp_titles:
if "|" in t or ";" in t:
print(f"ERROR: {date}: field {t!r} contains a delimiter this fixture uses", file=sys.stderr)
return 1
@@ -71,7 +83,10 @@ def main():
tempora = (first["tempora"] or "-").replace(" ", "_")
comms = ";".join(comm_titles) or "-"
disp = ";".join(disp_titles) or "-"
- rows.append(f"{date}|{first['rank']}|{colors}|{first['title']}|{tempora}|{comms}|{disp}|{len(data)}")
+ ids = ";".join(comm_ids) or "-"
+ rows.append(
+ f"{date}|{first['rank']}|{colors}|{first['title']}|{tempora}|{comms}|{disp}|{len(data)}|{ids}"
+ )
if len(rows) != 730:
print(f"ERROR: expected 730 days, got {len(rows)}", file=sys.stderr)