feat(media): AI image labeling for Art. 50(4) AI Act compliance #10
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/ai-image-labeling-media-custom-fields"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implements KI-Bildkennzeichnung (AI image labeling) required by Art. 50(4) AI Act
(effective 2026-08-02): AI-generated/-modified product images must be visibly
labeled in the shop. Covers all plugin-side work; imagor infrastructure and
shop-level config (#8, #9) live in separate Docker-Stacks repos and are tracked
there.
mediacustom field set (ai_statusauto-flag,ai_typemanualclassification incl. false-positive correction option),
CustomFieldsInstallergeneralized to support multiple field sets. Also fixes a pre-existing
services.xmlbug (missingConnectionargument) and repairs the previouslybroken
CustomFieldsInstallerTest.MediaUploadedEventsubscriber dispatches anon-blocking Messenger message (routed to the existing
asynctransport, nonew worker needed), handler shells out to
c2patoolto detect AIdigitalSourceTypeand setsai_statuswithout ever clobbering a manualai_typecorrection.ImagorUrlBuilder+RemoteThumbnailUrlSubscriberhook intoShopware's
ResolveRemoteThumbnailUrlExtension(verified againstdeveloper.shopware.com and the installed 6.7.10.2 core) to deliver
watermarked thumbnails via imagor.
ImagorMediaUrlGeneratordecoratesAbstractMediaUrlGeneratorso thestorefront
<img src>fallback (not justsrcsetthumbnails) is alsowatermarked — confirmed via compiled-container inspection that this is a
separate core extension point from #6.
ProductPageSubscriberTestnever actually ran (PHPUnit 9 APIaddMethods(), removed in PHPUnit 10+, silently masked since PHPUnit wasn'tinstalled in the DDEV shop at all before this branch). Fixed to mock the real
MetaInformationclass, which also exposed a second stale-test bug (wrongSystemConfigServicekey) that's fixed alongside.Closes #4, closes #5, closes #6, closes #7.
Test plan
php -lon all new/changed filesplugin:update)entity_namerelations + field types + select optionsdebug:messengerconfirmsScanMediaForAiContentMessage→ handled byScanMediaForAiContentHandlerdebug:event-dispatcherconfirmsMediaUploadSubscriberwired tomedia.uploadeddebug:containerconfirmsAbstractMediaUrlGeneratoris aliased toImagorMediaUrlGeneratorand used by all real core consumers(
MediaUrlLoader,RemoteThumbnailLoader,DownloadResponseGenerator, ...)ai_status=true)blocked on
c2patoolbeing available in a container — tracked in #9instance +
shopware.media.remote_thumbnails.enable=true— tracked in #8/#9https://claude.ai/code/session_013ErZKviNQ71DNFxYYU1Y32