fix(library-update): fallback להורדה מלאה על כל כשל apply — הקשחה לקראת סכמה 4 - #1043
Closed
palmoni5 wants to merge 1 commit into
Closed
fix(library-update): fallback להורדה מלאה על כל כשל apply — הקשחה לקראת סכמה 4#1043palmoni5 wants to merge 1 commit into
palmoni5 wants to merge 1 commit into
Conversation
Previously only a content-hash mismatch triggered the full-download fallback. Any other PatchApplyException — most importantly a patch whose schema version is newer than the app supports — surfaced as a bare error, leaving the user in a retry loop with no way out until an app update. Now every PatchApplyException falls back to needsFullConfirmation when the plan carries a full-DB asset, with the hash-mismatch messages kept as-is and a generic message for the rest. This is the client-side half of the schema-4 rollout hardening; the planner-side gating (skipping unsupported-schema edges) lands with the updater package bump.
Member
|
ה-PR נסגר ככפול שכבר נכנס ל-dev: הקומיט המקורי b54dffb הופיע גם בתוך PR #1032 כקומיט 5676f0c (stable patch-id זהה), ו-PR #1032 מוזג ל-dev. לאחר סקירה מחדש מול dev בלבד, הושלמו תיקוני schema 4 והקשחות נוספות ישירות ב-dev בקומיט 97acf94, כולל עדכון התלות ב-otzaria_library_updater לקומיט 14c03cbff90234d43dd815717ae8a0da83041a1d, טיפול נכון בשינויים שאינם ניתנים למיפוי לספר, עדכון דלתא רב-שלבי חלקי, וגבולות cancellation/rollback בהחלפת DB מלאה. QA עצמאי: PASS ללא ממצאי P0-P3. flutter analyze עבר; 107 בדיקות library_update עברו (ודילוג Windows ייעודי אחד); Workflow Flutter Tests על dev עבר בכל 7 ה-jobs: https://github.com/Otzaria/otzaria/actions/runs/33452301796 |
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.
חלק האפליקציה במהלך סכמת patch 4 (
line_ref, Otzaria/SeforimLibrary#18): הקשחת מסלול ה-fallback כך שאף כשל apply לא ישאיר את המשתמש בלולאת שגיאה.מה השתנה
עד היום רק אי-התאמת hash (
isContentMismatch) הפעילה fallback להורדה מלאה. כלPatchApplyExceptionאחר — והחשוב שבהם: patch שסכמתו חדשה מהנתמך באפליקציה ("נדרש עדכון תוכנה") — הוצג כשגיאה חשופה, והמשתמש נשאר תקוע בנסיונות חוזרים עד שיעדכן אפליקציה.מעכשיו כל
PatchApplyExceptionמוביל ל-needsFullConfirmationכשיש DB מלא בתוכנית: הודעות ה-hash הקיימות נשמרו כמו שהן, ולשאר הכשלים הודעה כללית. נוספה בדיקת bloc לתרחיש.זה הצד ההגנתי; הצד המונע — planner שמדלג מראש על edges בסכמה לא נתמכת — מגיע עם שדרוג חבילת ה-updater (ראו תלויות).
תלויות וסדר שחרור
refשלseforim_library_updaterב-pubspec.yamlל-commit הממוזג (זה מביא את ה-planner החדש ואת תמיכת סכמה 4). אפשר כ-commit נוסף ל-PR הזה או כ-PR המשך.ה-PR הזה עצמו אינו תלוי בקוד חדש של החבילה (משתמש רק ב-API קיים), ולכן בטוח למזג גם לפני עדכון ה-ref.
צ'קליסט
pubspec.yaml: refעודכן ל-commit הממוזג