Skip to content

Retain complete PHPUnit failure artifacts - #2498

Merged
chubes4 merged 5 commits into
mainfrom
fix/phpunit-failure-artifacts
Sep 10, 2026
Merged

Retain complete PHPUnit failure artifacts#2498
chubes4 merged 5 commits into
mainfrom
fix/phpunit-failure-artifacts

Conversation

@chubes4

@chubes4 chubes4 commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Retain PHPUnit JUnit XML as a bounded, redacted artifact before runtime teardown on success and failure. Test-results and the manifest reference the artifact with application/junit+xml and SHA-256, while command failure responses remain bounded.

Clear prior reports before each invocation and validation path so a failed or discovery-only command cannot reuse stale testcase evidence. Capture failures retain structured diagnostics. The capture bound applies to retained output; the Playground text-read API does not itself bound allocation before reading.

Verification

  • Final head f09b8b5117990c199aa0fced150e2f2322de8742: all five GitHub checks passed.
  • Focused structured-evidence, result-path and failure-diagnostics tests passed.
  • Real failed-PHPUnit integration verifies complete failure/error identities beyond the response cap, XML metadata/digest, credential redaction and stale-report cleanup.
  • Real MDI/DME parity runs used the capture contract to retain all 1,053 testcase identities. Parent verification read and parsed both native and MySQL JUnit artifacts, including a native run with 47 failed/error identities and a passing MySQL control. These results validate evidence retention, not MDI parity.

Reproduction: normal npm ci (including postinstall), npm run build, then npx tsx tests/phpunit-structured-evidence.test.ts, npx tsx tests/phpunit-result-paths.test.ts, and npx tsx tests/playground-phpunit-readonly-cache.integration.test.ts.

Supports Automattic/markdown-database-integration#393 and #377. No release or deployment.

AI Assistance

GPT-6 Astra (openai/gpt-6-astra) and GPT-5.6 Terra (openai/gpt-5.6-terra) via OpenCode implemented and verified the capture changes. Astra reviewed stale-output handling and bounds, independently checked real native/MySQL artifacts and final CI, and finalized the PR under Chris Huber's direction.

@chubes4
chubes4 marked this pull request as ready for review September 10, 2026 19:34
@chubes4
chubes4 merged commit d4e0f71 into main Sep 10, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant