Automattic / Automattic/wp-codebox
Preserve PHPUnit bootstrap integration process failures
- Langage dominant
- TypeScript
- Étoiles
- 16
- Forks
- 4
- Merge moyen
- 59 min
- PR mergées (30 j)
- 131
Description
## 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.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez dans tests/playground-phpunit-bootstrap-failure.integration.test.ts et examinez le chemin catch qui gère les processus recipe-run ayant échoué. Exécutez le test d’intégration autonome et l’agrégat smoke complet. Le travail est terminé lorsque le JSON d’échec structuré reste disponible, tandis qu’un stdout vide ou absent préserve l’erreur de processus d’origine et ses diagnostics.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- typescript
- Domaine
- testing
- Type d'issue
- Bug
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- Active
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 88/100