Prove generated-block compatibility across WordPress and Gutenberg - #121
Merged
Merged
Conversation
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.
Problem
The generated template prop must remain compatible with WordPress 7.1 while Gutenberg 24.0 deprecates it. We need runtime evidence before changing that contract. Closes #118.
Solution
Build one representative generated plugin and run identical ZIP bytes through isolated WordPress 7.1, WordPress 7.1.2 and WordPress 7.1.2/Gutenberg 24.0.0 lanes. Keep the generator and public release receipt unchanged.
scripts/proof-gutenberg-compat.mjsscripts/proof-playwright.mjsdocs/development.md,docs/reference.mdDiff
+224 −3 · 8 files · no generator or dependency change
Testing & verification
Reviewed revision:
c2cb0f4· Node 22.23.1, OrbStack.npm run typecheckpassed.node --check scripts/proof-gutenberg-compat.mjspassed.npm run verifypassed: 709 tests, four existing skips, plus typecheck/build/package checks. The subsequent navigation correction passed 27 focused proof-contract tests.BLOCK_RUNNER_COMPAT_OUTPUT_DIR=/tmp/block-runner-compat-final npx --no-install vitest run --config vitest.gutenberg-compat.config.tspassed all three lanes. Each retained exactly seven native descendants after insertion/save/reopen, matching saved/reopened hashes and clean editor state; supported edits, bundled media and pattern isolation passed. All lanes observed PHP 8.3.35, Chromium 149.0.7827.55 and Twenty Twenty-Five 1.5. Core versions were exactly 7.1 / 7.1.2 / 7.1.2; Gutenberg was absent / absent / 24.0.0. The plugin lane retained the template-prop deprecation; all lanes had zero console/page errors.npm run test:proof:wordpresspassed in CI with both native controls and required automated acceptance.Exact-head CI passed: Node 20.19.0/22.13.0/24.0.0, package boundary and the shared WordPress browser suite.
Not verified: release, model benchmarks, manual acceptance or collaborative editing. None are claimed.
Retained local receipt:
/tmp/block-runner-compat-final/compatibility.json; per-lane command/browser evidence lives beside it. Matched native controls are in/tmp/block-runner-compat-native-control-beforeand/tmp/block-runner-compat-native-control-after.sha256:763c32b7c4c0b664cf38423a5057fbf2ae219ce7ef6cf39030ef44314616f495.sha256:649d3f2c2a813926397b4dacf3e8377b9d1b8a9f9313163bb806c3b55ff4d1d0.sha256:536fed11f5b61802957f4030613f423bbdee331f6ade73125a7e1bd360f89dbb.Risk / rollout
Development proof orchestration, warning capture and the editor-to-visitor navigation order change. The current template prop remains in place. The Gutenberg 24.0 hook retains the prop while warning; WordPress 7.1 lacks its settings-only fallback.
Detection: explicit suite fails on wrong versions, empty/duplicate children, lost edits, failed pattern isolation or runtime errors. Rollback: revert this PR; no migration or package publication.