Skip to content

Identify Windows CI failures: test code bugs, not real network issues#305

Closed
Copilot wants to merge 1 commit intotry/osfrom
copilot/sub-pr-274
Closed

Identify Windows CI failures: test code bugs, not real network issues#305
Copilot wants to merge 1 commit intotry/osfrom
copilot/sub-pr-274

Conversation

Copy link
Contributor

Copilot AI commented Mar 3, 2026

Investigates cURL error 77 failures on Windows CI (windows-2025 runner) that were blocking WordPress downloads and all behat scenarios.

Root cause analysis

Unit tests (wp-cli/wp-cli, job 63924672742) — three failures, none are real connectivity issues:

  • testHttpRequestBadCAcert (2 failures): tempnam(sys_get_temp_dir(), 'wp-cli-badcacert-pem-') truncates to a 3-char prefix on Windows, producing wp-5EFE.tmp. The cURL error 77 message on Windows is "error adding trust anchors from file: ...\wp-5EFE.tmp" vs. the asserted "error setting certificate". The wp-5EFE.tmp path seen in the original error report is this intentional bad-cert file, not a real SSL failure.

  • WpOrgApiTest::test_http_request_verify@insecure: Mock_Requests_Transport guards with strpos($verify, sys_get_temp_dir()). On Windows, sys_get_temp_dir() may return an 8.3 short path (RUNNER~1) while tempnam() returns the long path (runneradmin), causing the guard to silently return false and skip the verify → false conversion.

  • FileCacheTest::test_import (2 errors): ZipArchive not found — the zip extension is included in setup-php for functional tests but missing for unit tests in reusable-testing.yml.

Behat tests (wp-cli/wp-cli, job 63924669886) — all 203 scenarios fail due to Windows shell quoting: cmd.exe treats single quotes as literals (not string delimiters), so wp eval 'list( $a, $b ) = ...' is tokenized at spaces. WP-CLI receives each token as a separate positional argument.

Where fixes belong

Issue Repository
testHttpRequestBadCAcert assertion wp-cli/wp-cli
Mock_Requests_Transport path normalization wp-cli/wp-cli
Missing zip extension for unit tests wp-cli/.github
Single-quote quoting in wp eval feature tests wp-cli/wp-cli

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Improve compatibility with other operating systems Identify Windows CI failures: test code bugs, not real network issues Mar 3, 2026
@swissspidy
Copy link
Member

@copilot so no actual network issues? why are tests failing at wp-cli/wp-cli#6245 then? apparently the wp core download in wp-cli-tests fails, see https://github.com/wp-cli/wp-cli/actions/runs/22116136930/job/63924669886?pr=6245

@swissspidy swissspidy closed this Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants