aboutsummaryrefslogtreecommitdiff
path: root/internal/tui/reader_test.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-18 14:58:20 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-18 14:58:20 +0200
commit46653b24b0afff60be35c3e876830eb522fd2acc (patch)
treeb86e6aa95937b69a5b3bdbf882c62775da25271b /internal/tui/reader_test.go
parent118dacf366d7864bc8e9ecb8f7b6a70d1b9fdb84 (diff)
downloadlectio-46653b24b0afff60be35c3e876830eb522fd2acc.tar.gz
lectio-46653b24b0afff60be35c3e876830eb522fd2acc.zip
feat(gen): teach the EF generator to preserve the Missal corrections
The four calendar corrections adopted from colitur are not in missalemeum, so re-running gen-sanctoral-ef.go silently reverted them. Warning about that in three places was the stopgap; this fixes it. The generator now carries a missalOverrides table -- slug, field, required value, and the authority for it -- applied after every harvest and collision fix-up has settled, so the Missal's value is the last word. Regenerating is now safe; hand-editing the generated file is not, and both the file's header and the generator's comment now say which way round that is. An explicit table rather than "preserve whatever the existing file had", which is how the name.<lang> preservation beside it works and would have been less code. Preserving from the file cannot distinguish a deliberate correction from staleness: if missalemeum ever fixes one of these, a preserve-from-file rule would keep overriding it forever with nobody the wiser. Naming each override with its rubric makes an obsolete one findable by reading four lines. The apply step reports "already correct upstream" when it finds one, which is the signal to retire it. It FAILS rather than warns when an override names a slug the run did not harvest. A rename upstream would otherwise drop a correction silently, which is the precise accident the table exists to prevent. TestTridentineMissalOverrides pins all four values from the other side, so a regeneration that stopped applying them fails the suite rather than only failing quietly. Mutation-tested: reverting the Assumption vigil to missalemeum's white reddens it with a message naming the cause. It also asserts the Ascension's vigil is NOT violet -- RG 128's rule is "outside Paschaltide" and that one is inside it -- so a careless "make every vigil violet" fix fails too.
Diffstat (limited to 'internal/tui/reader_test.go')
0 files changed, 0 insertions, 0 deletions