<feed xmlns='http://www.w3.org/2005/Atom'>
<title>colitur.git/test/test_config.ml, 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-20T14:19:25Z</updated>
<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): config.ml merges every [defaults] block, like lang.ml</title>
<updated>2026-08-19T12:09:09Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-19T12:09:09Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/commit/?id=d869a4410a88333d328358c723609577d32f3380'/>
<id>urn:sha1:d869a4410a88333d328358c723609577d32f3380</id>
<content type='text'>
config.ml and lang.ml both parse the INI format through the same reader,
Colitur_kernel.Overlay_ini.parse_sections, but resolved a repeated
[section] header oppositely: lang.ml folds over every section sharing
a name, while config.ml used List.find_opt and silently discarded every
[defaults] block after the first. Two modules parsing one file format
must not disagree about what a duplicate section header means.

of_string now folds a single accumulator across every section named
[defaults], in file order, matching lang.ml's of_string shape. A
scalar key (lang/template/format) repeated across two blocks resolves
to the later value, consistent with the existing within-section
last-wins rule; overlay keeps accumulating across every block, not
only the first; and unknown_sections still excludes every [defaults]
block, merged or not, since merging it is the point.

config.mli's lang doc comment is extended to say the last-wins rule
holds across block boundaries too, cross-referencing lang.ml's own
duplicate-section policy so the two do not drift again unnoticed.
</content>
</entry>
<entry>
<title>fix(naming): config fix round 1 -- unknown sections, O(n) accumulate</title>
<updated>2026-08-19T11:48:39Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-19T11:48:39Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/commit/?id=59fbd3718dbf2721557b97d7b4e87dce38fb745c'/>
<id>urn:sha1:59fbd3718dbf2721557b97d7b4e87dce38fb745c</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>feat(naming): the config file</title>
<updated>2026-08-19T11:38:54Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-19T11:38:54Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/commit/?id=b26089630a61a54060c86ec26be6dc4fe5418b12'/>
<id>urn:sha1:b26089630a61a54060c86ec26be6dc4fe5418b12</id>
<content type='text'>
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.
</content>
</entry>
</feed>
