Skip to content

Pin and cache Playground downloads; add eight Freemius pro themes - #7

Merged
iamprazol merged 3 commits into
mainfrom
feat/pin-and-cache-playground-downloads
Sep 29, 2026
Merged

iamprazol merged 3 commits into
mainfrom
feat/pin-and-cache-playground-downloads

Conversation

@iamprazol

Copy link
Copy Markdown
Collaborator

Summary

  • Pin @wp-playground/cli to 3.1.53 instead of @latest, so CI can't silently start running a different Playground release and cache keys mean something.
  • Cache boot-wp's own downloads across CI runs in both suite.yml and pro-suite.yml: a second actions/cache step keyed on boot-wp.mjs's hash, covering ~/.npm/_cacache and ~/.wordpress-playground with sites/ excluded (that directory is the extracted, booted site and must not leak between runs).
  • Add eight Freemius pro themes to the pro registry (licenses.json), with PRO.md and CLAUDE.md updated.
  • Marketplace version bumped so the change reaches developers.

Not verified

  • No live CI run has happened, so the cache-hit path (a second run reusing what a first saved) is unproven. The ! exclusion glob inside a multi-line path: is a documented @actions/glob pattern but hasn't been observed working in a real actions/cache run here.
  • The eight new registry rows have not been booted or licence-checked against Freemius.

Test plan

  • First CI run: confirm the cache saves (sites/ absent from the saved paths)
  • Second CI run: confirm a cache hit and a shorter boot
  • node plugins/claudegrill/scripts/license.mjs status reads the new rows

🤖 Generated with Claude Code

iamprazol and others added 3 commits September 11, 2026 12:59
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.
@iamprazol
iamprazol merged commit 8fb8899 into main Sep 29, 2026
2 checks passed
@iamprazol
iamprazol deleted the feat/pin-and-cache-playground-downloads branch September 29, 2026 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant