Style DOCUMENTS pre-seeded from a profile bundle, keyed like styleCache
("profileId:layerId:styleId"), holding the RAW document — not the loaded envelope.
🛑 Two stores, and the distinction is load-bearing.styleCache holds what
loadAndValidateStyle RETURNS: an envelope with labelConfig, a derived id and metadata.
This one holds what a fetch would have RECEIVED. A raw document put into styleCache
would satisfy every consumer that only reads styleData, and break the legend generator,
which reads styleData.id — the exact defect _ensureStyleId exists to prevent. So the
seeded path runs the same envelope chain as the fetched one; it does not shortcut it.
Style DOCUMENTS pre-seeded from a profile bundle, keyed like styleCache (
"profileId:layerId:styleId"), holding the RAW document — not the loaded envelope.🛑 Two stores, and the distinction is load-bearing. styleCache holds what
loadAndValidateStyleRETURNS: an envelope withlabelConfig, a derivedidand metadata. This one holds what afetchwould have RECEIVED. A raw document put intostyleCachewould satisfy every consumer that only readsstyleData, and break the legend generator, which readsstyleData.id— the exact defect_ensureStyleIdexists to prevent. So the seeded path runs the same envelope chain as the fetched one; it does not shortcut it.