Automattic / Automattic/blocks-engine
Trace Figma node assets through site-plan media declarations
- Dominant language
- PHP
- Stars
- 14
- Forks
- 2
- Avg merge
- 2h 10m
- Merged PRs (30d)
- 561
Description
## Problem
Figma transforms can produce successful native-block artifacts while image-like source nodes disappear from the media contract. Existing diagnostics count missing emitted assets, but they do not establish durable lineage from a decoded Figma node through HTML emission, canonical site planning, and WordPress media materialization.
A retained generated-theme report demonstrated the blind spot: the source contained many named image, logo, map, and vector nodes, while the compiled artifact reported no image references and no local media assets. The import still reported a clean quality result because no expected node-to-asset inventory existed to compare against.
## Required contract
- Give each decoded paint/image/vector asset a stable source-node identity and provenance record.
- Carry that identity through emitted HTML/CSS asset references and the canonical WordPress site plan.
- Bind every expected visual asset to an emitted file, media publication declaration, intentional typed degradation, or loss diagnostic.
- Report expected, emitted, materialized, intentionally degraded, and missing counts with source-node attribution.
- Fail closed when an expected visible asset has no terminal disposition.
- Preserve bounded evidence without embedding binary payload bytes in reports.
## Acceptance
- Add a fixture containing raster fills, inline vectors, component-instance assets, and a missing source payload.
- Prove successful assets retain source-node lineage through materialization.
- Prove the missing payload yields a source-attributed failure rather than a clean transform.
- Preserve existing media publication and missing-asset contracts.
Related: #653, #677, Automattic/static-site-importer#533.
## AI assistance
OpenAI GPT-5.6 Sol via OpenCode was used to inspect retained Figma import evidence, map existing issue coverage, and draft this contract. Chris Huber directed the investigation and remains responsible for the issue.
Contributor guide
Research direction
Start by locating the existing media publication and missing-asset contracts, then trace the Figma decode-to-HTML, site-plan, and WordPress materialization paths. Add the requested fixture and verify source-node attribution for successful and missing assets while preserving existing contracts and bounded reports.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- backend, content
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100