aboutsummaryrefslogtreecommitdiff
path: root/test/cli.t
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-17 15:24:27 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-17 15:24:27 +0200
commitcba04b3033f23b5c2515c9e648f2b83344716224 (patch)
tree5f76a73fd2889bc396cbaa0034b347b8a82a696d /test/cli.t
parent947cadfab527829f8e42a896339a0fa6c2e81ad9 (diff)
downloadcolitur-cba04b3033f23b5c2515c9e648f2b83344716224.tar.gz
colitur-cba04b3033f23b5c2515c9e648f2b83344716224.zip
feat(cli): colitur readings, one line per day
The lectionary has been resolvable since Task 4 but invisible from the command line: `colitur day` prints no citations, so the branch's whole deliverable could only be seen through the test suite. A separate command rather than extra columns on `day`, which is where the plan pointed. Its instruction was to append the Epistle and Gospel to each row "matching the existing column style", and that turns out not to be possible: a citation contains spaces and commas ("Ezech 34:11-16", "Ecclus 51:1-8, 12") while a day row is space-separated with a variable-length +slug commemoration tail, so appending them leaves the row unsplittable -- no awk or cut field number recovers where the Epistle ends. That is the opposite of what the row is shaped for. So `day` keeps its format byte-identical, asserted directly in cli.t rather than left implicit, and the citations get their own row with " | "-delimited fields, safe for values containing spaces. Both formats are a stopgap and say so in the source: the design calls for one schema rendered through a logic-less template engine, and two ad-hoc formats are easier to retire later than one overloaded format whose parsing rules nobody wrote down. The year walk is now shared. day_report and readings_report differ only in how a day is printed, and the two-liturgical-year indexing -- with its own reasoning about civil-versus-liturgical spans -- is exactly the part that must not be duplicated and drift. "-" for an absent part, though no EF day can currently print one: layer 2 asserts exactly one First and one Gospel on every day of every year 1583-9999. The CLI still does not assume a guarantee the kernel makes about data rather than about types. cli.t gains the four chain-step cases test_golden.ml pins against the scans, so the CLI path is checked to agree with the library path, plus the 2 January line, which reads the Circumcision's Mass under the Missal's own ferial rubric (scan1:6523-6526) and not RG 17(a). Verified the cram tests actually run and have teeth: corrupting one expectation produces a diff and exits 1. CLAUDE.md: state, test count (369, 370 with the sweep), the readings command and why it is separate, and What's next -- the lectionary landed early rather than inside Plan 4, so what remains there is OF's own lectionary, not the mechanism. Chants stay deliberately unbuilt, and Validate now rejects any part outside First/Gospel.
Diffstat (limited to 'test/cli.t')
-rw-r--r--test/cli.t74
1 files changed, 73 insertions, 1 deletions
diff --git a/test/cli.t b/test/cli.t
index 5a646a4..8de4591 100644
--- a/test/cli.t
+++ b/test/cli.t
@@ -17,7 +17,7 @@ A year outside the supported domain is rejected (exit 2):
No/garbage arguments give a usage error (exit 2):
$ colitur
- colitur: usage: colitur easter <year> | colitur temporal <year> | colitur day <year>
+ colitur: usage: colitur easter <year> | colitur temporal <year> | colitur day <year> | colitur readings <year>
[2]
The EF temporal cycle for a year, one line per day:
@@ -119,3 +119,75 @@ A year outside the supported domain is rejected (exit 2):
$ colitur day 1000
colitur: year 1000 out of range 1583..9999
[2]
+
+The reading citations for a year, one line per day: date, the observed day's
+slug, then the Epistle and the Gospel, " | "-delimited.
+
+A SEPARATE command rather than extra columns on `colitur day`, for a
+mechanical reason: a citation contains spaces and commas ("Ezech 34:11-16",
+"Ecclus 51:1-8, 12"), while a `day` row is space-separated with a
+variable-length "+slug" commemoration tail, so appending them there would
+leave the row unsplittable by field number. `day`'s own format is therefore
+byte-identical to what it was before readings existed -- asserted directly,
+below.
+
+ $ colitur readings 2026 | head -3
+ 2026-01-01 ef-circumcision | Titus 2:11-15 | Luke 2:21
+ 2026-01-02 ef-christmas-1-friday | Titus 2:11-15 | Luke 2:21
+ 2026-01-03 ef-christmas-1-saturday | Gal 4:1-7 | Luke 2:33-40
+
+ $ colitur readings 2026 | wc -l
+ 365
+
+2 January reads the Circumcision's own Mass, not its own: the Missal's
+Mass-propers rubric printed under the Sanctissimi Nominis Iesu heading --
+"Diebus ferialibus a 2 ad 5 ianuarii Missa dicitur ut die 1 ianuarii, cum
+Gloria et praefatione de Nativitate, sine Credo et Communicantes proprio"
+(docs/research/scan1.txt:6523-6526, corroborated scan2.txt:7216). Note this
+is NOT RG 17(a), which fixes only WHEN the Holy Name is kept; the two are
+different rules sharing a date window. Hence the identical citation on the
+1st and the 2nd above, which is correct and not a duplicated row.
+
+One line per step of the reading-resolution chain, the same four cases
+test_golden.ml pins against the photographic scans (each literal there was
+read out of the Missal before being compared with colitur -- these assert
+that the CLI path agrees with the library path, nothing more):
+
+ $ colitur readings 2038 | grep '^2038-03-08 '
+ 2038-03-08 john-of-god | Ecclus 31:8-11 | Matt 22:34-46
+
+ $ colitur readings 2026 | grep '^2026-02-23 '
+ 2026-02-23 ef-lent-1-monday | Ezech 34:11-16 | Matt 25:31-46
+
+ $ colitur readings 2025 | grep '^2025-12-01 '
+ 2025-12-01 ef-advent-1-monday | Rom 13:11-14 | Luke 21:25-33
+
+ $ colitur readings 2038 | grep '^2038-03-06 '
+ 2038-03-06 sts-felicitas-perpetua | Ecclus 51:1-8, 12 | Matt 13:44-52
+
+The Advent line above is the ferial resumption (chain step 3) and is the one
+worth reading twice: 1 December 2025 is the Monday after Advent I, and
+Advent's ferias -- unlike Lent's -- have no Mass of their own, so the
+citation shown IS Advent I Sunday's ("ad Romanos. Rom. 13, 11-14" /
+"dum Lucam. Luc. 21, 25-33", scan1.txt:4878 + 4912). A regression that
+stopped walking back would change this line and nothing else.
+
+Every day of the year carries both parts -- no "-" anywhere. This is the CLI
+view of the invariant Validate asserts over the whole 1583..9999 domain
+("citations" / "citations-unresolved"), so it is a spot-check of one year
+rather than the guarantee itself:
+
+ $ colitur readings 2026 | grep -c ' | - \| | -$'
+ 0
+ [1]
+
+`colitur day`'s own format is unaffected by any of the above:
+
+ $ colitur day 2026 | head -1
+ 2026-01-01 thursday christmastide - ef-circumcision class-1 white
+
+A year outside the supported domain is rejected (exit 2):
+
+ $ colitur readings 1000
+ colitur: year 1000 out of range 1583..9999
+ [2]