Pin and cache Playground downloads; add eight Freemius pro themes - #7
Merged
Merged
Conversation
Every boot-wp.mjs boot on a GitHub Actions runner re-downloaded two things from scratch, on top of what the existing pnpm/Playwright cache already covers: - @wp-playground/cli itself, pulled via `npx --yes ...@latest`. Its @php-wasm/* dependencies bundle PHP.wasm binaries for every supported PHP version — ~300MB, measured directly against a real npx install on disk, not estimated. - WordPress core, fetched fresh by Playground on every boot. Its own source shows it already caches this at ~/.wordpress-playground/ <version>.zip and skips the download when that file exists — confirmed against a real cached 7.1.zip already sitting on a dev machine. Nothing was telling a GitHub Actions runner, which starts empty every job, to keep that file between runs. Two changes: - @wp-playground/cli is now pinned to 3.1.53 instead of `@latest`, same reasoning already applied to @playwright/test elsewhere in this repo: a floating version can silently change CI behaviour overnight, and a cache keyed on a version that itself floats can never promise a match. - Both suite.yml and pro-suite.yml gain a second actions/cache step, keyed on boot-wp.mjs's own hash (a different invalidation lifecycle from the product's lockfile-keyed cache above it), covering ~/.npm/_cacache and ~/.wordpress-playground. `~/.wordpress-playground/sites/` is deliberately excluded. It is not a download cache — it is the extracted, BOOTED WordPress tree, keyed by mount config and reused across boots with the same key (confirmed on disk: full wp-admin/wp-includes/wp-config.php trees under hashed directory names). This is the same mechanism behind the blueprint idempotency fix already recorded in CLAUDE.md (a second boot of a cached site failing "term already exists"). Caching it in CI would let a stale site from one PR's run leak into another's, which defeats the point of a disposable boot. Not yet verified: no live CI run has confirmed an actual cache hit. What is verified: the pinned version resolves and runs via npx, both workflow files parse, and every cached path was read from real source and real directories on disk rather than assumed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
spacious-pro, accelerate-pro, flash-pro, radiate-pro, cenote-pro, himalayas-pro, ample-pro and estore-pro were missing from licenses.json, so setup-product.mjs classed them as free and would have rendered qa-suite.yml — a workflow that never checks a licence — for a pro theme. All eight were read from their own source and share ColorMag Pro's shape: a standalone pro theme replacing the free one, FS_ThemeGrill::init() wrapping fs_dynamic_init(), the Freemius SDK as a git submodule, and FS_ThemeGrill::freemius()->can_use_premium_code() as the gate. Each row carries its own id, public key and line numbers. Each key_env gets its line in pro-suite.yml's fan-out; without it the run dies with "no recognised pro_check expression", which reads as a probe bug. As with the block plugins, the themes are is_premium_only and the only can_use_premium_code() call outside the SDK is inc/freemius-migration.php, so a green @Pro run proves the licence resolved, not that a feature is gated behind it. Verified: write-workflow on an accelerate-pro checkout now renders qa-pro.yml against themegrill/accelerate and check-workflow reports clean; license.mjs resolves all eight; key_env list matches the workflow fan-out exactly. None of the eight has been booted or licensed. Bump the marketplace to 1.7.1 so installed plugins pick the registry up.
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
@wp-playground/clito3.1.53instead of@latest, so CI can't silently start running a different Playground release and cache keys mean something.suite.ymlandpro-suite.yml: a secondactions/cachestep keyed onboot-wp.mjs's hash, covering~/.npm/_cacacheand~/.wordpress-playgroundwithsites/excluded (that directory is the extracted, booted site and must not leak between runs).licenses.json), with PRO.md and CLAUDE.md updated.versionbumped so the change reaches developers.Not verified
!exclusion glob inside a multi-linepath:is a documented@actions/globpattern but hasn't been observed working in a realactions/cacherun here.Test plan
sites/absent from the saved paths)node plugins/claudegrill/scripts/license.mjs statusreads the new rows🤖 Generated with Claude Code