Automattic / Automattic/wp-codebox

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

Offen
#1,014 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
16
Forks
4
Ø Merge
59 Min.
Gemergte PRs (30 T.)
131

Beschreibung

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

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Beginne am wordpress.run-php-Befehlseinstiegspunkt und bilde das Verhalten mit tests/agent-bundle-artifact-store-smoke.php und tests/agent-bundle-artifact-rebase-smoke.php nach. Verfolge, wie Exit-Codes ungleich null zu Absturzdiagnosen werden, und überprüfe anschließend, dass das Ergebnis zwischen Engine-Abstürzen, script exit 1 und Protokollfehlern unterscheidet und dabei exit code, stdout, stderr sowie eine knappe Zusammenfassung bewahrt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
php, typescript
Bereich
api, backend
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
55/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.