Skip to content

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

@chubes4

Description

@chubes4

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: Extra-Chill/data-machine#2638
Example run: https://github.com/Extra-Chill/data-machine/actions/runs/27582843874

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions