Automattic / Automattic/blocks-engine

Surface and bound oversized artifact report files instead of silently ignoring them

Open
#1,242 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
14
Forks
2
Avg merge
2h 10m
Merged PRs (30d)
561

Description

## Symptom

During the same Studio import of https://www.360chiro.co.uk/ (16-route Wix capture), the Data Liberation capture wrote `semantic-evidence.json` at **16,230,577 bytes** into the artifact `files` list. `ArtifactNormalizer` rejected it against `max_file_bytes` (10,485,760):

```json
{
"code": "artifact_file_too_large",
"severity": "warning",
"message": "An artifact file was ignored because it exceeds the per-file byte limit.",
"context": {"path": "semantic-evidence.json", "bytes": 16230577, "max_file_bytes": 10485760}
}
```

The warning only exists deep inside a ~419MB `composed-result.json` intermediate; the import completed "success" and nothing surfaced to the operator. Whatever consumes the semantic evidence downstream operated without it for the whole site.

## Why this is worth a look

- The producer (Data Liberation) and consumer (compiler) disagree: the artifact itself declared `compiler_limits.max_file_bytes = 10485760` and then shipped a 16MB member file. Either the producer should honor its own declared limits (shard/prune evidence), or the compiler should handle oversized evidence/report files differently from page/media payloads (they are ancillary, not materialized content).
- Dropping an entire evidence file is an all-or-nothing failure for a file whose content is a list — partial admission (or streamed consumption) would degrade gracefully.
- The severity/surfacing question generalizes: a silently ignored input file that changes conversion quality site-wide should be loud, not a warning in an intermediate blob.

Note: I could not causally tie this drop to specific conversion regressions in this run (layout-geometry omission counts are produced at capture time), so this is filed as an observed producer/consumer inconsistency plus a surfacing gap, not as the root cause of a specific defect.

Contributor guide

Open the contributing guide

Research direction

Start by tracing ArtifactNormalizer handling of semantic-evidence.json against compiler_limits.max_file_bytes, and inspect how its warning is buried in composed-result.json. Reproduce the reported oversized file case and define behavior that preserves or clearly surfaces ancillary evidence; done means the operator can see the impact and the producer/consumer limit mismatch is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.