Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Preserve canonical content when a custom-layout move fails

オープン
#260 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
php
領域
backend, databases

調査の方向性

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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Automattic/markdown-database-integration のほかの issue

Automattic/markdown-database-integration の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。