[CLI] Use preferredVersions.wp in Playground CLI - #4075
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Aligns v1 CLI Blueprint artifact preparation with the effective runtime versions (WP/PHP) that will be used to boot the worker, preventing mismatches between downloaded WordPress builds / selected SQLite integration and the actual worker runtime.
Changes:
- Resolve the effective v1 runtime configuration up-front in the handler and use it for both WordPress release resolution and SQLite integration selection.
- Update WordPress ZIP resolution to use the effective
wpVersionrather than only--wp. - Add a Vitest spec ensuring the handler prepares artifacts using Blueprint-declared
preferredVersions.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/playground/cli/src/blueprints-v1/blueprints-v1-handler.ts | Uses resolved runtime configuration for WordPress release lookup and SQLite integration selection to match worker boot versions. |
| packages/playground/cli/tests/blueprints-v1-handler.spec.ts | Adds regression coverage asserting WP release resolution + SQLite integration selection follow Blueprint preferredVersions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+12
to
+17
| cachedDownload: vi.fn( | ||
| async () => new File(['WordPress'], 'wordpress.zip') | ||
| ), | ||
| fetchSqliteIntegration: vi.fn( | ||
| async () => new File(['SQLite'], 'sqlite.zip') | ||
| ), |
adamziel
force-pushed
the
cli-honor-v1-blueprint-runtime-versions
branch
from
July 16, 2026 14:06
56c9a53 to
dcd6a7c
Compare
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.
V1 CLI Blueprints can request a specific WordPress release:
{ "preferredVersions": { "wp": "6.2" } }Before this change, the CLI ignored that value while downloading WordPress. With no
--wpflag, it did this:The worker then unzipped that
latestarchive. PassingwpVersion: '6.2'later did not change the files already in the archive, so the Blueprint silently ran the current WordPress release instead of WordPress 6.2.This change resolves the Blueprint runtime before downloading WordPress and passes its requested version to
resolveWordPressRelease(). The downloaded archive and the running site now match the Blueprint.The regression test uses a Blueprint requesting WordPress 6.2 and verifies that the CLI resolves WordPress 6.2 before booting the worker.
Testing
Start a V1 CLI Blueprint with
preferredVersions.wpset to6.2. Check thatwp-includes/version.phpreports WordPress 6.2.