planIdentity hashes the whole site plan with the per-declaration depth cap (33), failing imports whose fallback block trees nest deeply
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 70/100
Direzione di ricerca
Start by reading WordPressSitePlan::planIdentity() and ArtifactCompiler's plan digest depth bound, then find the verifier that recomputes the identity. Add a regression test for a plan with about 40 nested innerBlocks and confirm identity remains stable while runtime declarations deeper than 33 are still rejected. Done when the regression passes and the reported import can compose successfully.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
WordPressSitePlan::planIdentity() hashes the whole site plan with RuntimeDeclarations::hash() and its default depth bound, MAX_CANONICAL_DEPTH (33). That bound exists to cap a single runtime declaration payload. The plan legitimately carries deeper data: quality.fallbacks[*].readable_blocks is a parsed block tree with recursive innerBlocks. When a page's fallback block tree nests about 30 levels deep, composing the site plan fails with:
Materialization failed (wordpress_site_plan_not_self_contained): Runtime declaration payload contains an unsupported value.
The failure arrives at the very end of an import, after every page has compiled, and the message points at runtime declarations rather than plan depth.
Evidence
Static Site Importer 1.33.40 (bundled transformer equal to trunk for this code), importing a 50-route capture of https://www.wix.com/ (Studio create --from). All 50 pages compiled in about 1965 s, then compose failed. Stack trace (vendored paths trimmed):
#34 ArtifactCompiler/RuntimeDeclarations.php(374): RuntimeDeclarations::updateCanonicalHash(HashContext, Array, 33)
#35 WordPressSitePlan/WordPressSitePlan.php(178): RuntimeDeclarations::hash(Array)
#36 WordPressSitePlan/WordPressSitePlan.php(578): WordPressSitePlan::planIdentity(Array)
#37 WordPressSitePlan/WordPressSitePlan.php(248): WordPressSitePlan->fromCompilerInput(...)
#38 ArtifactCompiler/WordPressSitePlanComposer.php(40): WordPressSitePlan->fromResult(...)
That is 34 recursion frames, so depth 34 > 33. In the homepage's compile receipt, the deepest branch is compiled_documents/…/fallbacks/0/readable_blocks/0/innerBlocks/13/innerBlocks/1/…/attrs/wrappers/0/attributes/class at depth 47. The plan copies fallbacks into quality.fallbacks (WordPressSitePlan.php:574).
Root cause
The two plan-level hashes use different bounds:
ArtifactCompilerhashes plans withMAX_PLAN_DIGEST_DEPTH = 512.planIdentityuses the per-declaration bound of 33.
A plan-level identity should accept every plan the plan validator accepts.
Proposal
Give planIdentity (and whichever verifier recomputes it when resolving) one shared plan-level depth bound, the same one ArtifactCompiler uses for plan digests. Keep MAX_CANONICAL_DEPTH for individual runtime declarations, where it belongs.
Acceptance
- Regression test: a plan whose
quality.fallbacks[0].readable_blocksnests about 40 levels ofinnerBlocksgets a stableplanIdentity. Resolution or validation that recomputes the identity accepts it. A runtime declaration payload deeper than 33 is still rejected. - The test fails before the fix with
Runtime declaration payload contains an unsupported value. - Re-running the wix.com import composes successfully (measured after release).
AI disclosure: Claude Opus 5.5 (Roadie/Pi) captured the stack trace by temporarily instrumenting a local import, located the deep plan branch and drafted this issue with Chris Huber.
- Lingua principale
- PHP
- Stelle
- 22
- Fork
- 2
- Merge medio
- 7h 59m
- PR unite (30g)
- 675
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Automattic/blocks-engine
-
Solved site promotion gate fails on runner PHP patch drift (expects 8.2.33, runner installs 8.2.34)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Automattic/blocks-engine#2161 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Automattic/blocks-engine#2061 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Automattic/blocks-engine#1701 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Automattic/blocks-engine#775 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 1-2 giorni Idoneità per principianti 58/100
Automattic/blocks-engine#3312 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Automattic/blocks-engine
Issue simili
-
0. Needs triage 35-feedback bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
product / auth product / databases product / functions product / messaging product / storage product / vcs
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
good first issue ux
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 89/100
alleyinteractive/wp-curate#498 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
mollie/PrestaShop#1593 ·
I maintainer di solito rispondono entro 7 giorni