Skip to content

[Parallel] Report the error limit only when reached - #8844

Merged
TomasVotruba merged 1 commit into
rectorphp:mainfrom
alfredbez:fix/parallel-timeout-error-limit
Oct 26, 2026
Merged

TomasVotruba merged 1 commit into
rectorphp:mainfrom
alfredbez:fix/parallel-timeout-error-limit

Conversation

@alfredbez

@alfredbez alfredbez commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

A worker timeout currently also reports Reached system errors count limit of 50, even when processing just one file. The error callback sets the limit flag unconditionally.

Set the flag from the actual error count. Workers still stop immediately, the command still fails, and the timeout and missing-results diagnostics remain unchanged.

The CLI regression covers both a single timeout below the limit and 49 syntax errors followed by a timeout that reaches it. It reuses the existing syntax-error fixtures. The original implementation fails the first case; an unconditional false fails the second.

Validated on Linux with PHP 8.4.27:

  • composer complete-check
  • php vendor/bin/phpunit tests/Bin tests/Parallel: 18 tests, 30 assertions
  • Existing parallel-system-errors-limit and parallel-unfinished-jobs E2E tests

No change to worker shutdown or child-exit error accounting.

CI note

47 checks passed and one was skipped. The remaining rector_laravel_rector_dev failure also occurs on the exact base commit, with the same fatal visibility error in DispatchToHelperFunctionsRector::getClassReflection():

Both job logs resolve the same 62 package versions, including rector/rector dev-main eda83bd. This workflow tests rector-laravel against the published Rector package and does not check out this PR source. No Laravel changes are included here.

Keep worker shutdown unchanged; derive its diagnostic flag from the error count.

Amp-Thread-ID: https://ampcode.com/threads/T-01a16d84-bc27-70ae-85cc-28b404cfd024
Co-authored-by: Amp <amp@ampcode.com>
@TomasVotruba
TomasVotruba merged commit 19f91dc into rectorphp:main Oct 26, 2026
48 of 49 checks passed
@TomasVotruba

Copy link
Copy Markdown
Member

Thank you 👍

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants