Repository navigation
Port upstream #94, #96, #97, #98, #99 - #74
Merged
Merged
Conversation
Y-PLONI
force-pushed
the
fix/sefaria-section-names-upstream96
branch
from
October 8, 2026 11:32
f01da6b to
3d5f7b2
Compare
- AGP 8.12.3 -> 9.1.1: AGP 8.x relies on a Gradle internal API removed
in 9.6 and fails to apply. Switch core/dao to the android {} KMP DSL.
- Replace deprecated IndexSearcher.search(Query, Collector) with a
CollectorManager in LuceneSearchEngine.computeFacets.
- Bump SeforimMagicIndexer (Gradle 9.8.0 upgrade).
Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com>
(cherry picked from commit 8a61325)
AGP 9.1.1 (from the Gradle 9.8.0 upgrade) refuses Gradle older than 9.3.1, so the release and delta-diff checks now expect 9.8.0.
Nothing in dao uses it, tests included, yet it reached every consumer's runtime classpath, the app's release build among them. Signed-off-by: Elie G. <elyahou.hadass@gmail.com> (cherry picked from commit 7de71c0)
…ew headings Port of kdroidFilter#96 (upstream 773fcc9) onto our mapSectionNameToHebrew, which already covered part of it (7c0f0ff). - Add the names still leaking from blank heSectionNames: DH, Pararaph, Passuk, Footnote, Tosefta, Midrash, Drush, Remez, Inyan, Mitzvah, Piyyut, Hadran, Kovetz, Gate/Sha'ar, Essay, Statement, Letter, Chamber, Window, Book. - Treat "Integer" as an unnamed level: its headings are the bare number. - Normalize input (lowercase, trim quotes/spaces) as upstream does. - Keep our values where they differ (Word, Treatise, Maayan, Manuscript, Vav); generic English words are matched exactly, not as substrings.
…texts Sefaria types the Otzar La'azei Rashi -> Rashi on X rows as `commentary`. The dictionary has no `dependence` while Rashi does, so the dependence asymmetry made the dictionary Rashi's base, and it showed up in Rashi's sources panel (and as a commentator on the Talmud in the other direction). Flag books whose top-level Sefaria category is `Reference` and store oriented links between a reference work and a non-reference book as REFERENCE. Links inside the reference category (Hafla'ah she-ba'Arakhin on Sefer HeArukh) keep their orientation. Fixes kdroidFilter/Zayit#503 Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com> (cherry picked from commit ef17510)
Sefaria ships some authors with an empty `he` title (e.g. Nissim Chaim Moshe Mizrachi, author of Admat Kodesh), so the book got a blank author. 11 authors / 16 books are affected in the current export. Resolve the name from the `he` title, else a Hebrew override keyed by the Sefaria topic slug, else the English name; drop authors with no name. Fixes kdroidFilter/Zayit#444 Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com> (cherry picked from commit c01360c)
Sefaria titles the Maharsha's commentaries "חידושי הלכות/אגדות על <מסכת>", and the app lists a commentary by its title without " על <base book>", so the reader saw "חידושי אגדות" with no hint it is the Maharsha. Prefix the display title with "מהרש\"א - " for the Chidushei Halachot and Chidushei Agadot collections (45 books). heTitle stays the natural key, so book ids are unchanged and the delta ships plain upsert_book rows. Fixes kdroidFilter/Zayit#440 Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com> (cherry picked from commit 3e74fb1)
AGP 8.12.3 (trees before the Gradle 9.8.0 upgrade) fails on Gradle 9.8, and AGP 9.1.1 needs Gradle >= 9.3.1, so one fixed durable Gradle cannot build both an old baseline/source_commit and the current tree. select_gradle_toolchain.sh reads the tree's gradle-wrapper.properties distributionUrl, picks /opt/otzaria-cache/toolchains/gradle-<ver>/bin/gradle, fails if it is missing, and checks that --version reports exactly <ver>. GRADLE now names that binary for every durable-host Gradle run (both workflows and patch_fan_lib.sh); durable hosts still never use ./gradlew or download a distribution, and ARM64 keeps ./gradlew + the setup actions. - delta-real-diff-test: copy the selector into $RUNNER_TEMP before any checkout switch and re-select after the baseline checkout and after the restore of the head tree. - manual-generate-release: run it from .pipeline-control (the workflow revision), since source_commit may predate it.
…r title ForDB generation and metadata rows match books by exact title, and an unmatched row is only a warning. Now that the Maharsha's commentaries are shown as "מהרש\"א - <heTitle>", a ForDB still keyed by heTitle would drop their generations and descriptions without failing anything. Before writing, seedGenerations and seedAllMetadata (and so validateForDbInputs) now fail when an unmatched row's title is the heRef of a book whose title differs from it and the same file has no row under that book's current title. Exact matching only; rows with titles the DB does not know yet (a candidate ForDB checked against an older released DB) still just warn.
Y-PLONI
force-pushed
the
fix/sefaria-section-names-upstream96
branch
from
October 8, 2026 14:31
7e03081 to
36164f0
Compare
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.
חלק 1 — Gradle 9.8.0 (פורט של kdroidFilter#94, 8a61325)
הקומיטים לפי סדר upstream: קודם kdroidFilter#94 (29/09), אחריו kdroidFilter#96 (08/10).
5ccc6a2fbuild: Gradle 9.1.0 → 9.8.0, AGP 8.12.3 → 9.1.1 (androidLibrary {}→android {}ב-core/dao), submodule SeforimMagicIndexer → a5a0245b, ו-computeFacetsב-LuceneSearchEngine עובר ל-CollectorManager (אותה התנהגות).596b21a3ci: בדיקות "Verify durable Gradle" ב-manual-generate-release.ymlו-delta-real-diff-test.ymlדורשות 9.8.0 (AGP 9.1.1 מסרב ל-Gradle < 9.3.1), ועדכוןtest_manual_release_workflow.py+ הערה ב-ci.yml.אימות:
./gradlew :sefariasqlite:jvmTest :dao:jvmTest :core:jvmTestעל 9.8.0 — ירוק;python3 .github/scripts/test_manual_release_workflow.py— 72 OK. (בבדיקה קודמת:allTestsמלא על 9.8 — 1239 עברו.)חלק 2 — שמות מקטעים (פורט של kdroidFilter#96)
פורט של kdroidFilter#96 (upstream
773fcc9f) — רק החלק שעדיין חסר אצלנו; חלק מהתיקון כבר קיים אצלנו מ־7c0f0ff.מה השתנה
mapSectionNameToHebrew— שרשרתwhenאחת, בלי כפילויות:integer→null,ot,dh→ דיבור המתחיל,vav.SefariaBookPayloadReader— אותו מנגנון כמו ב־upstream: שם מקטע nullable (List<String?>). רמה מסוג "Integer" מקבלת כותרת עם המספר בלבד (א) במקוםInteger א.SefariaSectionNameMappingTest— הטסט של upstream, מותאם לערכים שלנו.מה נשאר כמו אצלנו (במכוון)
SefariaEnglishSectionNamesTest).ALIYAH_SECTION_LABELלא השתנה.השוואת מיפוי ישן מול חדש (כל שמות המקטעים ב־export)
נבדקו 93 שמות
sectionNamesייחודיים, מתוך 6,603 קובצי schema ב־build/inputs/sefaria-extract/schemas. ההשוואה הריצה את הפונקציה הישנה (origin/otzaria) ואת החדשה על כל שם. לאף שם שכבר מופה בעבר לא השתנה הערך העברי. ההבדלים היחידים הם שמות שעד עכשיו עברו כמו שהם באנגלית:אף אחד מהשמות האלה לא משמש כ־childLabel של alt-structure בלי שם עברי, ולכן אין שינוי ב־alt-TOC.
השפעה צפויה על ה־DB: רק שורות כותרת (וה־TOC שלהן) בספרים שבטבלה, שבהן מילה אנגלית מתחלפת בעברית או במספר בלבד. זה שינוי תוכן רגיל, והדלתא מטפלת בו. אין שינוי סכמה ואין צורך ב־regeneration מיוחד.
לא נכלל: באג ה־daf/מספרים בדקדוקי הטעמים, שהוא נושא נפרד.
אימות
620 טסטים, 0 כשלונות. זה כולל את
SefariaEnglishSectionNamesTestהקיים ואתSefariaSectionNameMappingTestהחדש.חלק 3 — PR-97, kdroidFilter#98, kdroidFilter#99 (cherry-pick -x מ-upstream, לפי הסדר)
c7f42d4bReference) לספר שאינו עיון → REFERENCE, בלי כיווןtopCategoryEn/authorKeys) — נשמרו שני הצדדים. הלוגיקה והטסט כמו upstream44692ba5heריק → מפת slug (11) → שם אנגליSefariaAuthorNames.kt+ טסט כמו upstream; ה-hunk ב-Reader הועבר ידנית לבלוקauthorEntriesשלנו (שומר עלdisplayName/authorMatchKeys)7e030817מהרש"א -לפני כותרות Chidushei Agadot/Halachotאימות — בנייה מקומית A/B (ספריא בלבד, ייצוא
2026-10-04_15-15-37201295323-1= קלט v31, buildstate של v31)A =
origin/otzaria(64562fb), B = קצה ה-PR. השוואה מלאה A↔B:hasReference+6 (רש"י על תרי עשר),hasCommentary−2 (מחברת מנחם, אוצר לעזי רש"י),hasSource−2 (אוצר לעזי רש"י, ספר הערוך).מהרש"א - <heTitle>; heRef ו-ids ללא שינוי../gradlew allTests: 1,251 עברו, 0 נכשלו.ForDB ממופתח לפי
book.titleמדויק: בלי Otzaria/otzaria-library#105, 68 ספרי המהרש"א מאבדים את התיאורים המעודנים (sefaria_metadata_changes.csv) ואת קישור הדור (book_info.csv). kdroidFilter#105 מחזיק זמנית שתי השורות (ישן+חדש), כך שהוא בטוח למיזוג לפני/אחרי PR זה.ראשי תיבות:
carryAcronymsAcrossRenamesאמור לשאת אותם (אותו id,isSameWorkTitleמתקיים, אין התנגשות כותרות) — נבדק בקוד ובנתונים, לא בריצה מלאה.עדכון: סדר כרונולוגי, בחירת Gradle לפי עץ, ושער ForDB
סדר הקומיטים (ישן→חדש):
2ca637f9Gradle 9.8.0 (upstream 8a61325) ·bc009750ci: Gradle 9.8.0 ·f57d4313fix(dao): drop kotlinx-coroutines-test (upstream 7de71c0, 07/10) ·053b278dkdroidFilter#96 ·5a1ba0ddPR-97 ·5bdbd9bfkdroidFilter#98 ·3582a2d3kdroidFilter#99 ·c6e2444d(B) ·36164f0a(C).העץ שלפני B/C זהה לקצה הקודם (
7e030817) למעט השורה האחת ב-dao/build.gradle.kts.B —
ci(release): Gradle לפי העץ שנבדק. עצים ישנים (AGP 8.12.3) נכשלים על Gradle 9.8 ("Failed to apply plugin com.android…multiplatform.library"), ועצים חדשים (AGP 9.1.1) דורשים ≥9.3.1..github/scripts/select_gradle_toolchain.shקורא אתdistributionUrlמ-gradle-wrapper.propertiesשל העץ (התאמה מדויקתgradle-<ver>-(bin|all).zip), בוחר/opt/otzaria-cache/toolchains/gradle-<ver>/bin/gradle, נכשל אם התיקייה חסרה, ומוודא ש---versionמחזיר בדיוק<ver>. כל קריאת Gradle במארחים הקבועים עוברת דרך$GRADLE(שני ה-workflows ו-patch_fan_lib.sh); עדיין בלי./gradlewובלי הורדה. ARM64 ללא שינוי.delta-real-diff-test: הסקריפט מועתק ל-$RUNNER_TEMPלפני החלפת checkout (ייתכן שעץ ה-baseline לא מכיל אותו), ונבחר מחדש אחרי ה-checkout של ה-baseline ואחרי החזרה ל-head.manual-generate-release: רץ מ-.pipeline-control(גרסת ה-workflow), כי ייתכן ש-source_commitקודם לו.C —
fix(sefariasqlite): שער אי-התאמה ל-ForDB.seedGenerationsו-seedAllMetadata(וכך גםvalidateForDbInputs) נכשלים לפני כל כתיבה כששורת ForDB לא-מותאמת נושאת את ה-heRefשל ספר שהכותרת שלו שונה ממנו, ובאותו קובץ אין שורה לכותרת הנוכחית של הספר. ההתאמה מדויקת. שורות בכותרת חדשה מול DB ישן (CI של otzaria-library מול v31) נשארות אזהרה בלבד, ולכן אין מבוי סתום. ב-kdroidFilter#105 במצבו הנוכחי (שתי השורות) השער עובר; ב-ForDB הנוכחי (רק כותרות ישנות) השער נכשל ומונה את ספרי המהרש"א.אימות
./gradlew allTestsירוק (1,259 טסטים, 0 כשלים);ForDbTitleGateTestעם 9 טסטים, כולל DB עם כותרות ישנות מול ForDB עם כותרות חדשות (עובר עם אזהרות)..github/scripts/test_*.pyכולם OK (כולל טסטים חדשים שמריצים את הבורר ואת שלבי ה-delta מול toolchains מזויפים).otzaria-db(checkouts אמיתיים):64562fbb(otzaria) → Gradle 9.1.0,helpהצליח;7e030817→ Gradle 9.8.0,helpהצליח; בדיקה הפוכה (עץ ישן עם 9.8.0) נכשלה כצפוי ב-"Failed to apply plugin"; גרסה חסרה (9.9.9) →::error::, ושום דבר לא נכתב ל-GITHUB_ENV.