Fix the runtime matrix's nginx cells; run an nginx cell on PRs - #109
Merged
Merged
Conversation
Since #106, all three nginx cells of the full matrix fail at the settings PATCH with nginx's own "405 Not Allowed": the smoke test sent REST requests to /?rest_route=, and for a directory request nginx's index module only hands GET, HEAD, and POST to index.php, so PATCH, PUT, and DELETE fall through to the static handler. #105's write steps used only GET and POST, so they passed. Sites are not affected: WordPress builds plain-permalink REST URLs as index.php?rest_route=, and pretty permalinks reach index.php through try_files. Send every smoke REST request to index.php?rest_route= (REST_URL), and add nginx-php83-wplatest to the pull-request matrix, which had only Apache cells and so could not catch this before merge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KbVuMPN7YTcV27vwsG3LZ2
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #109 +/- ##
=========================================
Coverage 87.50% 87.50%
Complexity 22 22
=========================================
Files 55 55
Lines 6089 6089
Branches 597 597
=========================================
Hits 5328 5328
Misses 280 280
Partials 481 481 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
What changed?
Since #106, Runtime matrix smoke on
mainhas failed on every push: runs #525, #529, and #531. In each run the same three cells fail, all nginx (nginx-php81-wp67,nginx-php82-wplatest,nginx-php83-wplatest), and all seven Apache cells pass. Every other recent workflow is green: CI, CodeQL, Release, the WordPress.org deploy, Dependency audit, Node compatibility, and Demo Link Monitor.Cause. The settings
PATCHthat #106 added to the smoke test gets nginx's own405 Not Allowed, so the request never reaches PHP. The smoke test sent REST requests to/?rest_route=…. For a directory request like/, nginx's index module only handsGET,HEAD, andPOSTtoindex.php.PATCH,PUT, andDELETEfall through to the static-file handler, which answers with 405. #105's write steps used onlyGETandPOST, which is why its full-matrix run passed.Sites are not affected. With plain permalinks WordPress builds REST URLs as
index.php?rest_route=…, and pretty permalinks (/wp-json/…) reachindex.phpthroughtry_files.Fix:
scripts/runtime-matrix/smoke.shsends every REST request toindex.php?rest_route=…through a singleREST_URL, the form WordPress generates itself.nginx-php83-wplatest, so this PR's own CI tests the fix on nginx.Validation
npm run lint:js: no JS changesnpm run lint:css: no CSS changesnpm run lint:i18n: no source strings changednpm run test: no plugin code changesnpm run build: no plugin code changesbash -nonsmoke.sh, and the workflow YAML parses; the PR matrix has 4 cells, including nginx.nginx:1.27-alpine. A full PHP-FPM reproduction was blocked by Docker Hub rate limits, so this PR's new nginx cell is the end-to-end proof.Checklist
mainruns are linked above.🤖 Generated with Claude Code
https://claude.ai/code/session_01KbVuMPN7YTcV27vwsG3LZ2
Generated by Claude Code