<feed xmlns='http://www.w3.org/2005/Atom'>
<title>colitur.git/lib/render, branch v0.8.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.8.0</id>
<link rel='self' href='https://git.labunix.xyz/colitur.git/atom?h=v0.8.0'/>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/'/>
<updated>2026-08-20T14:43:04Z</updated>
<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(render): Roman week numbers and date spans, as data</title>
<updated>2026-08-20T09:32:24Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-20T09:32:24Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/commit/?id=e2e56ac5af290b60ea01037e58e8bc00545c021c'/>
<id>urn:sha1:e2e56ac5af290b60ea01037e58e8bc00545c021c</id>
<content type='text'>
The ordo booklet's week header repeated the month name on every week
even though the heading above already established it -- pure noise.
Replace it with a Roman week number plus the span of dates the week
covers, e.g. "Hebdomada I (Ian 1-2)", following the project's own rule
that a presentation choice is data, not code.

lang/{la,en}.ini gain a [month_abbr] section (three-letter month
abbreviations); Lang.month_abbr follows Lang.month's exact shape,
including the out-of-range and miss-returns-the-key contracts. The
coverage test now fails loudly if an abbreviation goes missing, the
same as [month] already does.

Every week object in the view gains num_roman (Roman numeral, num
stays as the arabic original -- Roman is a presentation choice, not an
engine change), first_dom/last_dom (the day-of-month of the week's
first and last IN-MONTH days, padding excluded), month_abbr (resolved
through Lang.month_abbr), and single_day (true when the week holds
exactly one in-month day). single_day is a flag, not a preformatted
span string: the engine is logic-less and cannot itself decide between
"Ian 1" and "Ian 1-2", so a template makes that call from the flag
instead -- the same "shape the data, not the template" discipline
in_month and last already follow.

Weeks are built per month with padding only at the two ends, so a
week's in-month days never cross a month boundary -- verified, not
assumed: every week always has at least one real day since no month is
shorter than a single week.

Covered by three new View tests, including a real single-day-week
witness (January 2027's own trailing week is a lone Sunday, the 31st).
</content>
</entry>
<entry>
<title>feat(templates): the ordo booklet flows continuously, not one week per page</title>
<updated>2026-08-20T09:09:18Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-20T09:09:18Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/commit/?id=c00bf135defe69eb303f4bcf32ae862f65c01178'/>
<id>urn:sha1:c00bf135defe69eb303f4bcf32ae862f65c01178</id>
<content type='text'>
One week per page filled roughly the top third of every A5 page and
cost 65 pages for a year that needed far fewer -- the original
requirement, reversed here: a full 7-day week already occupies most
of an A5 page even at reduced type, so the real saving was always in
the year's many SHORT boundary weeks (a month's first/last week is
rarely a full seven days), not in packing two full weeks together.

lib/render/view.ml gains a [first] field on every week object (true
on a month's own first week, the same 'cheap flag beats invented
template logic' call [last] already made for grid rows) -- there is
still no {{../}} parent-path syntax for a template to test this any
other way.

ordo.tex: the per-week \clearpage is gone. Every week keeps its
existing small header line; the month's own first week additionally
prints a large, ruled banner. \needspace (a template-local LaTeX
dependency, not one of the frozen OCaml deps) keeps a header from
being stranded alone at a page's bottom -- and a real, separate bug
surfaced building it: \label placed BEFORE \needspace captured the
OLD page number when \needspace went on to force a break, producing
a step-stale \pageref in the TOC (fixed by moving \label after both
needspace checks). The day box itself is tightened (rank/colour
folded onto the same line as the citations -- an A5 box is far wider
than tall, so this fits even Holy Week's longest citations with room
to spare) so a second week routinely shares a page with the first.
Measured result: 65 -&gt; 53 pages, two pdflatex passes still settle the
TOC, zero orphaned headers, zero overfull boxes.

ordo.typ: the per-week #pagebreak is gone; #show heading's own
block gains sticky:true, Typst's built-in answer to what ordo.tex
needs \needspace for. The month banner needed its OWN sticky:true,
found live: without it a banner could sit alone at a page's bottom
with the entire month pushed to the next page -- not caught by a
check for an orphaned HEADING, since the banner is plain markup, not
one. Measured result: 65 -&gt; 27 pages (Typst's own page-fill packs
tighter than ordo.tex's needspace-driven approach), one compile pass,
zero orphans.

The five non-paginated flavours (ms/html/md/adoc/txt) never had a
forced page break to remove -- they mainly needed the same header
treatment for structural consistency: a week-level header nested
under each month's existing one, walking months&gt;weeks&gt;days (the
week's own padded, in-month-guarded day list) in place of the old
months&gt;days flat loop. Verified against groff, asciidoctor and an
HTML parser -- zero warnings.

Goldens regenerated through the Test_view.view_of path
test_render_golden.ml itself uses, not the CLI (whose --lang default
would have pinned output the tests never produce).
</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>feat(render): Typst as a seventh escaping flavour</title>
<updated>2026-08-20T07:53:49Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-20T07:53:33Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/commit/?id=66543815ae6cbf6e576a889c9291678744243953'/>
<id>urn:sha1:66543815ae6cbf6e576a889c9291678744243953</id>
<content type='text'>
Adds Escape.Typst: type, all, to_string ("typst"), of_string,
of_extension (.typ), and a per-character expand function, structured
identically to the existing latex escaper (one pass, no re-scan, so
double-escaping stays impossible by construction).

The metacharacter set was verified against the installed typst 0.14.2
binary, not assumed: a probe document escaping each of #, *, _, $, @,
&lt;, &gt;, `, \, ~ and - was compiled and pdftotext'd back to confirm the
literal character survives, and each was separately confirmed to do
something else when left bare (# opens code mode, */_ toggle
strong/emph, $ opens math, @ opens a reference -- a bare unresolved
@word is a hard compile error, not merely mangled output -- &lt;/&gt; can
close around a bare word into label syntax that swallows it whole, `
opens raw, ~ is a non-breaking space, and a run of two or three '-'
becomes an en/em dash). All ten are backslash-escapable; none needed a
non-backslash workaround. '-' is escaped unconditionally rather than
only inside a detected run, since this escaper has no lookahead -- a
probe confirmed escaping every hyphen independently still typesets as
literal hyphens for a run of any length, so the single per-character
rule is sufficient.

test_escape.ml's new Typst cases were written first and shown to fail
against a stubbed identity apply before the real escaper landed, per
this project's own regression-test discipline. Comments in both files
mark which new tests are genuine regression tests (the per-character
escaping, including a real shipped citation and a synthetic
markdown-habit overlay name) versus characterisation (to_string/
of_string/of_extension are flat table lookups with no logic to have
been wrong).
</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(render): omit DTEND at the domain's own last day, 9999-12-31</title>
<updated>2026-08-19T07:26:17Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-19T07:26:17Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/commit/?id=d71504ad9fc39b735689da32fa0be8a63c2cc7f8'/>
<id>urn:sha1:d71504ad9fc39b735689da32fa0be8a63c2cc7f8</id>
<content type='text'>
F1: Date.add_days is UNBOUNDED (date.mli) -- only Date.make enforces
1583..9999 -- and Date.to_iso8601 pads but never truncates, so
9999-12-31's naive successor formatted as "10000-01-01", and compact
turned that into a 9-digit, non-conformant DATE on the last VEVENT of
year 9999. Confirmed at the source before fixing, and reproduced
against real `colitur emit --format ics --from 9999 --to 9999` output
(DTEND;VALUE=DATE:100000101) before touching any code.

RFC 5545 section 3.6.1: a VEVENT with a DATE-valued DTSTART and
neither DTEND nor DURATION has an implicit one-day duration, so
omitting DTEND for that one event is the standard's own correct
answer, not a workaround. dtend_of re-derives the successor's
year/month/day and re-validates them through Date.make -- the one
function that actually enforces the domain -- before trusting the
string; None means the caller omits the DTEND line entirely.

F2 (minor, same function): documented next_day's own Error branch as
dead-but-silent on shipped data (event's iso &lt;&gt; "" guard is the only
caller and always parses) -- behaviour unchanged, comment only.

Two new tests: the domain's last VEVENT (DTSTART 99991231) has no
DTEND line at all; every DTEND anywhere in a 9999 feed is exactly 8
digits (the general form of the bug, catches a regression anywhere
else in the domain too). Existing 2027/2028 DTEND-arithmetic
assertions untouched and still pass.

Mutation-proved: both new tests fail against the pre-fix code
(9-digit DTEND value caught verbatim), pass after.
</content>
</entry>
<entry>
<title>feat(render): iCalendar emitter, RFC 5545</title>
<updated>2026-08-19T07:09:36Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-19T07:09:36Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/commit/?id=6abc243e5d40bd60174a3fb1affc9517b0ac5617'/>
<id>urn:sha1:6abc243e5d40bd60174a3fb1affc9517b0ac5617</id>
<content type='text'>
Not a template job: folding, escaping, exclusive DTEND and stable UIDs
are rules a logic-less template cannot enforce, and each fails silently
in a subscriber's client rather than loudly at generation.

  DTEND is EXCLUSIVE for an all-day event (section 3.6.1). Wrong here
  shows every event a day short, everywhere.
  UIDs are YYYYMMDD-&lt;rite&gt;@colitur and stable across regenerations
  (section 3.8.4.7). Wrong here duplicates the whole year in every
  subscriber's phone, months later.
  Every line is CRLF-terminated and folded at 75 octets (section 3.1).
  No RRULE: a liturgical calendar is not a recurrence rule. Asserted, so
  nobody optimises it later.

DTSTAMP is a parameter, not a clock read. RFC 5545 requires it and the
obvious implementation reads the wall clock -- which violates the
kernel's determinism rule and would make two feeds from identical data
differ byte-for-byte, defeating reproducible builds and any reviewable
diff on a published tree.

Corrected one test literal against real engine output: DTSTAMP is a
per-VEVENT property (section 3.8.7.2), not calendar-level, so the
default-value line count is 365 (every event), not 1.

Mutation-tested: a non-exclusive DTEND reddens the suite.
</content>
</entry>
<entry>
<title>feat(render): XML emitter and schema</title>
<updated>2026-08-19T06:57:42Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-19T06:57:42Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/commit/?id=544836cf0f6373a0a753d0953ce7e60fd96337af'/>
<id>urn:sha1:544836cf0f6373a0a753d0953ce7e60fd96337af</id>
<content type='text'>
Element-per-field; attributes carry identity only and there is no mixed
content, so a consumer's XPath never has to distinguish the two.

Schema validation is an opt-in make check-schema via xmllint, not an
in-suite assertion: validating XSD needs an XML library and the
dependency list is frozen. It prints SKIPPED loudly when xmllint is
absent, because a silent skip reads as a pass. The suite asserts
well-formedness properties directly instead.

This corrects the design spec, which claimed in-test validation.
</content>
</entry>
</feed>
