Skip to content

fix(generator): don't abort the build on unmatched generation titles#86

Merged
kdroidFilter merged 1 commit into
masterfrom
fix/seedgenerations-tolerate-unmatched
Jun 26, 2026
Merged

fix(generator): don't abort the build on unmatched generation titles#86
kdroidFilter merged 1 commit into
masterfrom
fix/seedgenerations-tolerate-unmatched

Conversation

@kdroidFilter

@kdroidFilter kdroidFilter commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Summary

seedGenerations aborted the entire generateSeforimDb pipeline via require(unmatchedTitles.isEmpty()) whenever generations.csv (ForDB) referenced a book title that isn't in the current otzaria-library. The two sources are fetched independently ("latest"), so any upstream drift (a renamed/removed book) hard-fails the whole build — e.g. "Generation CSV has 37 unmatched book title(s): מעדני יום טוב על ברכות, …".

This keeps every generation link that did match and logs a warning for the unmatched ones instead of throwing.

  • require(unmatchedTitles.isEmpty())if (unmatchedTitles.isNotEmpty()) logger.w { … }
  • Behaviour unchanged when sources are consistent (0 unmatched → no warning).

Test plan

  • generateSeforimDb completes when generations.csv references missing books (warns, doesn't abort).
  • Generation links for matched titles are still created (book_generation populated).
  • No regression when sources are in sync.

seedGenerations called require(unmatchedTitles.isEmpty()), so the whole DB
build failed whenever generations.csv (ForDB) referenced a book missing from
the current otzaria-library — an upstream drift between the two sources. Keep
every generation link that matched and log a warning for the rest instead.
@kdroidFilter kdroidFilter merged commit ef859a2 into master Jun 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant