ArtifactNormalizer: reaching max_files drops media still within max_media_files
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 66/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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_exceededfor 20 files, includingwebsite/media/Promotion-Cover-*.jpgandwebsite/media/mqdefault.jpg. - Those images are referenced only by related-post cards. They resolve through
MissingMediaRecoveryto the placeholder tokenasset-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.
resolveFeaturedImageTargetsthen 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.
- Dominant language
- PHP
- Stars
- 28
- Forks
- 5
- Avg merge
- 2h 59m
- Merged PRs (30d)
- 942
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Automattic/blocks-engine
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Automattic/blocks-engine#6318 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Automattic/blocks-engine#4943 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Automattic/blocks-engine#4942 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Automattic/blocks-engine#4921 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Automattic/blocks-engine#775 ·
Maintainers usually reply within 1 day
All issues in Automattic/blocks-engine
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
TYPO3-Solr/ext-solr#4850 ·
Maintainers usually reply within 2 days
-
[Sync EN] stream: document the errors of the stream_context_*() and stream filter functions (#6091)Opensync-en
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
[Sync EN] stream: document the errors of the stream_context_*() and stream filter functions (#6091)Opensync-en
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
Перевод устарел
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
glpi-project/glpi#26353 · 2 comments ·
Maintainers usually reply within 1 day