Reduce Cloudflare SSI runtime memory#2013
Conversation
|
Upstream package ownership is now separated from the Cloudflare consumer.
SSI now declares a deployment-neutral The pinned SSI 1.3.4 source predates the manifest, so its existing selector is retained only behind the exact source SHA-256. Any other manifest-free archive fails closed. Once a release containing PR #722 is pinned, that migration branch can be removed. Verification after the consumer change:
No deployment was performed. |
|
Nested index route repair is now merged upstream:
The downstream release chain remains explicit: publish a PHP transformer release containing that commit, update/release Static Site Importer against it, then pin that SSI release here and rerun the five-route learner acceptance. No production deployment is implied. |
Summary
Production root cause
Worker version
aa0c5b5c-db2c-4859-9d8a-8fcf858fc26arepeatedly terminated operationccea2c23-8f80-4bc4-a37a-dcb5a21049a9atbooting-runtimewith Cloudflareoutcome: exceededMemory. The pinned SSI release ZIP was 13,056,371 bytes and expanded to 46,814,537 bytes, including two large Figma/fixture package trees not used by the website-artifact API.The generated runtime is 1,739,484 bytes and expands to 5,754,679 bytes. It remains content-addressed and records the exact pinned release URL, version, commit identity, and source archive digest.
Worker version
e3a7bf29-e350-4fd6-b4f4-4bd6ef194a50, deployed from1926925d, recovered the same operation without replacing its canonical input. Attempt 5 completed SSI, created five editable pages with zero quality violations, and committed canonical revision62603de9-3a25-4e1e-9592-6e10f9a51c71at coordinator version 37.Publication then exposed a second owning-layer gap: WordPress rendered
/website/as a permanent redirect, while the incremental compiler accepted only200 text/html. Commit7eab0401aligns compilation with the persisted publication schema by accepting only cache-safe301/308responses withLocation; cookie-bearing responses, temporary redirects, and non-HTML success responses remain rejected.Addresses the production blocker in #1975.
Fixes #2039.
Verification
npm run test:cloudflare-runtimenpm run cloudflare:dry-run:d1npm run cloudflare:local-gate:d1The complete D1 gate passes SSI import, zero fallback/core HTML/freeform/invalid blocks, Gutenberg editability, canonical MDI persistence, immutable R2 publication, cold restart, and two-site isolation with the filtered runtime. The runtime test directly covers accepted HTML,
301, and308responses and rejects JSON,302, missing-location, and cookie-bearing responses.Runtime core, Worker code, corpus generation, provisioning, and canonical persistence contain no SSI names or paths. The deployment descriptor selects SSI through its public package profile and ability. The descriptor-driven corpus remains byte-identical at 1,739,484 bytes with SHA-256
c5aa5c2ef67503ed94c7b249b2bf102630f279f985ece44245df83169fa75e27.Homeboy deployed exact pushed revision
7eab0401b72434141d2b1529c27016024687fcfbas Worker version2dc9d0ba-9a24-4534-afe6-40b254fcaa2d; health, D1 state, and existing-publication gates passed. The previously stalled job advanced through/website/and promoted publication revision9c712153-bc56-4cd3-ba1c-8f484a8a95c8. Operationccea2c23-8f80-4bc4-a37a-dcb5a21049a9is nowsucceededat 100%, proving the memory and permanent-redirect recovery paths in production.The imported learner is not final acceptance evidence yet: the published root is the API document instead of the declared overview entrypoint, and nested pages redirect under
/index/website/. Direct transformer reproduction identified the separate upstream cause in Automattic/blocks-engine#691: inferredentryroles promote every nested*/index.htmldocument to an entrypoint. WP Codebox publication recovery is complete; exact learner routing remains tracked upstream rather than being hidden with an artifact-shape workaround.AI assistance
OpenAI
gpt-5.6-solvia OpenCode generated the architecture learner corpus, diagnosed the production Worker memory termination and publication redirect failure, implemented the filtered runtime, copy removal, and redirect policy, and ran deterministic local and production verification with Chris Huber. Chris remains responsible for the submitted changes.