feat(dh): store the printed dibbur alongside its key (line_dh.dhDisplay) - #24
Open
palmoni5 wants to merge 3 commits into
Open
feat(dh): store the printed dibbur alongside its key (line_dh.dhDisplay)#24palmoni5 wants to merge 3 commits into
palmoni5 wants to merge 3 commits into
Conversation
Member
Author
|
ה-job |
dhText is the DhKey form — points, quote marks and edge punctuation stripped — which is right for prefix matching but unfit to show: the Otzaria client wants to list dibburim as sub-headings under the TOC, and "בראשית" is not what the page prints for "בְּרֵאשִׁית." So the extractor now returns both forms (DhExtractor.Dh) and the index stores the printed one in a new NOT NULL column, dhDisplay: tags never occur inside an accepted dibbur, whitespace is collapsed, and the same edge punctuation DhKey trims is trimmed so key and display end at the same place. Points and quote marks stay. The PK is unchanged; the column rides along as the table's first non-PK column, so line_dh becomes updatable in the patch contract (fixture updated). Schema 4 has not shipped — the latest release is the schema-3 v23→v24 delta — so no schema bump: the promotion migration is inferred from the new DB's sqlite_master and already carries the new shape. Tests: DhExtractorTest goes through a key() helper for the existing assertions and adds display cases; BuildLineDhIndexCliTest asserts the stored pair. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
palmoni5
force-pushed
the
feat/line-dh-display
branch
from
September 4, 2026 16:04
c234476 to
2f870f1
Compare
palmoni5
added a commit
to palmoni5/otzaria_library_updater
that referenced
this pull request
Sep 4, 2026
ב-SeforimLibrary (Otzaria/SeforimLibrary#24) נוספה ל-line_dh עמודה שאינה חלק מהמפתח — dhDisplay, הצורה המודפסת של הדיבור להצגה בעץ הניווט. טבלה עם עמודה שאינה PK חייבת ON CONFLICT DO UPDATE, אחרת שינוי בצורת התצוגה של דיבור קיים היה נבלע בשקט ומפיל את אימות ה-hash. המפתח לא השתנה; סכמה 4 עדיין לא שוחררה ולכן אין קפיצת סכמה. ה-fixture המשותף מתעדכן בהתאם כדי שבדיקת ה-cmp הדו-צדדית תישאר ירוקה.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
line_dh.dhTextis the normalizedDhKeyused for prefix matching, not suitable for display. The client also needs the printed dibbur, preserving points and quote marks.v26 has now shipped with DB schema 4, so adding
dhDisplaycan no longer reuse schema 4.What
DhExtractor.extractreturns both the normalized key and a display form.line_dhgainsdhDisplay TEXT NOT NULL; the primary key stays(bookId, dhText, lineIndex).patch.dbartifact format deliberately remains 4.line_dh.dhDisplayexists asTEXT NOT NULL.ALTER TABLE line_dh ADD COLUMN dhDisplay TEXT NOT NULL DEFAULT ''and ships a full
line_dhsnapshot so the synthetic default cannot survive.Companion consumer change: Otzaria/otzaria_library_updater#9. The cross-repository contract jobs compare against the companion repository's default branch, so one of the paired PRs must land (or be merged together) before both contract jobs can be green.
Verification
.\gradlew.bat :generator-common:jvmTest --no-daemonpython .github/scripts/test_manual_release_workflow.py