ArtifactNormalizer: reaching max_files drops media still within max_media_files

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

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
66/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
php
領域
backend

調査の方向性

Start by locating ArtifactNormalizer and the loop that applies max_files and max_media_files; trace how sourceFilesBeforeGeneratedExpansions orders files before the cutoff. Use the SSI direct-artifact import scenario in the issue to check the behavior. Done means media files are admitted up to max_media_files after the non-media limit is reached, and every omitted file is still reported.

索引モデルが issue の本文から書いたものです。

説明

Problem

ArtifactNormalizer enforces two separate limits: max_files for non-media files and max_media_files for media. When a non-media file reaches max_files, the loop breaks. Every remaining raw file is omitted, including media files that are still within the max_media_files budget.

Inline style and script expansion (withInlineStyleFiles, withInlineScriptFiles, contentAddressInlineFiles) adds generated non-media files. sourceFilesBeforeGeneratedExpansions moves those generated files after the source files, but media files later in the list still fall behind the cutoff.

Evidence

Site: lloydlofthouse.com (Blogger). SSI direct-artifact import, which carries compiler_limits.max_files = 67; the artifact has 118 files.

  • The compile records file_limit_exceeded for 20 files, including website/media/Promotion-Cover-*.jpg and website/media/mqdefault.jpg.
  • Those images are referenced only by related-post cards. They resolve through MissingMediaRecovery to the placeholder token asset-667e3e6f8f8bfd37. They never reach the theme or uploads in the Studio import.
  • With #6315 (related-card featured images), 8 of 12 card posts get that placeholder token. resolveFeaturedImageTargets then drops their featured images, so those posts import without thumbnails.

Expected

Reaching the non-media max_files limit only stops non-media files. Media files keep being admitted up to max_media_files, and each dropped file is still reported.


AI disclosure: Claude (Anthropic) via Pi/Roadie in Franklin's workspace traced this with instrumented compiles of the SSI artifact and wrote this issue. Chris directed the work.

主要言語
PHP
スター
28
フォーク
5
平均マージ
2時間 59分
マージ済み PR(30日)
942

環境構築

はじめの一歩

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

Automattic/blocks-engine のほかの issue

Automattic/blocks-engine の issue をすべて見る

似ている issue

PHP の issue をもっと見る

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

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