Skip to content

Skip fork-dependent scenarios without pcntl and test the fallback - #8

Merged
swissspidy merged 1 commit into
mainfrom
claude/eager-cerf-n46bjx
Nov 18, 2026
Merged

swissspidy merged 1 commit into
mainfrom
claude/eager-cerf-n46bjx

Conversation

@swissspidy

@swissspidy swissspidy commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

CI started failing once the Behat scenarios began running in Docker containers whose PHP lacks pcntl (failing run). The root cause is fixed in wp-cli/wp-cli-tests by installing pcntl in the image (wp-cli/wp-cli-tests PR from branch claude/eager-cerf-n46bjx).

This PR makes the suite here cope with an environment that has no pcntl:

  • Tags the two scenarios that need forking with @require-extension-pcntl, so they are skipped there instead of failing. These are the scenarios that check for Starting worker and Reloading WordPress…. The tag is evaluated inside the container, so it also works under Docker.
  • Adds a scenario for the fallback to separate processes. It disables pcntl_fork through WP_CLI_PHP_ARGS and checks for the warning and correct output.

The scenarios that expect empty STDERR still fail without pcntl, because of the warning, so this PR depends on the wp-cli-tests change.


Generated by Claude Code

Summary by CodeRabbit

  • Tests
    • Added coverage confirming batch runs succeed when process forking is unavailable, with a warning and successful results for each command.
    • Updated two scenarios to require the pcntl extension.

Scenarios that check for a shared worker or for WordPress reloading need
the pcntl extension, which the Docker images the tests run in lacked.
Tag them so they are skipped where it is missing, and add a scenario for
the fallback to separate processes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UWTd5oZXFWfL1mxtssHXwz
Copilot AI balanced review requested due to automatic review settings November 18, 2026 05:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The batch-run feature scenarios now mark two cases as requiring pcntl. A new scenario checks a batch run with pcntl_fork disabled, including its warning and successful command results.

Changes: Batch-run pcntl coverage

Layer / File(s) Summary
pcntl scenario coverage
features/batch-run.feature
Two existing scenarios are tagged as requiring pcntl. A new scenario checks that a two-command batch run succeeds when pcntl_fork is disabled, emits a warning that each command runs in its own process, and reports both commands as successful.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Merge Risk: Minimal · up to 4555e

This change only adjusts test scenarios: it skips two fork-dependent scenarios when pcntl is missing and adds coverage for the separate-process fallback. No production behavior changes. The remaining dependency on the wp-cli-tests Docker image update is a CI matter, not a merge risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the two main changes: skipping fork-dependent scenarios when pcntl is missing, and adding a test for the separate-process fallback. The raw summary and PR objectives both describe thes…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the two main changes: skipping fork-dependent scenarios when pcntl is missing, and adding a test for the separate-process fallback. The raw summary and PR objectives both describe these same changes, so the title matches the changeset.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ffd4434c-dfb0-4d1e-82f6-332d67406174
Commits

Reviewing files that changed from the base of the PR and between a49bb33 and 4555e44.

Files selected for processing: 1

  • features/batch-run.feature

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@github-actions github-actions Bot added bug Something isn't working command:batch-run Related to 'batch run' command scope:testing Related to testing labels Nov 18, 2026
@codecov

codecov Bot commented Nov 18, 2026

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@swissspidy swissspidy added this to the 1.0.0 milestone Nov 18, 2026
@swissspidy
swissspidy merged commit f8ec6e9 into main Nov 18, 2026
19 of 59 checks passed
@swissspidy
swissspidy deleted the claude/eager-cerf-n46bjx branch November 18, 2026 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working command:batch-run Related to 'batch run' command scope:testing Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants