v0.14.0 — apply preflight for missing snapshot binaries
Apply now hard-fails on missing snapshot binaries
When a snapshot's attachments.json declares binary files that aren't actually present under <snapshot_dir>/uploads/, wp fp apply used to silently land the attachment post row and skip the binary copy — leaving a broken-image front end and exit code 0. Designers hit this after the round-trip:
fp snapshot
docker compose down -v
docker compose up -d
fp apply
# DB has site_logo=42 but /app/web/app/uploads/2026/05/logo.png is missing → 404
This release adds a preflight pass at the top of Restorer::apply(). Missing files surface as a single WP_CLI::error() listing every offending path with a remediation hint. copy_binaries()'s silent continue is replaced with a throw (defense in depth for the preflight→copy race).
What changed
- New
Restorer::verify_attachment_binaries()runs before any DB writes. copy_binaries()now throws instead of silently skipping missing files.- New
tests/CliRestorerVerifyBinariesTest.phpcovers both branches.
Behaviour change
A snapshot whose attachments.json declares files not on disk now hard-fails at apply time. Schema is unchanged (fp.snapshot/v5). Most installs see no change — only those whose snapshot dirs were already missing binaries (e.g. corrupted commits, git LFS not pulled, manual cleanup) will surface as failures.
Upgrading
Site composer.json:
-"frankenpress/mu-plugin": "^0.13.0"
+"frankenpress/mu-plugin": "^0.14.0"Then rebuild and tag the site image, and roll through your GitOps. No data migration, no schema bump.
Full diff
What's Changed
- feat(apply): preflight check for missing snapshot binaries by @MatthewKennedy in #44
Full Changelog: v0.13.11...v0.14.0