Skip to content

fix(ci): PHPUnit batching silently omits most tests on PHP 8.2, 8.4 and 8.5 #1839

Description

@superdav42

Confirmed CI false-green: PHPUnit 9 ignores most filenames in each batch

Priority: high. The PHP 8.2, 8.4, and 8.5 matrix jobs silently omit most test files while reporting success. This is test-discovery omission, not PHPUnit's explicit skipped-test status.

Evidence

Observed on PR #1838, head a20cb1c, Unit & Integration Tests run:

https://github.com/Ultimate-Multisite/ultimate-multisite/actions/runs/34410684512

Each completed non-coverage job contains nine PHPUnit summaries with test counts 7, 2, 5, 9, 15, 4, 62, 7, 2, totaling 113 tests / 224 assertions, taking only about 12–13 seconds in its actual PHPUnit step.

  • PHP 8.2 job: 102664312071
  • PHP 8.4 job: 102664312004
  • PHP 8.5 job: 102664312006

The workflow .github/workflows/tests.yml:110-116 executes:

find tests -name '*_Test.php' -type f -print0 | xargs -0 -r -n 50 vendor/bin/phpunit

The installed PHPUnit is 9.6.34. Its CLI parser (vendor/phpunit/phpunit/src/TextUI/CliArguments/Builder.php:235) assigns $argument = $options[1][0]: only the first positional test path is selected. Passing 50 independent filenames does not create a 50-file suite. The comment claiming every file runs is false.

PHP 8.3 instead runs configured full-suite PHPUnit with Xdebug coverage (tests.yml:118-123), explaining much of the timing asymmetry. Do not reduce its coverage to conceal the discrepancy. At inspection time it was still in the coverage test step, so no final PHP 8.3 counts are claimed here.

Implementation scope

  • Fix non-coverage test batching in .github/workflows/tests.yml using supported PHPUnit 9 suite discovery: one file per invocation as a minimal correctness fix, or explicit XML suites for bounded multi-file batches if overhead makes that necessary.
  • Preserve configured includes/excludes, test suffixes, failure exit propagation, and the original memory-bound execution intent. Inspect phpunit.xml.dist before choosing discovery rules; do not assume the current find glob equals configured discovery.
  • Add an execution/discovery accounting guard so silently running a small fraction of the intended suite cannot go green again. Keep it proportional rather than adding a new CI framework.
  • Include new tests in the expected set; specifically ensure a test file in a non-first batch position is actually executed.
  • Scope coverage optimization separately; do not weaken assertions or ignore newly exposed failures. Check pipeline failure propagation for existing shell defaults rather than assuming it is broken.

Verification

Use at least two small test files whose second file intentionally fails in a disposable fixture to prove the runner cannot ignore non-first entries. Then verify expected versus executed file/test counts against normal PHPUnit discovery on the repository, and run the repaired matrix for PHP 8.2–8.5. Keep memory bounded and ensure any batch failure fails the job. No edits to vendor parser are needed.

Deduplication: checked open PHPUnit issues and PR #1806's file list. Existing bootstrap/deprecation and quality-baseline work does not fix this workflow command. Earlier batching PR #1792 introduced the intended memory workaround; inspect its history for context rather than treating the current small green runs as full compatibility evidence.


aidevops.sh v3.32.317 plugin for OpenCode v1.18.30 with gpt-6-astra spent 8h 7m and 637,995 tokens on this with the user in an interactive session.

CI Repair Feedback (from PR #1842)

The previous worker's PR #1842 had terminal failed CI checks. A head-bound
finalizer is routing this issue for redispatch. The next worker should address these failures.

Terminal failed checks

  • PHP 8.4: failure — check URLprimary failing-check evidence
  • PHP 8.5: failure — check URLprimary failing-check evidence
  • PHP 8.2: failure — check URLprimary failing-check evidence

Worker guidance

  1. Recover the previous PR branch/commits and continue that work; do not restart from scratch.
  2. Read every terminal check URL above and preserve the accumulated evidence.
  3. Rebase the recovered work onto current origin/main, then fix the code rather than weakening CI.
  4. Run every listed local check and create the replacement PR from the recovered branch.

Routed by deterministic merge pass (pulse-merge.sh).

In-place repair fallback

  • Reason: the bounded PR-branch repair session exhausted its retry budget
  • Retry: re-run the deterministic merge pass after restoring access to branch feature/auto-20260909-173645-gh1839; keep PR GH#1839: fix(ci): verify PHPUnit batch reports #1842 open until that retry is impossible.

In-place repair attempt outcomes

  • Attempt 1: result=launch_failed; failure_reason=worktree_failed; next_action=retry_launch
  • Attempt 2: result=launch_failed; failure_reason=worktree_failed; next_action=retry_launch

CI Repair Feedback (from PR #1843)

The previous worker's PR #1843 had terminal failed CI checks. A head-bound
finalizer is routing this issue for redispatch. The next worker should address these failures.

Terminal failed checks

  • PHP 8.5: failure — check URLprimary failing-check evidence
  • PHP 8.4: failure — check URLprimary failing-check evidence
  • PHP 8.2: failure — check URLprimary failing-check evidence

Worker guidance

  1. Recover the previous PR branch/commits and continue that work; do not restart from scratch.
  2. Read every terminal check URL above and preserve the accumulated evidence.
  3. Rebase the recovered work onto current origin/main, then fix the code rather than weakening CI.
  4. Run every listed local check and create the replacement PR from the recovered branch.

Routed by deterministic merge pass (pulse-merge.sh).

In-place repair fallback

  • Reason: the bounded PR-branch repair session exhausted its retry budget
  • Retry: re-run the deterministic merge pass after restoring access to branch feature/auto-20260909-173645-gh1839; keep PR fix(ci): run every PHPUnit test file #1843 open until that retry is impossible.

In-place repair attempt outcomes

  • Attempt 1: result=process_exit; failure_reason=headless_outcome_missing; next_action=inspect_terminal_outcome
  • Attempt 2: result=process_exit; failure_reason=headless_outcome_missing; next_action=inspect_terminal_outcome

CI Repair Feedback (from PR #1844)

The previous worker's PR #1844 had terminal failed CI checks. A head-bound
finalizer is routing this issue for redispatch. The next worker should address these failures.

Terminal failed checks

  • PHP 8.4: failure — check URLprimary failing-check evidence
  • PHP 8.2: failure — check URLprimary failing-check evidence
  • PHP 8.5: failure — check URLprimary failing-check evidence

Worker guidance

  1. Recover the previous PR branch/commits and continue that work; do not restart from scratch.
  2. Read every terminal check URL above and preserve the accumulated evidence.
  3. Rebase the recovered work onto current origin/main, then fix the code rather than weakening CI.
  4. Run every listed local check and create the replacement PR from the recovered branch.

Routed by deterministic merge pass (pulse-merge.sh).

In-place repair fallback

  • Reason: the bounded PR-branch repair session exhausted its retry budget
  • Retry: re-run the deterministic merge pass after restoring access to branch feature/auto-20260909-173645-gh1839; keep PR GH#1839: fix(ci): run every PHPUnit test file #1844 open until that retry is impossible.

In-place repair attempt outcomes

  • Attempt 1: result=process_exit; failure_reason=headless_outcome_missing; next_action=inspect_terminal_outcome
  • Attempt 2: result=process_exit; failure_reason=headless_outcome_missing; next_action=inspect_terminal_outcome

CI Repair Feedback (from PR #1845)

The previous worker's PR #1845 had terminal failed CI checks. A head-bound
finalizer is routing this issue for redispatch. The next worker should address these failures.

Terminal failed checks

  • PHP 8.4: failure — check URLprimary failing-check evidence
  • PHP 8.2: failure — check URLprimary failing-check evidence

Worker guidance

  1. Recover the previous PR branch/commits and continue that work; do not restart from scratch.
  2. Read every terminal check URL above and preserve the accumulated evidence.
  3. Rebase the recovered work onto current origin/main, then fix the code rather than weakening CI.
  4. Run every listed local check and create the replacement PR from the recovered branch.

Routed by deterministic merge pass (pulse-merge.sh).

In-place repair fallback

  • Reason: the bounded PR-branch repair session exhausted its retry budget
  • Retry: re-run the deterministic merge pass after restoring access to branch feature/auto-20260909-173645-gh1839; keep PR GH#1839: fix(ci): retry killed PHPUnit suites #1845 open until that retry is impossible.

In-place repair attempt outcomes

  • Attempt 1: result=process_exit; failure_reason=headless_outcome_missing; next_action=inspect_terminal_outcome
  • Attempt 2: result=process_exit; failure_reason=headless_outcome_missing; next_action=inspect_terminal_outcome

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-dispatchbugSomething isn't workingorigin:workerAuto-created by pulse labelless backfill (t2112)priority:highHigh severity — significant quality issuesource:ci-feedbackIssue carries CI failure feedback routed from a closed worker PRstatus:availableTask is available for claimingtier:standardAuto-created by pulse labelless backfill (t2112)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions