Automattic / Automattic/wp-codebox

Fail visual comparison when a captured document is an application error

Abierto
#2,256 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
16
Forks
4
Merge medio
59 min
PR fusionados (30 d)
131

Descripción

`wordpress.visual-compare` accepts a navigation as successful when the server responds with HTTP 200 but renders an application/runtime fatal page. The command then screenshots the error document and emits pixel-comparison evidence as though it represented the requested site.

## Reproduction

1. Serve an HTML response with status 200 whose body is a PHP fatal/error document.
2. Run `wordpress.visual-compare` against that URL.
3. Observe that navigation and screenshot capture complete without a page error.

## Expected

Before DOM snapshot or screenshot creation, visual capture should fail closed when the main-document response is unsuccessful or the rendered document is a bounded, recognized runtime-error page. Failure evidence should include the role/URL, HTTP status, and bounded reason without persisting a screenshot as valid comparison evidence. Normal page copy containing words such as “error” must remain valid.

## AI assistance

GPT-5.6 Sol via OpenCode reproduced the blind spot, traced it to the visual-compare capture boundary, and drafted this issue. Chris Huber remains responsible for the report and resulting changes.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Comienza en el límite de captura de wordpress.visual-compare y reproduce la respuesta HTTP 200 PHP fatal/error documentada. Sigue la navegación a través de la creación del DOM snapshot y la captura de pantalla; se considera terminado cuando los documentos runtime-error reconocidos fallan de forma cerrada con role, URL, status y un motivo acotado, mientras que el texto normal de la página que contiene “error” sigue siendo válido y no se persiste ninguna captura de pantalla inválida.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
typescript
Área
testing
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
48/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.