Preserve canonical content when a custom-layout move fails
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 38/100
調査の方向性
inc/class-wp-markdown-storage.php の WP_Markdown_Storage::write_profile_post() から始め、特に 910-924 行付近の custom-layout の移動シーケンスを確認します。staging、宛先への公開、古いパスのクリーンアップ、パスのインデックス作成、変更されたパスのレシートを追跡し、その後、公開、クリーンアップ、ディレクトリ置換に対する決定論的な失敗カバレッジを追加します。コンテンツの損失、重複、不整合な終端状態なしに受け入れ基準を満たせば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- PHP
- スター
- 7
- フォーク
- 1
- 平均マージ
- 1日 4時間
- マージ済み PR(30日)
- 12
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Automattic/markdown-database-integration のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
Automattic/markdown-database-integration#424 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
Automattic/markdown-database-integration#420 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
Automattic/markdown-database-integration#415 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
Automattic/markdown-database-integration#414 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
Automattic/markdown-database-integration#401 ·
メンテナーはふだん 1 日以内に返信
Automattic/markdown-database-integration の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
backdrop-contrib/print#58 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
laravel/nova-issues#7008 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
FriendsOfFlarum/badges#20 ·
-
[Dashboard Redesign] Support and Documentation links should warn they'll be opened in another tabオープンModule: dashboard type: enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信