Automattic / Automattic/wp-codebox

wordpress.run-php should return structured assertion failures instead of crash diagnostics for exit 1

Aperta
#1,014 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
16
Fork
4
Merge medio
59m
PR unite (30g)
131

Descrizione

## Problem
When a PHP smoke exits non-zero because an assertion failed, WP Codebox reports:

`wordpress.run-php crashed before producing a structured response`

and wraps the failure as a Playground crash. In Data Machine PR CI this happened for normal smoke failures such as:

- `tests/agent-bundle-artifact-store-smoke.php` exiting 1 after `FAIL: secret value is not stored`
- `tests/agent-bundle-artifact-rebase-smoke.php` exiting 1 after a missing class

The stderr/stdout is present but buried inside crash diagnostics instead of a structured command result.

## Expected
`wordpress.run-php` should distinguish:

- PHP fatal/engine crash
- script assertion failure / exit 1
- structured response protocol failure

For normal non-zero script exit, return a structured result with exit code, stdout/stderr, and a concise summary so upstream runners can aggregate/report failures without treating them as sandbox crashes.

## Evidence
Data Machine PR: https://github.com/Extra-Chill/data-machine/pull/2638
Example run: https://github.com/Extra-Chill/data-machine/actions/runs/27582843874

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia dal punto di ingresso del comando wordpress.run-php e riproduci il comportamento con tests/agent-bundle-artifact-store-smoke.php e tests/agent-bundle-artifact-rebase-smoke.php. Traccia come le uscite diverse da zero diventano diagnosi di crash, quindi verifica che il risultato distingua tra crash del motore, script exit 1 e failure del protocollo, preservando exit code, stdout, stderr e un riepilogo conciso.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
php, typescript
Ambito
api, backend
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
55/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.