fix(storage): #106.5 — serve_blob בודק קיום ב-S3 ספציפית (לא dual disk-OR-S3) #201
Reference in New Issue
Block a user
Delete Branch "worktree-serve-blob-s3-existence-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
באג שהתגלה ב-pre-flight ל-dual
DualBackend.exists()מחזירTrueאם הקובץ על הדיסק או ב-S3.serve_blobבדקbackend.exists()ואז הנפיק presigned — כך שתחתdual, קובץ שקיים רק בדיסק (mirror שנכשל / מחוץ לסט-ההגירה) היה מקבל redirect ל-presigned-URL שמחזיר 404 מ-MinIO, במקום fallback-לדיסק.תיקון
serve_blobבודק קיום ב-S3 ספציפית:s3 = getattr(backend, "s3", backend)(DualBackend.s3, או ה-S3Backend עצמו תחתs3) — כך שקובץ disk-only נופל ל-FileResponseאמיתי. תואם-לאחור (filesystem/s3 →getattrמחזיר את ה-backend עצמו).Invariants
filesystem.בדיקות
6 (2 חדשות):
test_dual_probes_s3_subbackend_not_generic_exists(disk-only → FileResponse, לא redirect שבור) +test_dual_in_s3_uses_s3_subbackend. עוברות. py_compile OK.🤖 Generated with Claude Code