Automattic / Automattic/wp-codebox

Preserve PHPUnit bootstrap integration process failures

Đang mở Phù hợp với người mới
#2,467 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
16
Fork
4
Merge trung bình
59 phút
Pull request đã merge (30 ngày)
131

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Bắt đầu tại tests/playground-phpunit-bootstrap-failure.integration.test.ts và kiểm tra nhánh catch xử lý các tiến trình recipe-run bị lỗi. Chạy bài kiểm thử tích hợp độc lập và bộ tổng hợp smoke đầy đủ. Hoàn tất khi JSON lỗi có cấu trúc vẫn khả dụng, trong khi stdout trống hoặc không tồn tại vẫn giữ nguyên lỗi tiến trình ban đầu và các thông tin chẩn đoán của lỗi đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
typescript
Lĩnh vực
testing
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
88/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.