Preserve canonical content when a custom-layout move fails
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 38/100
Hướng nghiên cứu
Bắt đầu trong inc/class-wp-markdown-storage.php tại WP_Markdown_Storage::write_profile_post(), đặc biệt là chuỗi di chuyển custom-layout quanh các dòng 910-924. Theo dõi staging, việc publish đến đích, việc dọn dẹp đường dẫn cũ, lập chỉ mục đường dẫn và các receipt của đường dẫn đã thay đổi, sau đó bổ sung coverage lỗi xác định cho việc publish, dọn dẹp và thay thế thư mục. Hoàn tất khi các tiêu chí chấp nhận được đáp ứng mà không mất nội dung, không có bản trùng lặp và không có trạng thái cuối không nhất quán.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
The custom content-layout move path stages the replacement, deletes the old canonical file, and only then renames the staged file into place. If the final rename fails, the old file has already been removed and the staged file is discarded, leaving no canonical copy.
Relevant implementation: WP_Markdown_Storage::write_profile_post() in inc/class-wp-markdown-storage.php, around lines 910-924.
This violates the canonical durability contract required by the database-independent engine in #232.
Required outcome
- Make custom-layout moves recoverable across the old-path and new-path publication boundary.
- Preserve at least one complete canonical copy when publication or cleanup fails.
- Bind staging and commit to the same verified destination directory identity.
- Keep path indexing and changed-path receipts consistent with the terminal filesystem state.
- Add deterministic failure injection around destination publication and old-path cleanup.
Acceptance criteria
- A failed destination rename leaves the original canonical post intact.
- A successful move leaves exactly one canonical post at the selected route and removes the stale route.
- Retry after an interrupted move converges without content loss or duplicate durable identities.
- Directory replacement between staging and commit fails closed.
AI assistance
GPT-5.6 Sol via OpenCode reviewed the custom-layout publication sequence, identified the delete-before-publish failure mode, and helped structure this issue and its acceptance criteria. Chris Huber directed the review and issue creation.
- Ngôn ngữ chính
- PHP
- Star
- 8
- Fork
- 1
- Merge trung bình
- 22 giờ 28 phút
- Pull request đã merge (30 ngày)
- 15
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Automattic/markdown-database-integration
-
Hybrid multisite: route one blog's tables to the native engine while the network stays on MySQLĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 8/100
Automattic/markdown-database-integration#462 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Automattic/markdown-database-integration#424 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 78/100
Automattic/markdown-database-integration#420 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Native scans use memory proportional to row count, and retired generations are never collectedĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Automattic/markdown-database-integration#415 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 78/100
Automattic/markdown-database-integration#414 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Automattic/markdown-database-integration
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Recognise PHP_CodeSniffer (`phpcs`) as a linterCó thể đã có người làm @HarshRajSinghania đã nhận hôm nay. Đang mởenhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
MustacheCase/zanadir#507 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
humanmade/query-filter#76 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
jwage/phpamqplib-messenger#163 ·