Automattic / Automattic/blocks-engine

Consume runtime presentation evidence for post-load image wells

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

Description

## Problem
Static artifact compilation sees authored HTML/CSS but not post-load runtime image transforms. In the Weebly Team surface, source JavaScript measures decoded image dimensions and applies a scale transform inside fixed clipped wells. The candidate has the same assets and bounds, but any static CSS substitute (`object-fit` or inferred transforms) uses a different Chromium compositor path and leaves 127,506 mismatch pixels.

## Direction
Define a generic optional browser-derived presentation evidence contract for artifact compilation. Evidence should bind source elements/assets to observed post-load computed image geometry and transform state with source hashes, viewport, browser revision, and lifecycle readiness. The compiler may consume proven evidence to project deterministic editable image presentation; static-only compilation remains unchanged.

## Acceptance
- Artifact schema can carry bounded runtime presentation observations for media wells.
- Observations include selector/identity, source asset hash, intrinsic and rendered dimensions, transform matrix/origin, clip bounds, viewport, browser revision, and readiness state.
- Compiler validates provenance before applying observations.
- Native/editable output consumes valid observations without fixture selectors.
- Missing/stale/mismatched evidence is diagnosed and ignored.
- Contract tests cover application and rejection.
- The mrfoxtalbot Team surface can be replayed through the runtime-evidence path.

## Evidence
Automattic/blocks-engine#746. r67: `/var/folders/lr/c_cmmt7s0592m4njz99v5yb40000gn/T/opencode/weebly-four-surface-direct-r67/visual-compare/mrfoxtalbot-weebly/team/`. Source and candidate asset hashes and visible bounds match; mismatch is isolated to source runtime compositor sampling.

## AI assistance
OpenAI gpt-5.6-sol through OpenCode analyzed r62-r68 evidence and drafted this issue. Chris Huber remains responsible for scope and implementation decisions.

Contributor guide

Open the contributing guide

Research direction

Start with Automattic/blocks-engine#746 and the mrfoxtalbot Team replay evidence at the referenced visual-compare path, then trace the artifact compiler and runtime-evidence entry points. Done means the schema, provenance checks, application and rejection contract tests, and the Team replay all satisfy the listed acceptance criteria without changing static-only compilation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system, testing, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.