Skip to content

Fix wp-performance: wp doctor check needs --all or check names - #114

Merged
bgrgicak merged 3 commits into
WordPress:trunkfrom
maheshbohara:fix/113-wp-doctor-check-args
Oct 5, 2026
Merged

bgrgicak merged 3 commits into
WordPress:trunkfrom
maheshbohara:fix/113-wp-doctor-check-args

Conversation

@maheshbohara

Copy link
Copy Markdown
Contributor

Problem

The wp-performance skill tells agents to run wp doctor check with no arguments as the first diagnostic step. That command runs no checks and exits with an error:

$ wp doctor check
Error: Please specify one or more checks, or use --all.

The guard is in src/Command.php L120-L123 of wp-cli/doctor-command, and it is present in every release tag back to v0.1.0. An agent following the skill hits the error at step 2 ("Fast wins").

Fixes #113.

Changes

  • skills/wp-performance/SKILL.md: step 2 now uses wp doctor check --all (with --spotlight as an option) and shows the named-check form for a perf-focused run. The Verification bullet uses --all too.
  • skills/wp-performance/references/wp-cli-doctor.md: "Recommended usage" lists --all, the three perf-related checks by name, and --all --spotlight, and notes that one of --all or a check name is required.
  • eval/scenarios/performance-profile-slow-endpoint.json: step 4 and the matching success criterion expect --all or named checks instead of the bare command.

Testing

  • node shared/scripts/validate-skills.mjs passes.
  • Ran the old and new commands against a local WordPress 7.1 site:
doctor-command WP-CLI wp doctor check Named checks --all
v2.1.0 to v2.3.0 2.12.0 error, exit 1 3 checks run, exit 0 16 checks run
v3.0.0 3.0.0-alpha nightly error, exit 1 3 checks run, exit 0 16 checks run
  • The same guard is in the tagged source of every other release back to v0.1.0.

The bare `wp doctor check` exits with "Please specify one or more checks, or use --all." and runs nothing. Step 2 and the Verification section now use `--all` and show the named-check form for a perf-focused run.

Relates to WordPress#113.
Replace the bare command with `--all`, the named perf checks and `--spotlight`, and note that one of `--all` or a check name is required.

Relates to WordPress#113.
…int scenario

The scenario expected the bare `wp doctor check`, which errors. It now expects `--all` or named checks.

Relates to WordPress#113.
@maheshbohara
maheshbohara requested a review from a team as a code owner October 5, 2026 08:46
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: maheshbohara <maheshbohara@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@bgrgicak bgrgicak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for working on this @maheshbohara!

@bgrgicak
bgrgicak merged commit 3cf7f6f into WordPress:trunk Oct 5, 2026
3 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.

wp-performance: wp doctor check without arguments errors instead of running checks

2 participants