Repository navigation
fix(linker): reject missing targets and validate full ranges before import - #108
Merged
Merged
Conversation
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.
ב־v35, יעד LINKER שאינו קיים היה עלול להיפתר לסעיף הראשון בפרק האב: למשל
Shulchan Arukh, Yoreh De'ah 216:119הפך ל־216:1, ו־Proverbs 27:31-32ל־27:1. כך כתובת פגומה קיבלה קישור תקין למראה.מסלול LINKER משתמש כעת ברזולוציה מדויקת: מקטע קיים, או תחיליות סעיף/פרק/דף שהוכחו ברשומות ה־sidecar. אין הסרת רכיב כתובת כדי לבחור יעד חלופי. טווח מתקבל רק כששני הקצוות קיימים, שייכים לאותו ספר ומסודרים נכון. זהות שני הקצוות נבדקת מול ה־DB לפני כתיבת קישור, עוגן או טווח, כדי שכשל לא ישאיר קישור חלקי. רזולוציית Sefaria CSV נשארת ללא שינוי.
ה־recovery overlay מעתיק גם את
LinkerTargetResolution.kt, כך שההגנה נשמרת בבנייה ממקור מוצמד.אימות:
תיקון המנוע המשלים: LinkerToOtzaria PR15. יש לשלב את שני התיקונים ולבצע relink מלא ובנייה מחדש של שכבת LINKER. שינוי הייבוא לבדו אינו משחזר את שבע הפניות הפירוש ואת טווחי הפרקים שהמנוע אימת.
אין שינוי schema או שינוי ב־DB המשתמש. לא הופעל relink ולא פורסמה ספרייה. חלק מההפניות חסרות הוכחת ספר או בעלות כתובת מקור פגומה נשארות מושמטות במכוון; המדגם אינו מבטיח אפס שגיאות בכל הקורפוס.