Automattic / Automattic/wp-codebox

Preserve PHPUnit bootstrap integration process failures

Abierto Apto para principiantes
#2,467 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

## Problem

When `tests/playground-phpunit-bootstrap-failure.integration.test.ts` receives a failed recipe-run process with empty stdout, its catch path calls `JSON.parse("")`. That replaces the original CLI process failure with `SyntaxError: Unexpected end of JSON input`, hiding stderr, exit status, timeout, and command context needed to diagnose the runtime failure.

This occurred in the full smoke aggregate while verifying #2464 and #2466. The test passes standalone, so preserving the original failure is required to diagnose any recurrence under aggregate load.

## Desired outcome

Parse recipe-run output only when non-empty JSON exists. Return structured failed recipe output when available; otherwise rethrow the original process error unchanged.

## Acceptance criteria

- Empty or absent stdout does not enter `JSON.parse`.
- Structured recipe failure JSON remains the primary assertion input.
- Unstructured process failures retain their original diagnostics.
- The standalone integration and full smoke aggregate pass.

## AI assistance

GPT-5.6 Sol via OpenCode identified the masking parser after the aggregate failure and drafted this diagnostic repair under Chris Huber's direction.

Guía de contribución

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

Línea de trabajo

Comienza en tests/playground-phpunit-bootstrap-failure.integration.test.ts e inspecciona la ruta de catch que gestiona los procesos recipe-run fallidos. Ejecuta la prueba de integración independiente y el agregado completo de smoke. La tarea está terminada cuando el JSON de error estructurado sigue estando disponible, mientras que un stdout vacío o ausente conserva el error original del proceso y sus diagnósticos.

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
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Activo
Claridad
Bien especificado
Aptitud para principiantes
88/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.