feat(cloudflare): qualify native Bricks runtime compatibility - #2499
Closed
TyMac20 wants to merge 18 commits into
Closed
feat(cloudflare): qualify native Bricks runtime compatibility#2499TyMac20 wants to merge 18 commits into
TyMac20 wants to merge 18 commits into
Conversation
TyMac20
marked this pull request as draft
September 10, 2026 18:12
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.
This adds native Bricks authoring and protected previews to the Cloudflare WordPress runtime. A staged native artifact can initialize an operator-prepared site, create a revision, and restore retained native content through the existing D1 lease/CAS coordinator. Native Bricks documents, design resources and WordPress media survive reconstruction from D1/R2.
Implementation
_bricks_*and required_wp_*metadata, R2-only manifest entries and tombstones. Hydrate integrity-checked uploads and PHP-required theme files while serving browser assets from R2. Version both edge and persisted render caches when runtime behavior changes.PUT /v1/bricks/artifacts/{sha256}, native provisioning atPOST /v1/bricks/sites, revision/restore endpoints, and operation polling. Requests bind the runtime package, native artifact, customer/site identity, source provenance and exact canonical base. Restore produces a new monotonic revision, with explicit restored-from and pre-restore pointers.protected_previewreceipts; editor acceptance remains false and all client-acceptance steps remainnot_run.Verified behavior and evidence
The actual Build artifact producer and writer completed the following against the existing disposable Worker with real D1/R2 resources:
Every operation passed terminal receipt verification, immutable replay, operation polling and authenticated native preview observation. A stale mutation base returned
409. Preview access checks returned401without credentials,409for a stale receipt,405for a write, and404on the raw native hostname. The original provision receipt remains its immutable historical draft.Runtime source
2f851aa136cb0a20a0bed1c456a6469c12767ba6was then uploaded as Worker preview version5e5b9b92-3593-494b-83be-9fda4b7348cc. A fresh runtime reconstructed the restored revision solely from D1/R2: desktop and mobile rendered 19 native elements, two loaded fixture images and no horizontal overflow. Inspected screenshots were byte-identical across the Worker version change. This supersedes the earlier outstanding second-version reconstruction item for the API fixture.Tracked evidence at
fd4775e974239de81092356223c78bb4836291db:Validation: package TypeScript build, 144 runtime tests and two package boundary tests passed; the runtime checks include the 14 focused native/preview tests. Actual local PHP-WASM and remote Worker rehearsals passed. The full package command was attempted; the canonical MDI seed-regeneration test requires a host
phpexecutable, which is unavailable. That single test was excluded from the 144-test run. Earlier package/Wrangler dry-run evidence remains recorded separately.Remaining qualification
edit -> publish -> public observation -> restore -> reopentransaction remain unqualified. The agency license prerequisite is still open in the tracked evidence. Programmatic authoring and restore do not establish client editability.7657aa45-c5f2-4ac5-ab0c-783544bc3452, source0bd5103e. Default canonical content and the separately owned engine/sales namespaces remain unchanged. See the exact baseline telemetry, local allocation profile, and allocator follow-up with actual Worker measurements. Further retained-memory reduction remains required.This remains an opt-in prototype under qualification. General Build target enablement, licensed editor acceptance and production release gates are outstanding. The existing customer static preview has not been migrated or published through this native target.