Skip to content

Repair wp/7.0 branch Actions: Pin WordPress 7.0 for performance testing - #83151

Closed
desrosj wants to merge 1 commit into
fix-actions-7.0/guard-setaccessible-php85from
fix-actions-7.0/pin-wp-version-performance-testing
Closed

desrosj wants to merge 1 commit into
fix-actions-7.0/guard-setaccessible-php85from
fix-actions-7.0/pin-wp-version-performance-testing

Conversation

@desrosj

@desrosj desrosj commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

Part of #82782.

What?

This pins WordPress 7.0 as the version to use when running the performance tests on pull_request events.

- run: ./bin/plugin/cli.js perf "$GITHUB_SHA" "$GITHUB_BASE_REF" --tests-branch "$GITHUB_SHA"
+ run: ./bin/plugin/cli.js perf "$GITHUB_SHA" "$GITHUB_BASE_REF" --tests-branch "$GITHUB_SHA" --wp-version "7.0"

Why?

While this branch's .wp-env.json pins Core as WordPress/WordPress#7.0-branch, the performance testing workflow never reads that file. bin/plugin/cli.js perf builds its own, separate .wp-env.json for each branch it measures, and that file's core field is only pinned when an explicit --wp-version argument is passed:

let wpZipUrl = null;
if ( options.wpVersion ) {
	const zipVersion = options.wpVersion.replace( /^(\d+\.\d+)\.0$/, '$1' );
	wpZipUrl = `https://wordpress.org/wordpress-${ zipVersion }.zip`;
}
// ...
core: wpZipUrl || 'WordPress/WordPress',

With no --wp-version, wpZipUrl stays null and the environment falls back to WordPress/WordPress — WordPress Core's own development trunk. The CLI even says so out loud, logging Using: WordPress trunk instead of Using: WordPress v7.0.

That means the pull_request job was measuring this branch's frozen Gutenberg snapshot against a continuously moving Core install, ignoring the branch's own Core pin entirely. That makes the numbers meaningless at best, and breaks the suite outright once Core's architecture drifts far enough from what this branch's editor expects.

--wp-version "7.0" resolves to https://wordpress.org/wordpress-7.0.zip (confirmed available), giving the performance tests the same Core pin every other test suite on this branch already uses.

This workflow's release, push, and workflow_dispatch steps already pass --wp-version; the pull_request step was the only one missing it. Nothing else about the step changes — its name and its "$GITHUB_BASE_REF" argument are already correct on this branch.

The equivalent fix has already been made for wp/6.5 (#83005), wp/6.6 (#82979), and wp/6.7 (#82978).

Use of AI Tools

This PR was created by Claude Code under my supervision. All code should be treated as AI-produced and not yet reviewed by a human until this PR is marked Ready for Review.

🤖 Generated with Claude Code

The `.wp-env.json` file pins Core as `WordPress/WordPress#7.0-branch`, so
every other test suite on this branch runs against WordPress 7.0. The
performance tests do not: `bin/plugin/cli.js perf` builds its own,
separate `.wp-env.json` for each branch it measures, and that file's
`core` field is only pinned when an explicit `--wp-version` argument is
passed on the command line.

The `pull_request` step never passed one, so it silently fell back to
`WordPress/WordPress` — WordPress Core's own development trunk, which
moves continuously. Measuring a frozen plugin snapshot against a moving
Core install makes the results meaningless at best, and breaks the suite
outright once Core's architecture drifts far enough from what this
branch's editor expects.

Passing `--wp-version "7.0"` resolves to
`https://wordpress.org/wordpress-7.0.zip`, giving the performance tests
the same Core pin every other suite on this branch already uses. The
`release`, `push`, and `workflow_dispatch` steps in this workflow
already pass `--wp-version`; only the `pull_request` step was missing it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DtSAAJkQ9P6vPtDumqStg8
@desrosj desrosj added the [Type] Build Tooling Issues or PRs related to build tooling label Sep 18, 2026
@desrosj desrosj self-assigned this Sep 18, 2026
@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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

Comment @coderabbitai help to get the list of available commands.

@desrosj

desrosj commented Sep 18, 2026

Copy link
Copy Markdown
Member Author

Superseded by #83158 — the commit here was authored with the wrong email address and showed as Unverified. #83158 contains the identical one-line change with a properly verified signature.

@desrosj desrosj closed this Sep 18, 2026
@desrosj
desrosj deleted the fix-actions-7.0/pin-wp-version-performance-testing branch September 18, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant