Skip to content

Add AI E2E test site preflight#25615

Merged
iangmaia merged 4 commits into
trunkfrom
fix-ai-e2e-site-preflight
Jun 5, 2026
Merged

Add AI E2E test site preflight#25615
iangmaia merged 4 commits into
trunkfrom
fix-ai-e2e-site-preflight

Conversation

@iangmaia
Copy link
Copy Markdown
Contributor

@iangmaia iangmaia commented Jun 4, 2026

Note: this PR is an improvement to fail the tests early, but they're now ultimately failing due to an expired Jurassic Ninja website, it seems. We need to fix that for the long run. Ideas @mokagio @crazytonyli ?

Summary

This PR helps addressing the issue seen in the nightly AI E2E tests (example), where the tests run for a site that is down and eventually time out.

Changes:

  • Preflight the configured AI E2E WordPress test site before downloading artifacts or starting the simulator
  • Fail fast when the REST API redirects to WordPress.com typo handling or does not look like WordPress REST API JSON
  • Verify the configured username/application password can access /wp-json/wp/v2/users/me before running simulator-llm-pilot

Testing

  • bash -n .buildkite/commands/run-ai-e2e-tests.sh
  • BUILDKITE_PULL_REQUEST_LABELS=Other .buildkite/commands/run-ai-e2e-tests.sh
  • ANTHROPIC_API_KEY=dummy SIMULATOR_LLM_PILOT_SITE_URL=sawfish-of-tropics.jurassic.ninja SIMULATOR_LLM_PILOT_USERNAME=dummy SIMULATOR_LLM_PILOT_APP_PASSWORD=dummy .buildkite/commands/run-ai-e2e-tests.sh

Copilot AI review requested due to automatic review settings June 4, 2026 12:27
@dangermattic
Copy link
Copy Markdown
Collaborator

dangermattic commented Jun 4, 2026

1 Warning
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a “preflight” check for the configured AI E2E WordPress test site so the pipeline fails early (before artifact download / simulator work) when the site is unreachable, redirects unexpectedly (e.g., WordPress.com typo handling), or the provided credentials can’t access the REST API current-user endpoint.

Changes:

  • Add REST API preflight helpers that validate /wp-json/ looks like a WP REST root response.
  • Add an authenticated preflight call to /wp-json/wp/v2/users/me to verify credentials work before running tests.
  • Run the preflight step immediately after required env var validation and before the rest of the test lifecycle.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .buildkite/commands/run-ai-e2e-tests.sh Outdated
@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented Jun 4, 2026

App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number32418
VersionPR #25615
Bundle IDorg.wordpress.alpha
Commitcc37226
Installation URL2pjl608k9tiho
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented Jun 4, 2026

App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number32418
VersionPR #25615
Bundle IDcom.jetpack.alpha
Commitcc37226
Installation URL600vmbtblpak8
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@iangmaia iangmaia self-assigned this Jun 4, 2026
@iangmaia iangmaia added the Tooling Build, Release, and Validation Tools label Jun 4, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread .buildkite/commands/run-ai-e2e-tests.sh
@iangmaia iangmaia added this pull request to the merge queue Jun 5, 2026
Merged via the queue into trunk with commit 491bd0e Jun 5, 2026
24 checks passed
@iangmaia iangmaia deleted the fix-ai-e2e-site-preflight branch June 5, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tooling Build, Release, and Validation Tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants