Skip to content

Add checksum verification to upgrade & installation test workflows - #13102

Open
desrosj wants to merge 1 commit into
WordPress:trunkfrom
desrosj:add/checksum-verification-to-workflows
Open

desrosj wants to merge 1 commit into
WordPress:trunkfrom
desrosj:add/checksum-verification-to-workflows

Conversation

@desrosj

@desrosj desrosj commented Aug 17, 2026

Copy link
Copy Markdown
Member

This adds a step to both the upgrade & installation test workflows to perform a checksum verification after downloading WordPress.

Trac ticket: Core-65845

Use of AI Tools

None


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@github-actions

github-actions Bot commented Aug 17, 2026 •

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs.

Core Committers: Use this line as a base for the props when committing in SVN:

Props desrosj, lancewillett, wildworks, swissspidy.

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


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub or WordPress.org user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

@t-hamano

Copy link
Copy Markdown
Contributor
Warning: File should not exist: wp-includes/php-ai-client/src/Providers/ApiBasedImplementation/AbstractApiBasedModelMetada
Warning: File should not exist: wp-includes/php-ai-client/src/Providers/ApiBasedImplementation/ListModelsApiBasedProviderA
Warning: File should not exist: wp-includes/php-ai-client/src/Providers/ApiBasedImplementation/GenerateTextApiBasedProvide
Warning: File should not exist: wp-includes/php-ai-client/src/Providers/ApiBasedImplementation/Contracts/ApiBasedModelInte
Warning: File should not exist: wp-includes/php-ai-client/src/Providers/OpenAiCompatibleImplementation/AbstractOpenAiCompa
Warning: File should not exist: wp-includes/php-ai-client/src/Providers/Models/ImageGeneration/Contracts/ImageGenerationMo
Warning: File should not exist: wp-includes/php-ai-client/src/Providers/Models/ImageGeneration/Contracts/ImageGenerationOp
Warning: File should not exist: wp-includes/php-ai-client/src/Providers/Models/SpeechGeneration/Contracts/SpeechGeneration
Warning: File should not exist: wp-includes/php-ai-client/src/Providers/Models/TextToSpeechConversion/Contracts/TextToSpee
Warning: File should not exist: wp-includes/php-ai-client/src/Providers/Models/TextGeneration/Contracts/TextGenerationOper
Warning: File should not exist: wp-includes/php-ai-client/src/Providers/Models/TextGeneration/Contracts/TextGenerationMode
Warning: File should not exist: wp-includes/php-ai-client/src/Providers/Models/VideoGeneration/Contracts/VideoGenerationOp
Warning: File should not exist: wp-includes/php-ai-client/src/Providers/Models/VideoGeneration/Contracts/VideoGenerationMo
Warning: File should not exist: wp-includes/php-ai-client/src/Providers/Contracts/ProviderWithOperationsHandlerInterface.p
Warning: File should not exist: wp-includes/php-ai-client/third-party/Http/Discovery/Exception/StrategyUnavailableExceptio
Warning: File should not exist: wp-includes/php-ai-client/third-party/Http/Discovery/Exception/PuliUnavailableException.ph
Warning: File should not exist: wp-includes/php-ai-client/third-party/Http/Discovery/Exception/NoCandidateFoundException.p
Warning: File should not exist: wp-includes/php-ai-client/third-party/Http/Discovery/Exception/ClassInstantiationFailedExc
Warning: File should not exist: wp-includes/php-ai-client/third-party/Http/Discovery/Exception/DiscoveryFailedException.ph
Warning: File should not exist: wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/CommonPsr17ClassesStrategy.p

This error is strikingly similar to the problem reported with wp-cli. wp-cli/wp-cli#6320

Consider using the nightly version of WP-CLI, or perhaps this issue will be resolved once a new version of WP-CLI is released. cc @swissspidy

@swissspidy

Copy link
Copy Markdown
Member

Yep need to update to WP-CLI nightly. Though we're really working on the next stable release, hopefully right after 7.1 ships. So stay put.

btw shameless plug: swissspidy#96

@lancewillett

Copy link
Copy Markdown
Member

Nice, focused addition. Placing verification immediately after download isolates archive and extraction problems well.

One scalability question: this PR ran the checksum command 394 times, repeating the same WordPress/PHP check across database and multisite variants. Since extraction and checksum results should not depend on the database or multisite mode, could one representative job per WordPress/PHP pair provide the same signal with less WordPress.org API traffic and failure fan-out?

This is non-blocking; the current failures appear to be the known WP-CLI 2.12.0 extraction defect rather than a problem with this patch.


Adversarial review · gpt-5.6-sol

@lancewillett lancewillett left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This can land; I left a non-blocking suggestion.

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.

🟡 Changes recommended

The checksum verification queries unavailable release checksums for nightly WordPress downloads, causing default workflow jobs to fail before installation.

1 open issue
What changed in this PR

Adds WordPress checksum verification to the installation and upgrade test workflows, checking downloaded files before configuration and installation.

Changes:

  • Adds wp core verify-checksums immediately after downloading WordPress in both workflows.
  • Updates workflow comments to document the verification step.
File Description
.github/​workflows/​reusable-upgrade-testing.yml Adds checksum verification before preparing WordPress for upgrade tests.
.github/​workflows/​install-testing.yml Adds checksum verification before configuring and installing WordPress.

Review effort: Balanced

WP_VERSION: ${{ inputs.wp-version || 'nightly' }}

- name: Verify checksums
run: wp core verify-checksums

@lancewillett lancewillett left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please refresh this against trunk and narrow the immediate change to installation verification, deferring the upgrade hunk until its WP-CLI dependency is verified.

The sampled upgrade failure reached the new checksum step and reported missing files and truncated paths. The check exposed an extraction defect. The upstream component fixes are merged, but their availability in the stable WP-CLI bundle used here is not established.

The installation check still has value: checking extracted files is distinct from archive MD5 validation. #15252 does not supersede that check or fix the upgrade workflow. After refresh, please verify a current release install and a nightly install. The earlier nightly job passed this checksum step, so the blanket claim that nightly cannot work is not supported by that run.

AI review · gpt-6

@lancewillett

lancewillett commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

@desrosj, I can clear the WP-CLI dependency from my October review. On PHP 8.3, I ran wp core download --version=7.0 and wp core verify-checksums with both bundles. WP-CLI 2.12.0 reproduced the missing long filenames. WP-CLI 3.0.1, the bundle Core’s setup action currently downloads, passed. An explicit 7.0 ZIP passed with both versions.

I also checked the current release ZIP (7.1.5) and nightly (7.3-alpha-65868) with 3.0.1. Both verified cleanly, then both failed verification when I changed one extracted file. That shows what the new step catches after the archive download succeeds.

Please keep the upgrade check when refreshing the patch. In the installation workflow, put the check after the shared-artifact and direct-download paths converge, before creating wp-config.php. The current diff no longer applies there on trunk. The 7.3 workflow ticket is Core-66754.

AI review · gpt-6.2-astra

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

Labels

None yet

Projects

Status: Ready

Development

Successfully merging this pull request may close these issues.

5 participants