Repository navigation
compliance(sales-social): require preview_creative + substitution-safety phase - #4566
Merged
Merged
Conversation
…ety phase sales-social previously deferred runtime substitution-safety checks pending an observation-hook design (#2651, closed). The premise that social platforms have no AdCP-level preview hook didn't hold — Meta creative_preview, TikTok/Snap creative-preview APIs, and Amazon Ads / Walmart Connect previews all exercise catalog-item macro substitution as part of rendering. Wire sales-social to the existing substitution_observer_runner test-kit contract using the same preview surface creative-generative already uses post-#2649. No new capability, no new schema. Changes: - static/compliance/source/specialisms/sales-social/index.yaml - Add preview_creative to required_tools - New catalog_substitution_safety phase: push probe catalog with attacker-shaped values → push DPA creative bound to the probe → call preview_creative → observe substituted URLs via the runner contract - Update catalog_driven_dynamic_ads narrative — drop the deferral - static/compliance/source/test-kits/substitution-observer-runner.yaml - Add sales_social to applies_to.specialisms - Remove the deferred-pending-#2651 comment block Coverage limitation (same as creative-generative): preview-time substitution may diverge from impression-time on platforms with different code paths. Serve-time attestation remains a known gap and is not gated for this phase. Closes #4546. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Wires
sales-socialto the existingsubstitution_observer_runnertest-kit contract usingpreview_creativeas the observation hook. Resolves the substitution-safety gap that #2651 originally tried to close with a new capability.The reframe (from #2651 close and #4546): the assumption that social platforms have no AdCP-level preview hook didn't hold. Meta
creative_preview, TikTok/Snap creative-preview APIs, and Amazon Ads / Walmart Connect previews all exercise catalog-item macro substitution as part of rendering. Wiringpreview_creativeinto the existing contract is the right move; no newdry_run_substitutioncapability needed.Changes
static/compliance/source/specialisms/sales-social/index.yamlpreview_creativetorequired_toolscatalog_substitution_safetyphase with four steps:sync_substitution_probe_catalog— push probe catalog with five attacker-shapedskuvalues (reserved chars, nested expansion, non-ASCII, CRLF injection, bidi-override)sync_substitution_probe_creative— push DPA creative bound to the probe catalog with{SKU}in tracker URLspreview_substitution_probe_creative— callpreview_creativeto render against the probeexpect_substitution_safe— substitution-observer runner asserts each binding is percent-encoded per the fixture (gated onrequires_contract: substitution_observer_runner)catalog_driven_dynamic_adsnarrative — drop "tracked under compliance: runtime conformance storyboards for catalog-item macro substitution safety (#2620) #2638" deferralstatic/compliance/source/test-kits/substitution-observer-runner.yamlsales_socialtoapplies_to.specialismsCoverage limitation
Same as
creative-generative: preview-time substitution may diverge from impression-time on platforms with different code paths. Serve-time attestation is a known gap and is not gated for this phase.sales-retail-mediafollows the same pattern when that specialism reaches the enum.Test plan
npm run build:compliancepasses all lints (24 universal, 6 protocols, 20 specialisms)substitution_observer_runnerfor sales-socialCloses #4546.
🤖 Generated with Claude Code