Automattic / Automattic/wp-codebox
Add lifecycle-aware visual parity capture for runtime state
- Lenguaje dominante
- TypeScript
- Estrellas
- 16
- Forks
- 4
- Merge medio
- 59 min
- PR fusionados (30 d)
- 131
Descripción
## Problem
Visual parity currently compares pages after a fixed elapsed duration. Runtime components can be in semantically different states at that moment: source counters may be mid-transition while an imported editable candidate intentionally materializes a deterministic terminal state. Pixel comparison then reports a product defect even though the candidate preserves the declared stable state.
## Direction
Add a generic lifecycle-aware capture contract. A recipe step should be able to declare the visual state to compare, with explicit ready/stable hooks or normalized initial/terminal state semantics, instead of relying only on elapsed wall-clock duration. Keep WP Codebox generic and framework-agnostic.
## Acceptance
- Visual compare can wait for a declared stable lifecycle state on source and candidate.
- Existing duration-based captures remain supported.
- Timeout/readiness evidence names the requested and observed state.
- Repeated dynamic-component captures are deterministic.
- Unit and recipe-runner tests cover success and timeout behavior.
## Evidence
Automattic/blocks-engine#752 documents the Weebly counter case: source capture at 4 seconds observes transient values while deterministic candidate output uses terminal values.
## AI assistance
OpenAI gpt-5.6-sol through OpenCode analyzed the parity evidence and drafted this issue. Chris Huber remains responsible for scope and implementation decisions.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Rastrea la ruta de captura de visual-compare y el recipe runner, y después inspecciona las pruebas existentes de Unit y recipe-runner. Define cómo un recipe declara un estado estable del Lifecycle mientras conserva las capturas basadas en duración. Se considera terminado cuando las capturas de Source y Candidate pueden esperar a estados solicitados y observados, e informar sobre ellos, con capturas repetidas deterministas y cobertura de éxito/timeout.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- typescript
- Área
- testing-qa, tooling
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 38/100