<feed xmlns='http://www.w3.org/2005/Atom'>
<title>colitur.git/test/cli.t, branch v0.9.0</title>
<subtitle>deterministic OCaml engine to compute and validate liturgical calendars for multiple rites, template-driven output to year 9999</subtitle>
<id>https://git.labunix.xyz/colitur.git/atom?h=v0.9.0</id>
<link rel='self' href='https://git.labunix.xyz/colitur.git/atom?h=v0.9.0'/>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/'/>
<updated>2026-08-20T20:11:17Z</updated>
<entry>
<title>fix: audit findings — parser strictness, name ambiguity, and errors</title>
<updated>2026-08-20T20:11:17Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-20T20:11:17Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/commit/?id=1988d350242b47aa52aa07904c495e7e2c0eba82'/>
<id>urn:sha1:1988d350242b47aa52aa07904c495e7e2c0eba82</id>
<content type='text'>
Found by auditing the shipped program rather than the diff.

The parser accepted OCaml integer-literal syntax, so "Luke 1_1:5" read as
chapter ELEVEN and "+5" as 5 -- a typo silently becoming a different
chapter, reachable through any user overlay. Numbers are now plain digits
and positive, and a descending range is rejected: 1:20-10 is always a
transcription error. No shipped citation changed.

FOUR PAIRS OF DIFFERENT BOOKS SHARED A FULL TITLE. 1 and 2 Corinthians
both rendered "Epistola ad Corinthios", as did Thessalonians, Timothy and
Peter -- 108 citations in 2027 alone that a reader cannot resolve to a
book. This is the Kings defect fixed earlier and not generalised. The
titles now carry their volume numeral, marked CONSTRUCTED, and a test
asserts no two books share a name -- while allowing the case where two
ids ARE the same book under different numbering, which a tradition
relates.

Spec section 8.5 is now delivered rather than merely recorded. Shipped
styles did not re-parse their own output: 32 of 52 Latin abbreviations
and 49 of 52 full titles failed, so a citation copied from colitur's own
output into an overlay was passed through untouched and printed in the
wrong language, silently. Every shipped name is registered as a spelling
and split_book learned multi-word titles by longest-token match. Now 0
of 52 fail beyond the same-book aliases.

Overlay errors were written for a compiler author: they named an OCaml
source file the reader does not have and buried the useful token. The
existing five-path rewriter is replaced by a generic one, applied to
every load path rather than one, so "rank: is not one of the allowed
values (at Class9)" replaces the raw Of_sexp_error dump.

Also: the new-overlay scaffold documented citations and layer without
showing them, and its comment implied the wrong nesting -- the single
easiest thing to get wrong; error messages echoed whole file lines,
copying an unrelated file's contents into stderr when a flag pointed at
one; and config --show validated partway down its table, exiting 2 after
writing five rows to stdout.
</content>
</entry>
<entry>
<title>fix(citation): close the final review's blocking findings</title>
<updated>2026-08-20T17:03:02Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-20T17:03:02Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/commit/?id=1da70dc7ac03fe33fb92b172a0e26932764170d6'/>
<id>urn:sha1:1da70dc7ac03fe33fb92b172a0e26932764170d6</id>
<content type='text'>
The branch was RED and reported green. `dune test` exited 1: test/cli.t
pinned the pre-fix output `kings_1 19:3-8`, which the previous commit had
already fixed to `1 Reg 19:3-8`. The gate command piped dune through
`tail`, so it reported tail's exit status, and cram prints its diff
BEFORE the alcotest summary, so the two lines shown were the passing
ones. Verify with `dune test; echo $?`, never through a pipe.

A style file's own `book` key was unreachable. sigla_book resolved
against a hardcoded "abbr" and the result was applied unconditionally,
so the documented `[sigla] book = full` could never win. Render gains
book_string, and the style's own value is now the default that a flag or
config overrides. The unit test pinned style_of_fields correctly while
the wiring defeated it.

`lang --check` filtered the reference set to the celebration prefix, so
a file with no [bible] section at all reported a clean bill of health --
contradicting both the reason the keys change was made and lang.ml's own
comment. It now reports missing book names too.

The token test missed a FOURTH citation-bearing file: adjustments.sexp
writes citations as `Set_citation`, not `(reference ...)`. Its 16
citations all parse, so nothing was broken, but nothing was checking.
The first attempt at this fix read the file and extracted NOTHING -- the
marker stopped before the opening quote, so every payload was the part
label -- which is recorded in the code rather than left as a trap.

Also: colitur-config(5) claimed a trailing period the data does not
carry, and two la.ini scan quotes silently corrected OCR damage
("Ionae 3, I - I O", "Epistolse") while presenting themselves as
verbatim. Both are now marked as corrections.
</content>
</entry>
<entry>
<title>feat(lang): Latin and English book names, and the shipped sigla styles</title>
<updated>2026-08-20T15:14:42Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-20T15:14:42Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/commit/?id=d68feb04f71c3dea3b59726e2ffca225d99eaa35'/>
<id>urn:sha1:d68feb04f71c3dea3b59726e2ffca225d99eaa35</id>
<content type='text'>
la.ini and en.ini both gain [sigla] (the current Vulgate/Latin punctuation
convention, byte-identical to Render.default_style) and [bible] (a .full
and .abbr row for every id in Book.all -- 45 cited ids plus the 7 tradition
targets, 52 total). Shipping [sigla] changes no output, asserted by the
full test run. Shipping [bible] does change rendered book names, which is
the point.

la.ini's titles are sourced from docs/research/scan1.txt/scan2.txt (the
1962 Missal scans), each row citing the line its incipit pattern was read
from. Six pairs (kings_3/4, corinthians_1/2, thessalonians_1/2,
timothy_1/2, peter_1/2) share one Missal incipit and differ only in the
sourced .abbr, matching what the primary text itself does. Three ids
(proverbs, song_of_songs, ecclesiasticus) and the seven tradition targets
are marked UNSOURCED and fall back to the data's own spelling, per this
project's central rule against inventing a Latin title.

Re-running the task's own sourcing note against the scans, counting every
hit rather than eyeballing a frequency-sorted list, found nine of its
NOT-sourced verdicts were undercounted (a single clean hit, buried under
higher-frequency matches): Galatians, Colossians, both Thessalonians, both
Peter, Malachi, Numbers, Jonas, Osee and Esdras all have a clean incipit
in the scans and are sourced here. The note's other three verdicts stand,
confirmed independently. Ecclesiasticus is not simply unfound: this Missal
reuses Wisdom's own Lectio libri Sapientiae incipit for Ecclesiasticus
readings too (both were anciently classed as one Sapiential group), so
using it for Ecclesiasticus would misidentify the book, not merely
abbreviate it -- recorded in that row's own comment.

en.ini's [bible] is filled in full, not left partial the way [celebration]
is: without it, a Vulgate-numbered id would fall through the [meta]
fallback chain to la.ini's Latin name, not merely a less complete English
one. Traditional Douay-Rheims names for the Vulgate ids (3 Kings, Osee,
Ecclesiasticus, Isaias, Apocalypse), modern names for the seven tradition
targets, since --sigla-tradition modern is the reader asking for modern
numbering.

test_lang_coverage.ml gains test_every_book_named, asserting every
Book.all id has both forms in la.ini -- the check that catches a forgotten
tradition target, since nothing else in the suite ever names them.

Shipping real book names changes 11 golden template renders (Render/golden)
and several test/cli.t examples that used to demonstrate the pre-Task-10
default-spelling fallback; both are updated to the new, correct output,
each line checked against a fresh render before promoting.
</content>
</entry>
<entry>
<title>feat(render): citations render through Sigla at both call sites</title>
<updated>2026-08-20T14:43:04Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-20T14:43:04Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/commit/?id=27606c42b7506ab7ffc7f1bd32d4d4a72c6400c8'/>
<id>urn:sha1:27606c42b7506ab7ffc7f1bd32d4d4a72c6400c8</id>
<content type='text'>
View.citation_ref and readings' part_ref are the only two places a
citation reaches output; every emitter goes through View.

--raw passes Sigla.verbatim rather than a style built over Lang.raw:
an identity name table would still reformat punctuation and renumber.

Loosen reject_sigla_for: --sigla-style/--sigla-book/--sigla-tradition
now actually render on readings/table/render/emit/publish (each
builds its own Sigla.t via the new load_sigla), and stay refused only
on commands that render no citation (day, easter, temporal, ...).

names_of degrades a Lang.bible miss to Book.default_spelling rather
than printing the lookup key itself ("luke.abbr"); pinned in cli.t
against a language file with no [bible] section at all, independent
of la.ini/en.ini's own eventual [bible] section.

Regenerate the 11 golden templates for 2027: every changed line is
one canonical citation replacing a stored variant, verified against
the full readings 2027 diff (raw vs default) cell by cell -- 86
distinct (raw, rendered) pairs account for the entire diff across all
11 files, with zero unexplained residue. Two families: the seven
duplicate book spellings collapsing onto one canonical form (Isa./Isa,
3 Kgs./3 Kings, ...), and citations reconstructed from parsed
structure dropping stray punctuation the parser already treats as
noise (a trailing period or semicolon, a comma chapter/verse
separator, an elided inherited chapter) -- each of the latter already
named and tested in test_citation.ml's parse_suite before this task.
</content>
</entry>
<entry>
<title>feat(config): sigla_style, sigla_book and sigla_tradition</title>
<updated>2026-08-20T14:19:25Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-20T14:19:25Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/commit/?id=87b155b913cea7f5c55b5a2391aff7819ba541a6'/>
<id>urn:sha1:87b155b913cea7f5c55b5a2391aff7819ba541a6</id>
<content type='text'>
Same flag &gt; config &gt; default precedence as --lang, and each reported by
config --show with its source, so an override is visible rather than
mysterious.

A language file's [sigla] section IS a style; a config key SELECTS one and
may override settings within it -- the two are not a duplicate setting.
</content>
</entry>
<entry>
<title>fix(naming): the rite prints its display name, not the internal id ef</title>
<updated>2026-08-20T08:39:47Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-20T08:39:47Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/commit/?id=1935f40c156563c134f87093bf6ec8da1cf4fc46'/>
<id>urn:sha1:1935f40c156563c134f87093bf6ec8da1cf4fc46</id>
<content type='text'>
The booklet's title page and running header read "Ordo 2027 . ef" --
an internal identifier reaching a reader, the same defect class the
sanctoral/temporal slugs were already fixed for.

lang/la.ini and lang/en.ini each gain a [rite] section mapping the
rite id to a reader-facing name, sourced from the Missal's own title
page (docs/research/LT.txt:6 "MISSALE ROMANUM", :15 "EDITIO TYPICA")
plus the 1962 dating this project uses throughout (rules-register.md,
CLAUDE.md) -- both cited in the ini comments, marked PATTERN since the
phrase combines two title-page elements rather than quoting one
verbatim heading.

Lang.t gains a rite table/lookup (same total, miss-echoes-the-key
contract as every other lookup here); View.of_days exposes rite_name
alongside the existing rite field, which stays the stable key exactly
as slug is kept beside name. Every shipped template that printed
{{rite}} now prints {{rite_name}} instead.

test_lang_coverage.ml gains a coverage assertion over every rite id
the engine can emit -- one today -- so a second rite module (OF)
landing without a matching [rite] entry fails loudly instead of
printing its own bare id.

Goldens regenerated through the Test_view.view_of path
test_render_golden.ml itself uses (English with a Latin fallback),
not the CLI (whose --lang default is plain Latin and would have
pinned output the tests never produce). test/cli.t's own JSON prefix
assertion updated to match: rite_name is a real new key in that
generic view dump, sitting right after rite.
</content>
</entry>
<entry>
<title>fix(cli): close the flavour-list call sites Typst's addition exposed</title>
<updated>2026-08-20T08:11:48Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-20T08:11:48Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/commit/?id=cd46163fa347bbc49bf8008d70d408f62feabda5'/>
<id>urn:sha1:cd46163fa347bbc49bf8008d70d408f62feabda5</id>
<content type='text'>
The task this branch of work set out to test was whether the template
engine is genuinely flavour-agnostic outside lib/render/escape.ml. It
is not, quite: bin/main.ml's own --flavour error/help text and both
man pages hand-typed the flavour list and its count ("the six
flavours") as literal prose, so adding Typst as a seventh left three
places silently wrong (an incomplete flavour list in two error
messages, and "six" where the true count is now seven) until this
commit.

bin/main.ml's two error messages (unknown --flavour value, and cannot
infer a flavour from an extension) now build their flavour list by
walking Escape.all/to_string instead of a literal string, so the next
flavour added will not reintroduce the same drift; the static --help
body text and colitur(1)/colitur-templates(5) still name flavours and
their count by hand; there was no equivalent gain available for
prose formatted this specifically, so those were updated by hand
instead, along with colitur-templates(5)'s FLAVOURS section, which
gained typst's own subsection alongside latex/groff/html/xml/ics/none.

test/cli.t's two pinned error-text assertions are updated to match,
and gained a new case: .typ inferred from extension, and a real
shipped citation's hyphen surviving --flavour typst's own escaping
live, the same shape the 2035 Ss. Petri et Pauli case already proves
for latex's ampersand just above it.
</content>
</entry>
<entry>
<title>feat(cli): --lang and --raw, colitur lang, colitur config</title>
<updated>2026-08-20T07:28:08Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-20T07:28:08Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/commit/?id=0f94c388880972f8e665ed01a6b38190bcc61499'/>
<id>urn:sha1:0f94c388880972f8e665ed01a6b38190bcc61499</id>
<content type='text'>
Names are Latin by default now; --raw restores the old byte-exact output,
verified against a pre-branch binary built from a clean HEAD checkout, not
merely asserted. day and readings gain a trailing display-name field
(day's own name suffix, readings' own " | name" suffix) rather than a
substitution in the slug's existing position: a name contains spaces and
would otherwise break the space-separated columns, the same reasoning that
already keeps readings a separate command. The field is present only when
it differs from the slug already shown, which is a direct consequence of
Lang.raw being the identity table (no lookup ever misses), not a special
case threaded through day_line/readings_line -- under --raw, or any
language with no entry for a given day, the trailing field is simply
absent, byte for byte what this project printed before naming existed.

An unknown language is an error naming what is available, never a silent
fallback to Latin: a booklet quietly printed in the wrong language is worse
than one that refuses to print. A declared fallback still chains, so a
partial translation shows its fallback language rather than slugs.
lang_dir mirrors data_dir's probe order exactly -- installed prefix, then
build tree -- because an installed binary that finds calendar data but no
language files is the failure this would otherwise ship.

Config (lang/overlay/template/format) is loaded once, unconditionally,
before dispatch: a config file that exists but fails to parse is fatal on
every command, not only the ones that consult it, because a config the
user wrote and colitur cannot honour is not something to silently carry on
past. An unknown key or unknown section is reported and ignored, worded
differently so a misspelled section reads differently from a misspelled
key inside a recognised one. overlay's config default applies only when
zero --overlay flags were given, never merged with a partial CLI list, so
precedence stays flag &gt; config &gt; default in one direction throughout.

colitur lang --list/--dump/--check and colitur config --show are what make
"anyone can write a language file" true rather than merely permitted, the
same pattern the overlay system already established with new-overlay and
check. --check reports what is missing AND rejects an unknown slug (exit
1), because a key matching nothing is silently dead and its author would
otherwise never learn why their own name does not appear. --dump emits
sections in a fixed order (Lang.keys' own global sort keeps every
section's keys contiguous), so two dumps of the same table are
byte-identical. config --show resolves through the same Config.resolve
every other command uses -- deliberately no separate provenance function,
so the two cannot disagree -- and previews exactly what flags given on the
same command line would resolve to anywhere else.

One authorized change outside this task's own file list: emit_ics.ml's
SUMMARY line was reading the unlocalised rank/colour pair ("class-1,
white") beside an already-localised name, where the JSON schema right next
to it correctly carries rank_name/colour_name ("II classis"/"albus").
Found while reviewing the published site; fixed at the source.
</content>
</entry>
<entry>
<title>feat(render): names reach the view and every emitter</title>
<updated>2026-08-19T13:29:33Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-19T13:29:33Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/commit/?id=6d367ab8e90f6e713d262a7f19fb908b28d4796a'/>
<id>urn:sha1:6d367ab8e90f6e713d262a7f19fb908b28d4796a</id>
<content type='text'>
The view's name is now the RESOLVED display string and slug is untouched,
so machine formats carry both -- a script keeps the stable key, a human
reads the name.

name is a plain string, not a lang-keyed object. That removes the
shadowing hazard outright: a dotted {{name.la}} used to fall back
WHOLESALE to the enclosing month's name.la and print Ianuarius on every
unnamed day, which is how a printed booklet came to show the month where
the feast belonged.

weekday, season, rank and colour all gain localised companions, because a
calendar in a language needs more than feast names, and templates gain a
term vocabulary so fixed strings need no template edit to translate.

Asserted over a whole year: no day renders its slug as its name.

Beyond the brief's own code sample:

- comm_value's own name is now resolved through the same lang.celebration
  table too (not only the observed day's), because Task 8's own ordo
  template interpolates a plain {{name}} inside {{#comms}} -- an Obj there
  would render silently blank. A commemoration slug without Latin
  coverage still degrades to the slug, same as everywhere else in this
  system; that is a lang/la.ini DATA gap (113 of 327 sanctoral slugs,
  measured), not a regression this task introduced.

- bin/main.ml's emit/table/publish call sites needed ~lang to compile at
  all, which is collateral from the of_days signature change, not this
  task's own file list. Rather than pass Lang.raw and ship the very
  slug-as-name defect this branch exists to fix, they load the shipped
  Latin table by the same probe order data_dir() already uses -- a
  deliberate, commented BRIDGE that Task 6 replaces wholesale with real
  --lang/--raw/config resolution. bin/dune gained colitur_naming
  accordingly.

- test/cli.t needed two related fixes to stay green: the CSV header/row
  example, and a table/LaTeX escaping demonstration that relied on the
  kernel's own English name for Sts Peter &amp; Paul -- gone from the view
  now that name resolves through lang tables only, and the Missal's own
  Latin spells the feast with et, never an ampersand. Escaping itself is
  still proved live on 2035 data in test_emit.ml.

- Both schemas gained the new day/week/top-level keys (season_name,
  weekday, rank_name, colour_name, term, weekday_headings, month_num,
  month_name), not only the name shape change; schema/colitur-v1.xsd
  verified against real emitted XML via xmllint (make check-schema).

Render/golden's 9 cases (the shipped ordo/grid templates, all six
flavours) now fail as expected: their old {{name.la}} / {{#name}}...
idiom finds nothing on a plain string. That is Tasks 8/9's own scope to
rewrite, per the plan's own pre-flight conflict scan -- not fixed here,
and not silently pinned by regenerating goldens off broken output.

495 tests run (490 + 5 new), 486 pass; the 9 failures are exactly
Render/golden's ordo/grid cases.
</content>
</entry>
<entry>
<title>fix(cli): guard publish's IO, validate --dtstamp, and list all commands</title>
<updated>2026-08-19T09:35:21Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-19T09:35:21Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/commit/?id=b084bba86fe9d394d6a5ea287161864e7695a609'/>
<id>urn:sha1:b084bba86fe9d394d6a5ea287161864e7695a609</id>
<content type='text'>
publish's own mkdir_p/write_file (unlike every other IO path on this
branch) were unguarded: an unwritable --out parent raised a bare
Unix.Unix_error(EACCES,...) and an --out naming an existing file raised
ENOTDIR, both as uncaught exceptions with a stack trace rather than the
project's one-line "colitur: ..." form. The same defect class commit
6bd741b already fixed once for template reads -- --out is user input
too. Fixed by wrapping the whole publish_report call (not each
write_file site) in one handler for Unix.Unix_error and Sys_error,
mirroring why that earlier fix guarded the whole read and not only the
open. Added a cram case using a read-only directory inside the test's
own cram sandbox, not /tmp, so a failed cleanup cannot leave an
unwritable directory behind in a shared location.

--dtstamp was the only user string reaching output unescaped and
unvalidated: "--dtstamp hello" silently emitted an invalid
"DTSTAMP:hello", and a value carrying its own CRLF injected extra lines
into every VEVENT. Fixed by rejecting anything not matching RFC 5545's
UTC form (8 digits, 'T', 6 digits, 'Z') before either emit or publish
does anything else, one line to stderr, exit 2.

usage() was byte-unchanged from before the branch and listed only the
six pre-existing commands, omitting all four commands this branch added
(emit, table, render, publish). Added them; the three cram pins of the
exact usage string are updated to match.
</content>
</entry>
</feed>
