Repository navigation
Commit 3cf7f6f
authored
Fix wp-performance:
## 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](https://github.com/wp-cli/doctor-command/blob/116316d/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.wp doctor check needs --all or check names (#114)1 parent 8bd67b0 commit 3cf7f6f
3 files changed
Lines changed: 12 additions & 5 deletions
File tree
- eval/scenarios
- skills/wp-performance
- references
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
| |||
126 | 129 | | |
127 | 130 | | |
128 | 131 | | |
129 | | - | |
| 132 | + | |
130 | 133 | | |
131 | 134 | | |
132 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| |||
0 commit comments