Skip to content

compliance(sales-social): require preview_creative + substitution-safety phase - #4566

Merged
bokelley merged 1 commit into
mainfrom
bokelley/sales-social-substitution-4546
May 15, 2026
Merged

bokelley merged 1 commit into
mainfrom
bokelley/sales-social-substitution-4546

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

Wires sales-social to the existing substitution_observer_runner test-kit contract using preview_creative as 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. Wiring preview_creative into the existing contract is the right move; no new dry_run_substitution capability needed.

Changes

Coverage 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-media follows the same pattern when that specialism reaches the enum.

Test plan

  • npm run build:compliance passes all lints (24 universal, 6 protocols, 20 specialisms)
  • Typecheck passes
  • Floor sweep on /creative-builder once a runner advertises substitution_observer_runner for sales-social

Closes #4546.

🤖 Generated with Claude Code

…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]>
@bokelley
bokelley merged commit c321afe into main May 15, 2026
19 checks passed
@bokelley
bokelley deleted the bokelley/sales-social-substitution-4546 branch May 15, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

compliance(sales-social): require preview_creative with catalog binding for substitution-safety coverage

1 participant