Automattic / Automattic/wp-codebox

Preserve PHPUnit bootstrap integration process failures

オープン 初心者向け
#2,467 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
16
フォーク
4
平均マージ
59分
マージ済み PR(30日)
131

説明

## 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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

tests/playground-phpunit-bootstrap-failure.integration.test.ts から始め、失敗した recipe-run プロセスを処理する catch パスを調べます。単独の統合テストと完全な smoke 集約を実行します。構造化された失敗 JSON が引き続き利用可能であり、空または存在しない stdout の場合には元のプロセスエラーとその診断情報が保持されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
testing
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
活発
明瞭さ
明確に書かれている
初心者へのやさしさ
88/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。