#3591917 Array prop shapes inherit their item shape's cache tags
Closes #3591917 (closed)
What this MR does
Makes array (type: array) prop shapes inherit the cache tags of their item prop shape. EphemeralPropShapeRepository now collects the cacheability of every prop shape resolved while computing another one and merges it into the outer candidate before the alter hooks run, so PersistentPropShapeRepository stores array entries with tags like config:media_type_list and tag invalidation re-resolves them. The alternative of putting cacheability on StorablePropShape was rejected: it is an immutable value object whose content is compared (fieldDataFitsIn()), so tags would leak into equality semantics.
The regression test also restores the cache_tags_invalidator / needs_destruction service tags that PropShapeRepositoryTest::register() silently dropped when swapping in the test helper class — with them back, the test exercises the real MediaType-save → invalidation → destruct cycle instead of simulating it.
Testing steps
- On 1.x without this MR, on a site with
canvas_test_sdccomponents generated and no image media type: create an image media type, then trigger prop-shape re-resolution (any warm request / cache-tag invalidation cycle). sdc.canvas_test_sdc.imagegets a new active version (media library reference shape);sdc.canvas_test_sdc.image-gallerykeeps only its old version until a fulldrush cr.- With this MR, both get their new version in step 2. Covered by the new kernel test
PropShapeRepositoryTest::testArrayPropShapeInheritsItemPropShapeCacheTags()(verified to fail without the fix), which also runs in theHookCanvasStorablePropAlterandMediaLibraryHookStoragePropAltersubclasses.
Notes for reviewers
Written with AI assistance (Claude Fable 5 / Claude Opus 4.8): investigation, fix, and regression test were AI-drafted and human-reviewed; the empirical reproduction is documented in #3591917 (closed) and #3591916.