aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* fix(naming): config fix round 1 -- unknown sections, O(n) accumulateLukasz Kasprzak2026-08-193-24/+75
| | | | | | | | | | | | | | | | | | | | | F1: test_unknown_key_is_reported_not_fatal never asserted unknown_keys itself, only that parsing survives -- a no-op accumulator passed it. Now asserts the key is actually collected. F2: a misspelled section name, e.g. [deafults], was silently discarded -- Ok empty, lang and everything else gone, nothing reported. That is the highest-value typo this feature exists to catch. Any section other than [defaults] is now collected into a new Config.unknown_sections, kept separate from unknown_keys so the CLI can word the two warnings differently. Still non-fatal: a newer colitur's added section must not break an older binary. F3: overlays and unknown_keys accumulated with '@ [v]' per line, O(n^2) over the field count. Cons during the fold, List.rev once at the end. F4: documented that lang/template/format are last-wins on a repeated key, the opposite direction from Overlay_ini.get's first-wins over the same section type.
* fix(naming): merge duplicate [section] blocks in the language tableLukasz Kasprzak2026-08-193-5/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | F1 (review round 1): of_string's find took only the FIRST section of a given name (List.find_opt), so a second [celebration] block anywhere in the file was silently dropped in its entirety -- reproduced with two blocks (a in the first, b in the second): b resolved to the slug fallback "b", not its real value. This is a data-loss footgun aimed squarely at what happens next: Tasks 3/4 write a 595-entry, hand-edited la.ini, and appending a second [celebration] block is the natural way to paste in a new batch of names. Worse, the failure surfaces nowhere near its cause -- a coverage check reports the dropped slugs as missing a Latin name, with nothing pointing at the parser. find now folds over every section sharing the name, in file order, so all blocks merge. This also settles which value wins when the same key appears in two different blocks: later in the file wins, consistent with the existing within-one-block behaviour (unchanged, still last SM.add wins) and with what a reader expects when appending to an INI file. lang.mli now documents both duplicate policies explicitly, and notes they run OPPOSITE to Overlay_ini.get's first-match (List.assoc_opt) over the same section.fields shape -- undocumented before, and a latent trap since the two modules read the same section type but resolve a duplicate key in opposite directions. Three tests added: two [celebration] blocks both resolve (the F1 regression), a key repeated across two blocks resolves to the later block, and a key repeated within one block still resolves to the later line (confirms unchanged behaviour). Confirmed the regression test fails against the pre-fix code (b resolves to "b", the slug fallback) and passes after.
* feat(naming): the config fileLukasz Kasprzak2026-08-194-0/+134
| | | | | | | | | | | | | | | Owns precedence and provenance and nothing else, and never reads the filesystem, so it is as testable as the language table. resolve returns the value AND its source, because a setting that silently comes from a file the user forgot about is worse than no setting at all -- config --show can then say where each effective value came from. overlay accumulates rather than last-wins: a user has more than one. An unknown key is reported, never fatal. A config written for a newer colitur must still work on an older one, but silently dropping a line the user wrote is how a typo becomes invisible.
* feat(naming): the language tableLukasz Kasprzak2026-08-197-1/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | Maps strings to strings and nothing else -- no calendars, no dates, no filesystem. That is what lets every command use it without the kernel learning about presentation. Every lookup is total, and a miss returns THE KEY rather than the empty string. A partial translation is therefore usable from its first line, and the fully-degraded case is exactly today's output (bare slugs) rather than a blank page. --raw is a real identity table, not a special case threaded through every call site: one value the whole program passes around. Reuses Overlay_ini's INI reader rather than growing a second one that would drift in its comment, quoting and trimming rules; parse_sections is exposed in the .mli for that, with no behaviour change. Fixes one defect found while running the brief's own tests rather than transcribing them blind: weekday's internal lookup key is an English day-name word (month's is already the numeral string), so on a miss it echoed that word instead of the documented numeral, breaking both the 0=Sunday convention and Lang.raw's own identity contract for weekday. weekday/month now fall back to string_of_int n directly on a miss instead of through get's generic echo-the-search-key path; month is byte-identical since its key already equals string_of_int n.
* feat: output, rendering and publishingLukasz Kasprzak2026-08-1954-43/+21217
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Gives colitur a publishable exit. Until now its only output was terminal rows; it can now print an ordo booklet and a wall calendar, publish an iCalendar feed people subscribe to, and serve a static JSON/XML API. lib/render escaping (six flavours + RFC 5545 folding), a deliberately logic-less template engine, the view model, and five emitters (CSV, JSON, XML, iCalendar, S-expression) CLI emit, table, render, publish -- all accepting --overlay templates ordo booklet in six flavours, wall grid in three schema day-v1.json and colitur-v1.xsd, the published contract man colitur-templates.5, plus colitur.1 updates The view model is why the engine can stay logic-less: a month grid needs leading blank cells, week bucketing and an in-month test, and a logic-less template can compute none of it. Shaping the data in OCaml keeps the engine safe for untrusted templates and makes the grid trivial. Formats split by whether correctness is mechanical. Presentation goes through templates; iCalendar and XML get dedicated emitters, because folding, exclusive DTEND, stable UIDs and schema fidelity are rules a template cannot enforce and each fails silently in a subscriber's client rather than loudly at generation. publish is deterministic and non-destructive: two runs produce a byte-identical tree, and --prune removes only files a previous run created, refusing any manifest entry that escapes the output directory. No new dependencies. The kernel and rite modules are untouched, and colitur day and colitur readings remain byte-identical.
| * docs(templates): the scope-fallback hazard headline was backwardsLukasz Kasprzak2026-08-191-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | It read "an inner key silently loses to an outer key of the SAME NAME" -- false: the document's own num entry, two paragraphs below, shows the opposite (inside {{#weeks}}, a bare {{num}} is the week's own number, correctly, because the inner scope wins). The real hazard, matching the body text and the name example that were already correct: a DOTTED path that resolves only part way inward (the day's own name object exists but lacks the key the path needs) falls back WHOLESALE to an outer scope of the same name, not a bare key losing outright. Corrected the headline only; re-linted clean with groff -man -Tutf8 -ww -z.
| * fix(cli): guard publish's IO, validate --dtstamp, and list all commandsLukasz Kasprzak2026-08-192-5/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * fix(templates): grid.ms wall calendar dropped four of seven columnsLukasz Kasprzak2026-08-193-95/+1128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pdftotext -layout of the shipped grid.ms showed only 3-4 of 7 columns and roughly a third of each month's day numbers: tbl's plain columns (no w()) size to their widest single entry and never wrap, so a long fallback slug (some run past 40 characters) forced every column that wide, the table ran far past the page, and whatever fell past the physical edge was gone, not merely ugly. groff exited 0 throughout (warnings, not errors), so make check-templates reported OK on a broken artefact. Fixed both halves. (a) The table now fits: true landscape via gropdf's own -P-pa4l (an in-document Xpapersize=a4l escape was tried and rejected -- it does not rotate the page in this groff), ms's own title macro widened back out after narrowing the line length for the title text (a second, independent way the original lost its width, found by reading s.tmac), and every column rewritten as a genuine tbl text-block (T{/T}, not a plain w() cell -- w() alone does not wrap, confirmed against tbl's own generated troff code) so long, hyphenated slugs wrap at their own hyphens instead of forcing the column wider. (b) check-templates now captures groff's stderr per template and fails the target if it is non-empty, rather than trusting groff's exit code. Verified: 0 warnings (was 12), pdftotext -layout shows all 7 columns and every day number for all 12 months (was 3-4 columns, ~12-23 of each month's day numbers). The golden fixture is regenerated: 0 "{{", 12 month headings, exactly one Ianuarius, and each week's block (now spread across several physical lines by the T{/T} wrap) carries exactly 6 tabs joining its 7 cells.
| * test(emit): replace two vacuous CSV/XML assertions with real onesLukasz Kasprzak2026-08-191-11/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The live-data CSV assertion inspected only the first field's length, always the 10-char ISO date, which can never contain a comma -- it could not fail no matter what emit_csv.ml did with the rest of the row. Mutation-proved: replacing emit_csv.ml's escape_field call with identity left every test green while the real output emitted a 14-field row against a 13-column header. Fixed by parsing the row as RFC 4180 actually requires (a small quote-aware splitter) and asserting the field count matches the header, plus asserting the quoted substring appears literally. The XML suite asserted Escape.Xml's correctness in isolation but never that emit_xml.ml actually calls it on every interpolated value. Bypassing one escape call at the name-element site left all tests green while real 2035 output (Sts. Fabian & Sebastian, 20 January) emitted a bare '&' that xmllint rejects. Fixed by adding a live-data test against the 2035 fixture asserting an escaped ampersand is present and no bare one remains. Both new assertions were run against their named mutations and confirmed to redden before being reverted.
| * docs(templates): fix a false claim in the worked example (F1)Lukasz Kasprzak2026-08-191-13/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The worked minimal template iterated the top-level, flat days list and claimed the naive {{name.la}} form would print the enclosing month's name there. It would not: with no {{#months}} wrapping it, the flat days list has no month anywhere on the scope stack, so the naive form on an unnamed day resolves to nothing, not to the month. Reproduced against the live engine before touching the page: the flat shape renders empty; the identical naive form nested inside {{#months}} genuinely does print the month's name on both unnamed days. The example now nests days inside months -- the shape every shipped template actually uses, and the shape the hazard needs to fire -- with a second, verified rendering showing the collision for real, and a closing note stating plainly that the flat shape does not reproduce it. SCOPE AND LOOKUP's own name-collision paragraph gained the same nesting precondition it was missing. Both rendered blocks were checked mechanically: extracted verbatim from the page source and diffed against a fresh colitur table run over the exact templates shown, byte for byte. One cosmetic fix along the way: a transition sentence embedded the full safe-idiom string inline via .B, which groff's justifier stretched into visibly wide gaps when rendered. Reworded to reference the idiom shown above instead of repeating it.
| * fix(cli): publish --prune refuses a manifest entry that escapes --outLukasz Kasprzak2026-08-192-9/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CRITICAL: .colitur-manifest lives INSIDE the tree publish writes into -- the very tree this feature exists to have committed into a git repo. A manifest entry with a ".." path component, or an absolute path, let --prune Sys.remove/Unix.rmdir a file OUTSIDE --out. No attacker is required: an ordinary bad merge, a conflict resolved the wrong way, or a hand-edit of that file is enough to plant such an entry, and publish's own stated contract -- it never deletes a file it does not own -- broke outright the moment one was present. Two independent checks, both required, applied before every deletion: - structural (manifest_entry_is_safe): reject an entry that is absolute or has a ".." path COMPONENT, by splitting on '/' and comparing components, not by substring-matching ".." (which would wrongly reject a legitimate name like foo..bar). - containment (resolves_under): resolve both --out and the candidate with Unix.realpath (closing a symlink-inside-out gap the structural check alone would miss) and verify the candidate is a genuine path descendant of --out, not merely a string with the same prefix. Applied at both the file-deletion loop and prune_empty_dirs' own directory removals. A rejected entry is skipped with a one-line stderr warning; publish completes rather than aborting -- a corrupted manifest must not make the tool itself unusable. test/cli.t reproduces the exact canary scenario (a ".." entry surviving deletion of a file outside --out), an absolute-path entry, and a legitimate dotted filename (no .. component) still pruning normally, alongside the existing --prune coverage.
| * docs(render): template reference, install rules, typesetting checkLukasz Kasprzak2026-08-197-15/+821
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | colitur-templates.5 documents the four syntax forms, the six flavours and their escaping, and the full view-model field reference. It states plainly that there are no partials, no raw form and no expression evaluation -- a template is data, never a program. It documents two real hazards found during this build, not theoretical ones: the outward scope fallback silently shadowing an inner name/num key with an outer one of the same name (with the safe {{#name}}...{{^la}} idiom), and the engine's lack of host-comment awareness (a {{...}} inside a LaTeX %, groff .\" or HTML <!-- --> comment is still parsed as a tag). It also states the limitation rather than hiding it: AsciiDoc and Markdown are not escaped, so a feast name containing * or _ renders as emphasis. templates/ and schema/ now install into <prefix>/share/colitur/, matching data/ef/, via new install stanzas; colitur-templates.5 installs to man5 beside colitur-overlay.5. Verified against a scratch prefix: the installed binary resolves both from the prefix, not the source tree, when run from an unrelated working directory. make check-templates typesets every shipped template through pdflatex and groff when they are installed, and prints SKIPPED loudly when they are not. Golden tests prove templates render; only this proves they typeset. A silent skip would read as a pass. Fixed a real doc/help drift while here: bin/main.ml's --help still said --overlay was accepted on day and readings only, three commands out of date (emit, table/render and publish all accept it too), disagreeing with the man page's own OVERLAYS section, which carried the identical stale line. Both are corrected; --overlay's own behaviour is unchanged.
| * feat(cli): colitur publish -- the static treeLukasz Kasprzak2026-08-196-8/+888
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Writes ef/<year>.{json,csv,xml,ics}, one JSON per day, the schema and a generated index. That tree is the API: any web server or git repo serves it, and nothing runs at request time. Deterministic: publishing twice is byte-identical, asserted in cli.t. That is what makes publishing into a git repo safe -- the diff shows only real change, and you review it before pushing. Non-destructive: a manifest records exactly the files this tool wrote, so --prune can only remove files a previous run created. A file you put in the output directory yourself is never touched, with or without --prune. Asserted in both directions. Pruning a stale file also removes any directory it leaves empty behind it (e.g. an old year's own ef/<year>/ tree), stopping at --out itself -- without this, a pruned year's own directory would survive empty and test -d would still see it. schema/day-v1.json is resolved the same prefix-relative way data/ef's own sexp files are (installed vs build-tree, probed rather than assumed), never from cwd, and a missing schema fails with one line on stderr before anything is written rather than emitting an empty file. Needed schema/day-v1.json wired into the root dune file's default alias and into test/dune's cram deps -- unlike data/ and templates/, nothing made dune mirror schema/ into the build tree before this. unix is added to bin/dune's libraries for mkdir_p; it ships with the compiler, so colitur.opam and dune-project are unchanged.
| * feat(templates): wall calendar grid in LaTeX, groff and HTMLLukasz Kasprzak2026-08-198-2/+752
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Three flavours, not six: a month grid in Markdown or plain text is a worse artefact than the booklet already is, and shipping a template we would not use ourselves is maintenance with no reader. These are the first templates to use weeks and in_month, so this is where the view model earns its keep -- the booklet and the grid come from one model with no second code path. Every cell carries a per-cell 'last' boolean (already in the view). A table row needs a separator BETWEEN cells and the engine deliberately has no 'unless last' construct; the rule is shape the data, not the template. Without it the LaTeX grid emits eight columns for seven cells and pdflatex rejects the file. Day cells resolve their label as {{#name}}{{la}}{{^la}}{{slug}}{{/la}} {{/name}}, never a bare {{name.la}}: the enclosing month object has its own name.la, and the engine's scope lookup falls back outward, so a bare dotted lookup would render the month's own Latin name on every day lacking one -- a wall calendar where every day reads "January". Verified on the goldens: Ianuarius appears exactly once per file, the month heading, never as a day label.
| * fix(cli): guard the whole template read, not only the openLukasz Kasprzak2026-08-192-5/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | read_file guarded open_in_bin but left in_channel_length and really_input_string unguarded, so a path that opens but cannot be read as bytes -- a directory -- escaped as an uncaught Sys_error and crashed the program, leaking the open channel on every failure path. A template is user input; it must never crash the program. Wrap the whole read in Fun.protect so the channel closes on every path (success, exception, early return), matching the close-on-every-path pattern already used in the test suite. The missing-file message stays exactly as before; a read failure after a successful open now carries the exception text, the same path: exception shape Layer.load and Overlay.load already use. New cram case points --template at a directory (the sandbox's own cwd, not /tmp) and asserts one stderr line and exit 2, not a crash.
| * feat(templates): ordo booklet in six flavours, pinned by goldensLukasz Kasprzak2026-08-1915-2/+14874
| | | | | | | | | | | | | | | | | | | | | | | | | | | | LaTeX and groff are the print paths; HTML carries a print stylesheet; AsciiDoc, Markdown and plain text are the plain-consumer paths. AsciiDoc and Markdown use flavour none, and say so in a comment: their metacharacters are context-dependent and escaping them aggressively produces worse output than not escaping. The consequence is real and documented -- a feast name containing * renders as emphasis. Golden tests pin all six byte-for-byte for 2027. They prove the templates RENDER, not that they TYPESET; compiling needs TeX and groff, which is Task 13's opt-in make check-templates.
| * feat(cli): colitur table and renderLukasz Kasprzak2026-08-193-3/+428
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Computes and renders in one process. There is deliberately no stdin-fed render: honouring the pipe would need a JSON parser we would have to write, purely to serialise and immediately re-parse our own view -- a second hand-rolled component and a second place for the contract to drift, for no benefit. colitur emit --format json | jq still composes. An unknown extension with no --flavour is an error naming the six valid flavours, never a silent fallback to none: guessing wrong produces malformed output that looks fine until it does not. A malformed template reports the parser's own reason and exits 2. A template is user input; it must never crash the program.
| * fix(render): omit DTEND at the domain's own last day, 9999-12-31Lukasz Kasprzak2026-08-192-3/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <> "" 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.
| * feat(cli): colitur emit -- csv, json, sexp, xml, icsLukasz Kasprzak2026-08-194-21/+359
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reuses resolved_year_report's existing two-liturgical-year indexing rather than copying it: that walk owns the civil-vs-liturgical span reasoning, and a second copy would drift. It is refactored to return the days, with the printer layered on top, so day and readings behave identically -- which cli.t proves byte-for-byte. CSV emits one header for a whole multi-year run, not one per year. A reversed range is a usage error rather than silently empty output. Asserted in cli.t: two ics runs are byte-identical, because nothing in the path reads a clock.
| * feat(render): iCalendar emitter, RFC 5545Lukasz Kasprzak2026-08-194-1/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-<rite>@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.
| * feat(render): XML emitter and schemaLukasz Kasprzak2026-08-196-2/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * fix(render): remove rank_label -- it duplicated name verbatimLukasz Kasprzak2026-08-191-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | view.ml's rank_label field was a byte-for-byte copy of the celebration's name (names_value cel.Celebration.names), not a localized rank label at all -- the kernel has no per-language rank names to draw one from, so there was no honest value to put there. Nothing consumed it: no template in the plan, no test, no other code referenced it. Removed from both day_value and padding_cell so the two key sets stay identical (23 keys each, verified). schema/day-v1.json already described 23 keys and needed no change -- it now matches the emitted output exactly. schema/day-v1.json is a published contract: once a phone subscribes or a site fetches this, removing a field is a breaking /v2/ change. The time to remove a field that lies about its own contents is before anyone can depend on it, not after.
| * feat(render): CSV and JSON emitters, and the published contractLukasz Kasprzak2026-08-197-1/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both consume the VIEW, not the kernel, so every emitter and every template describe exactly the same fields -- there is one vocabulary, not five. CSV is RFC 4180: a field with a comma is quoted. That is live on real data, not hypothetical -- 'St. Joseph, Spouse of the Bl. Virgin Mary' would otherwise split into two columns. JSON is hand-rolled because the dependency list is frozen and escaping is the only subtlety. Control characters below 0x20 are \u-escaped per RFC 8259 section 7. There are no numbers in the view, deliberately: a consumer never has to guess whether week is 2 or "2". schema/day-v1.json pins the shape. Once a phone subscribes or a site fetches this, it is a promise to strangers -- adding a field is minor, renaming one means /v2/.
| * feat(render): the view modelLukasz Kasprzak2026-08-195-1/+355
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Shapes a civil year of resolved days into the value a template renders against. This layer is why the engine can stay logic-less: a month grid needs leading blank cells, week bucketing and an in-month test, and a logic-less template can compute none of it. Both weeks and days are offered at every level -- the booklet walks days, the grid walks weeks -- so the two artefacts cannot drift. Colours are six booleans, not hex: hex bakes a presentation policy into the engine, and LaTeX, groff and HTML each want a different colour expression. Asserted: exactly one of the six is true on every day of a whole year, so a template keying off them can never get none or two. Padding cells carry every field a real day carries, empty, so a template never hits a missing key mid-grid.
| * feat(render): template renderer with mandatory escapingLukasz Kasprzak2026-08-194-1/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Every interpolated value is escaped for the template's flavour; the template's own literal text never is, because that is the author's markup. There is no raw form, so a template cannot opt out. Scope is a stack with outward fallback, so a grid template can reach the year number from inside a week without the view duplicating it into every cell. A missing key renders empty -- the one deliberate silence, so a template survives a rite that does not set every optional field. Mutation-tested: dropping the Escape.apply call reddens the data-cannot-escape-flavour case.
| * fix(render): reject empty tag paths, sharpen the raw-form testLukasz Kasprzak2026-08-192-7/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | F1: test_no_raw_or_partial_form's first assertion only excluded one literal shape (Ok [Var ["{name"]]), so it could not actually catch a future raw/unescaped constructor under a different name. Replace it with an assertion of the real parse result for {{{name}}} (Ok [Var ["{name"]; Text "}"]), documented behaviour rather than a guarantee this test cannot check -- the real guarantee is structural: node has exactly four constructors and none of them is raw. F2: {{.}}, {{#}}, {{^}} and {{/}} used to parse to a Var/Section/ Inverted with an empty path, reachable but never designed. This engine has no "current context" for a bare dot to mean, so a bare-dot or empty-sigil path is now a parse error at lex time, covering all four sigil forms via one path helper. The existing "empty tag {{}}" branch is unchanged and still reachable (a fully empty body is a distinct case from a sigil with an empty path).
| * feat(render): logic-less template parserLukasz Kasprzak2026-08-194-1/+177
| | | | | | | | | | | | | | | | | | | | | | Placeholders, sections, inverted sections, comments. Nothing else: no partials, no lambdas, no expression evaluation, no raw form. A template is data, never a program, which is what keeps an untrusted template safe. Errors rather than silence on a malformed template: an unterminated tag, an unclosed section, a mismatched close and a partial all return Error. Swallowing '{{name' as text is how a typo becomes invisible missing output in a printed booklet.
| * fix(render): make fold_ics total on arbitrary octet stringsLukasz Kasprzak2026-08-192-8/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fold_ics's UTF-8 backoff loop could back `cut` all the way down to `pos` on 74+ consecutive continuation bytes (0x80-0xBF), producing a zero-length chunk and recursing on the identical position forever -- not producible by valid UTF-8, whose longest continuation run is 3, but the kernel's own totality requirement covers arbitrary octet strings, not only valid ones. When backoff finds no boundary inside the window, cut hard at the limit instead, so forward progress is unconditional. test_fold_never_splits_utf8 previously asserted only that unfolding reproduced the original bytes, a property folding preserves at any cut position and therefore blind to a boundary violation. It now also asserts the named property directly: no continuation chunk may start with a UTF-8 continuation byte. A new regression test feeds fold_ics 100 consecutive continuation bytes and asserts it terminates with every line at or under 75 octets.
| * feat(render): per-flavour escaping and RFC 5545 line foldingLukasz Kasprzak2026-08-196-2/+216
|/ | | | | | | | | | | | | | | Six flavours: latex, groff, html, xml, ics, none. Markdown, AsciiDoc and plain text map to none deliberately -- their metacharacters are context-dependent and escaping them aggressively produces worse output than not escaping. An unrecognised extension returns None rather than falling back to none: guessing the flavour wrong produces malformed output that looks fine until it does not. Folding backs off to a non-continuation byte, so a fold never splits a UTF-8 sequence -- the failure mode that would corrupt Polish and Latin names in a published feed.
* test(differential): C14 and C15 closed -- only slug vocabulary remainsLukasz Kasprzak2026-08-184-54/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lectio adopted the last two Missal corrections colitur argued: C14 3 -> 0 RG 96(a)/97/98. lectio resolved each impeded I-class feast's transfer independently, so in 2008, 2035 and 2046 St Joseph and the Annunciation both walked onto the Monday after Low Sunday and Joseph, losing there, was observed on no day of those years at all. It now resolves the year's transfers as a set: the Annunciation takes the Monday as its sedes propria, Joseph the Tuesday. C15 7 -> 0 The Holy Family propers' own 13-January rubric, "sine commemoratione Baptismatis D.N.I.C.". lectio kept the Baptism as the observed office on all seven such years in 2005-2050. Those were the last two BEHAVIOUR classes. What is left is C1 (138) and C6 (119), both pure slug vocabulary. Measured across the whole fixture, applying only the season normalisation the test already applies: 579 of 16801 days differ, and every one of them differs on the SLUG ALONE. Zero days differ on season, rank, colour, Epistle or Gospel. (The test's own norm_slug table already maps 322 of the 579; the 257 left are C1 and C6. The field profile is the same either way.) So the two engines now agree on every liturgically meaningful field on every day of 2005-2050. The residue is what the two projects call things -- ef-christmas-2-friday against ef-time-after-epiphany-1-friday for the same day, same Mass. Aligning it means renaming lectio's slugs, and those are keys: its lectionary, clectio's generated tables and any user overlay are built on them. Left as vocabulary rather than forced. Fixture refreshed against lectio e713da2; 13 rows changed, colitur agrees with all of them. 24 divergence classes at the start of this work, 2 now.
* test(differential): C31 closed -- 4 classes left, 257 of 267 rows are namingLukasz Kasprzak2026-08-184-131/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | The ferias between Epiphany and the first Sunday after it repeat Epiphany's own Mass in lectio now; they had been taking the Mass of the Sunday that follows them. C31 98 -> 0 C1 40 -> 138 grew, and changed character C1 is now SLUG VOCABULARY ONLY, and its note says so. Season, rank, colour and both citations agree with colitur on every day of the January window; what differs is the identifier -- ef-christmas-2-thursday against ef-time-after-epiphany-1-thursday for the same day with the same Mass. C6 is the same shape. That is 257 of the 267 remaining rows. Aligning the vocabularies would mean renaming lectio's slugs, and those are keys: its own lectionary, clectio's generated tables and any user overlay are built on them. Recorded as vocabulary rather than closed, because the rows do differ -- just not in anything a reader of either engine's output sees. Measured for 2026: season, rank and colour agree on all 365 days; 14 days differ and every one differs on the slug alone. 5 classes -> 4, agreement 98.4%.
* test(differential): C20 and C38 closed -- agreement 98.4%Lukasz Kasprzak2026-08-184-305/+233
| | | | | | | | | | | | | | | | lectio carries the readings of the nine Common-routed saints and of three more that had proper Masses but no reading at all. Every day of 2005-2050 now resolves a reading there; four days used to come back empty. C38's own note said it could not close without lectio gaining a Commons concept. The readings arrived instead of the abstraction, which was enough: each Common resolves to one first/gospel pair for the saint that names it, so a table plus assignment layer would have bought indirection and nothing else. C20 14 -> 0 C38 70 -> 0 7 classes -> 5, 351 rows -> 267, agreement 97.9% -> 98.4%.
* test(differential): seven classes closed -- agreement 93.9% to 97.1%Lukasz Kasprzak2026-08-184-1005/+928
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lectio gained the Passiontide week split and thirteen lectionary entries. C23 230 -> 0 Holy Week's own six Masses C32 99 -> 0 C35 60 -> 0 the first weeks after Epiphany and Pentecost (RG 299) C33 46 -> 0 Corpus Christi C34 46 -> 0 the Sacred Heart C26 43 -> 0 Passion Tuesday C19 7 -> 0 the Holy Family week-index residue C1 75 -> 40 C31 63 -> 98 GREW The Passiontide split is the one that carried most of this. efWeek had no Passiontide case, so both weeks numbered 0 and every day of Holy Week took the slug of its Passion-week namesake -- one set of readings for two weeks with entirely different Masses. Good Friday was reading Passion Friday's. C31 growing is the same bookkeeping as C1's earlier growth and is recorded in its own note: C32 and C35 closed, and rows that carried several causes now carry only this one. Nothing new disagrees. 17 classes -> 10, 1019 rows -> 488, agreement 93.9% -> 97.1%. What remains is almost entirely NAMING rather than disagreement: C6 (119) is colitur's ef-nativity-octave-day-N against lectio's ef-christmas-N-weekday on days where both now read the same Mass, and C1 (40) is the same shape in the January window.
* test(differential): C8 closed, C6 narrowed to namingLukasz Kasprzak2026-08-184-153/+155
| | | | | | | | | | | | | | | | | | | lectio gained Rogation Monday and Tuesday (RG 87, violet under RG 128(d)) and the Missal's own Mass for the weekdays within the Octave of the Nativity ("Diebus infra octavam Nativitatis Domini", Titus 3:4-7 / Luke 2:15-20). C8 26 -> 0 CLOSED C6 119 -> 119 narrowed: the cause halved, the count did not C6 is worth reading carefully rather than skimming the number. Its rows no longer differ on First_f or Gospel_f at all -- the two engines now read the SAME Mass on 29-31 December, where lectio previously served the Sunday's. What is left is Slug_f alone, colitur's ef-nativity-octave-day-N against lectio's ef-christmas-N-weekday. That is vocabulary, not disagreement. The count did not move because the entry's gate already admitted a Slug_f-only subset, which is exactly the case where a row count is a misleading summary. 17 classes, 1019 rows, agreement 93.9%.
* test(differential): C17 closed -- the largest divergence class is goneLukasz Kasprzak2026-08-184-1164/+1166
| | | | | | | | | | | | | | | | | | | | | | | | | | lectio built the votive Office of Our Lady on Saturday (RG 78) and then said RG 309(a)'s own Mass for it. Both halves were needed: RG 78 keeps the office and gives it white, RG 309(a) picks among the Missal's five seasonal formularies. Fixing only the first leaves the day announcing Our Lady and reading the feria's Mass -- the bug colitur itself shipped briefly and fixed in its v0.3.0. C17 439 -> 0 CLOSED -- the largest class between the two engines C31 103 -> 63 Saturdays that carried both causes; only this one left C35 69 -> 60 same C1 35 -> 75 GREW C1 growing is not a regression and is recorded as such in its own note: the January Saturdays C17 used to absorb now differ only on the slug vocabulary C1 already covers, so they land there instead. Rows moved between entries as the larger cause was removed. Also in this refresh, from the same session: weeks after Epiphany now count from the first Sunday after it rather than from 6 January, which took C19 from 35 to 7 -- what remains there is the Holy Family interaction, a different cause needing RG 17(b) in lectio. 19 classes -> 18, 1493 rows -> 1045, agreement 91.1% -> 93.8%.
* test(differential): refresh the fixture -- three more corrections adoptedLukasz Kasprzak2026-08-184-893/+891
| | | | | | | | | | | | | | | | | | | | | | | | | | | lectio has taken three further corrections colitur argued from the Missal: the twelve RG 124 colours (red is for Apostles, Evangelists and Martyrs, and missalemeum had the rule inverted in both directions), Good Friday's black under RG 128(b) with RG 132, and RG 72's Christmas Time boundary at 13 January inclusive. 864 rows changed. Two classes closed outright and two moved: C18 450 -> 0 the RG 124 colours -- the LARGEST single class in this file C36 46 -> 0 Good Friday's colour C1 159 -> 35 the season boundary stopped differing C23 184 -> 230 Good Friday's rows fold back, the split no longer needed C36 is closed rather than kept at zero because the split it represented has dissolved: it existed only to hold Good Friday apart while its diff set had a third member, and with the colour agreeing the rows are the exact pair C23 has always gated on. Restoring 230 is not a regression, it is the number returning to what it was before the split. Cited classes 24 -> 19, divergent rows 2252 -> 1521, agreement 86.6% -> 90.9%. The percentage is again the least interesting part. C18 alone was 450 days on which the two engines agreed about nothing and now agree because both apply RG 124 the same way round.
* docs(tools): the lectio patch exporter cannot see temporal correctionsLukasz Kasprzak2026-08-181-0/+11
| | | | | | | | | | | | It compares colitur's sanctoral data against lectio's calendar ini, so a correction to a temporal day -- computed in code on both sides, present in neither file -- is structurally invisible to it. Not hypothetical. The Good Friday colour fix (RG 128(b) + RG 132, v0.4.0) was missed entirely by this tool when the eight-field patch was produced, and surfaced only by running clectio at the bottom of the chain and diffing its output against colitur date by date. The tool narrows the search; it does not close it.
* docs: the lineage is broken at one link, and layer 4 is now the outlierLukasz Kasprzak2026-08-181-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | CLAUDE.md's lineage note said layers 3 and 4 are one chain -- Divinum Officium, missalemeum, lectio, colitur -- and that a defect inherited at the root is invisible to both. That is still true everywhere except on the days lectio has now corrected. lectio adopted eight corrections colitur argued from the Missal. On those days the chain no longer runs DO to lectio: lectio follows the Missal, and missalemeum is the only party still carrying the inherited error. C27, C28 and C37 went to zero and are closed; C38 narrowed to a readings-only divergence that cannot close without lectio gaining a Commons concept. The practical consequence for layer 4 is a base rate, and it is worth stating because it is easy to get backwards: on those days the oracle disagrees with BOTH engines, so M29 and M30 should be read as "missalemeum is the outlier" rather than "colitur is unusual". A fresh colitur-vs-missalemeum divergence is no longer presumptively colitur's fault. And the limit, stated so it is not over-read: everywhere else the two layers remain one lineage, and lectio's sanctoral is still generated from missalemeum by a script that would silently revert all four calendar corrections if re-run. That warning now lives in lectio's two ini headers and the generator's own doc comment as well as here.
* test(differential): refresh the lectio fixture -- the lineage invertedLukasz Kasprzak2026-08-184-254/+275
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Every previous refresh of this fixture carried lectio's answers TO colitur, because colitur's data was bootstrapped from lectio. This one carries colitur's answers BACK. lectio has merged eight field corrections colitur argued from the 1962 Missal: ubaldus and didacus promoted from commemoration to III-class feast on the Missal's own calendarium, both August vigils recoloured violet under RG 128, and both Ember Saturdays' readings, which lectio had carrying St Thomas's and St Matthew's Masses respectively. 227 of the 16801 rows changed. Three cited classes went to zero and are CLOSED and REMOVED, citations preserved in the register, the same discipline C2-C5, C7, C9-C13, C21, C22 and C25 already record: C27 40 -> 0 the Advent Ember Saturday's readings C28 40 -> 0 the September Ember Saturday's readings C37 77 -> 0 the two vigil colours C37 is worth noting by name: its own note called the shared lineage "the sharpest demonstration in the project", colitur and lectio and missalemeum all carrying the same two wrong colours. Two of the three now carry the right one. C38 NARROWED rather than closed, and the distinction matters. Its identity half is gone -- lectio ranks both saints class-3 now -- but the same 70 rows still differ on readings, because both saints take their Mass from a Common and lectio has no Commons concept to resolve one. It is gated on diffs = [First_f; Gospel_f] exactly, which is C18's shape. It cannot close without lectio gaining a capability, which is a feature rather than a fix. Net: 24 cited classes to 21, 2252 divergent rows to 2095, agreement 86.6% to 87.5%. The number that matters is not the percentage though -- it is that those 227 days now agree BECAUSE BOTH ENGINES FOLLOW THE MISSAL, where before they agreed because both inherited the same errors from Divinum Officium. That is the failure mode CLAUDE.md's lineage note describes, resolved rather than documented, for the first time in this project.
* fix(examples): pin the three Polish classes from the source, one was wrongLukasz Kasprzak2026-08-181-14/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | The first version of poland.ini marked three classes INFERRED because the ordo's class column sits several lines below its own date row and the first extraction pass did not reach it. All three are now read from the source: Our Lady Queen of Poland class-1 (line 1114), St Stanislaus class-1 (1233), Our Lady of Czestochowa class-1 (2398). One of the three inferences was WRONG. Czestochowa was written class-2 as "the conservative reading"; the ordo gives class-1. The mistake was treating the ordo's "part." marker -- particular, proper to certain places rather than universal in Poland -- as implying a lower rank. Those are different axes. The extraction method was validated before being trusted, against two entries whose class was already known from a clean single-line row: St Adalbert class-1 and St Andrew Bobola class-2. It reproduced both. Visible consequence, and it is correct: at class-1 Czestochowa no longer commemorates St Zephyrinus, because RG 111(a) admits no ordinary commemoration on a I-class day. The ordo also names the particular sees each patron is proper to -- Stanislaus for four archdioceses and three dioceses, Queen of Poland for Czestochowa and Przemysl and the military ordinariate -- which is now recorded beside them, and which reinforces the header's existing warning that a diocesan calendar is not a national one.
* release: v0.7.0v0.7.0Lukasz Kasprzak2026-08-183-3/+3
|
* docs: CHANGELOG entry for 0.7.0Lukasz Kasprzak2026-08-181-0/+3
|
* feat(examples): ship two real local calendars, with their limits statedLukasz Kasprzak2026-08-186-1/+330
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Poland and the Benedictines, in the flat INI form, installed beside the invented diocesan example. poland.ini -- 17 entries from the Calendarium Perpetuum pro Dioecesium Poloniae (1964), promulgated under Rubricarum instructum and applying to the 1962 Missal. Transcribed from a published Polish EF ordo that names that same calendar, cross-checked against missalemeum's supplement page for the two formularies 1964 added (13 and 15 July). Date, Latin name and class were read from the source for every entry; three classes could not be recovered from the PDF's column layout and are marked INFERRED where they appear, with the reasoning. The header carries an edition warning that is a real trap here: the Proprium Poloniae of 1921 and 1934 is still bound into many missals and carries an outdated arrangement of dioceses and ranks. It is not this calendar, and it is exactly the kind of plausible wrong-edition source that has cost this project time before. benedictine.ini -- two entries, and the comment explaining why is the point of shipping it. Counted across the Norcia ordo: 86 "I cl.", 43 "II cl.", ZERO "III cl." and ZERO "IV cl.", against 103 "Semidup." and ~96 "Dup.". The monastic rite uses the Roman classes at the top and the older Duplex / Semiduplex grades below, exactly where the Roman calendar has III and IV class. colitur's rank vocabulary cannot express those, so most Benedictine propers cannot be written here at all -- a mismatch of vocabularies between related rites, not a gap in the data. Rather than invent a Duplex -> Class3 mapping the source never states, that file ships only what its ordo gives in Roman terms and lists roughly two dozen excluded feasts BY NAME, so the omission is visible instead of silent. Both headers say plainly that they are examples and not authorities: they are transcriptions from published ordines, none of the five test layers can vouch for either, and both should be checked against the reader's own ordo. The cram test asserts only what we control -- that they parse, convert and apply -- and says so. They also demonstrate the precedence engine on real data: the Benedictine Transitus is I class and takes 21 March with the Lenten feria commemorated, and Maurus is II class and takes 15 January with Paul the First Hermit commemorated.
* docs(man): explain how an overlay is actually appliedLukasz Kasprzak2026-08-181-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | The format was documented; the pipeline was not. The commonest surprise when writing a local calendar is 'my feast does not appear', and it is almost never a loading failure -- which means the existing docs answered a question nobody was asking. Four stages, named: load, merge, resolve, emit. The one that matters is resolve, and the point it makes explicit is that overlay entries take part in precedence on EQUAL TERMS. A local feast is not privileged for being local; it competes under RG 91's table exactly as a universal one does. Three concrete causes of a missing feast, each of which came up while testing this branch: outranked by the day it lands on, a date structurally occupied (an easter+60 feast can never appear, because Corpus Christi is Easter+60 and is I class), or a commemoration past RG 111's limit for the day's class. And the diagnostic rule -- if check says the file loaded and every directive found its target, the answer is stage 3, so raise the class or move the date. Also records why the shipped adjustments are applied first and why that is not configurable: replacing rather than layering would silently drop the inseparable Peter/Paul commemoration, the Major Litanies, St Barbara and Rogation Wednesday. Overriding one deliberately by naming its slug is a different thing from losing it by accident.
* merge: a flat INI overlay front endLukasz Kasprzak2026-08-188-1/+674
|\ | | | | | | | | A convenience format for simple local calendars, transpiled to the existing S-expression form and verified against it before emitting.
| * feat(overlay): a flat INI front end, which verifies its own outputLukasz Kasprzak2026-08-188-1/+674
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A convenience format for calendars that add a few local feasts and drop one or two universal entries. Section names are slugs, a [overlay] section carries the id, and status/subject/layer default so the common case -- an ordinary local saint's feast -- says only what distinguishes it. It is a FRONT DOOR, not a second data model. It parses to exactly the Overlay.t the S-expression form parses to, and everything downstream is the same code on the same values; a test asserts an INI overlay and its hand-written sexp equivalent produce identical Overlay.t values. It is also deliberately less expressive -- Add, Suppress and single-field Edit only -- and refuses Replace, multi-field edits and citation edits BY NAME rather than dropping them silently. Anything it cannot say is a reason to write sexp. Little of this is new machinery: tools/bootstrap_sanctoral.ml has parsed INI and mapped it to celebrations since the sanctoral was bootstrapped from lectio. The dates needed extending, since that mapping handled only MM-DD; the flat forms are easter+N/easter-N and mon/day/nth, with nth negative to count from the end. `colitur convert` is a separate step rather than --overlay sniffing the extension, so the author can read what their INI became. When a date form was mistyped, "what did the engine actually get" is the question, and an invisible transpile cannot answer it. The conversion verifies its own output: the emitted text is parsed back with the same function that loads an overlay and must equal what the INI denoted, or nothing is written. That is the point of the module. A transpiler emitting valid-but-wrong sexp is the failure a convenience format invites, and `colitur check` could never catch it -- the output would parse cleanly and mean something else. That check was WRONG on the first attempt, in exactly the way it exists to prevent. It re-serialised the parsed value instead of parsing the text being returned, so it verified t -> sexp -> t, which is true by construction and proves nothing. Found by mutation: corrupting the renderer to emit a different overlay id sailed through and exited 0. It now parses the returned text, the mutation is caught with exit 2, and two tests fail under it where none did before.
* docs(man): colitur-overlay(5), the overlay format in fullLukasz Kasprzak2026-08-184-6/+277
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The overlay format was documented in three partial places -- a paragraph in colitur(1), a block in --help, and the comments inside the shipped example -- none of which was a reference. Someone writing a diocesan calendar had to read all three and infer the rest. Section 5 because an overlay is a thing a user AUTHORS rather than a command they run: it belongs beside fstab(5), not in man1. Covers every directive and every field edit, the six required fields and the two optional ones, all three date specifications including the signed Easter_offset and the negative nth, three worked examples, and the caveats. The subject field gets a note explaining that it is not decoration -- it decides whether a feast displaces an occurring Sunday under RG 16(a). Two things it says that the code says and the old prose did not. There is no Set_status and no Set_date among the field edits, deliberately: changing an entry's status or its date makes it a different celebration rather than an edited one, so Replace is the right directive and the change stays visible in `colitur check` output. And a local feast missing from output has usually LOST its day under the general rubrics rather than failed to load -- the engine applies precedence to overlay entries exactly as to universal ones, which is the first thing an author hits and was written down nowhere. Writing it caught a documentation bug before it shipped: a first draft listed a Set_status edit that does not exist and omitted Remove_name that does. Every documented edit is now cross-checked against overlay.mli. Linked from colitur(1)'s SEE ALSO and its OVERLAYS section, and from --help. The Makefile installs it into man5, removes it on uninstall, and the man and doc targets lint both pages.
* release: v0.6.0v0.6.0Lukasz Kasprzak2026-08-183-3/+3
|
* docs: CHANGELOG entry for 0.6.0Lukasz Kasprzak2026-08-181-0/+3
|
* docs: point --help and the man page at the new overlay workflowLukasz Kasprzak2026-08-182-3/+60
| | | | | | | | | | | | | Both listed check and new-overlay among the commands but neither told a reader how they fit together, which is the part that makes them useful. The overlay sections now carry the four-step loop -- new-overlay, edit, check, run -- and state what check does not do, since its name invites a stronger reading than it earns. Also documents what the format now permits: citations and layer optional, the signed Easter_offset, the negative nth counting from the end of the month, and the legal values of each of the six required fields, which previously appeared only in the shipped example.