feat: audience governance schemas + match breakdown#380
Merged
Conversation
…sting Sync schemas from AdCP PR #1593. Adds audience-selector (discriminated union), audience-constraints, restricted-attribute (GDPR Article 9 enum), and match-id-type schemas. Adapts to breaking upstream changes: buyer_ref removed from create/update_media_buy, buyer_campaign_ref removed from governance requests, governance_context changed from structured object to opaque string token. Updates GovernanceMiddleware, GovernanceAdapter, and TaskExecutor to thread governance_context through the check -> report lifecycle. Skips outcome reporting when governance agent does not issue a context token. Registers sync_audiences in TOOL_RESPONSE_SCHEMAS. Adds campaign governance scenarios to comply() governance track with audience constraints, policy_categories, restricted_attributes, and audience_distribution. Signals flow reports governance metadata availability. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Force-refresh media-buy schemas to pick up buyer_ref removal, context field additions, and PackageUpdate restructuring from upstream. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
EmmaLouise2018
approved these changes
Mar 23, 2026
bokelley
added a commit
that referenced
this pull request
Mar 23, 2026
Regenerate types, keep governanceContext optional for backward compat. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
buyer_refremoved from media buy,buyer_campaign_refremoved from governance,governance_contextnow opaque stringsync_audiencesinTOOL_RESPONSE_SCHEMASfor runtime validationBreaking upstream schema changes handled
buyer_refcreate_media_buy/update_media_buybuyer_campaign_refcheck_governance/report_plan_outcomegovernance_contextparseCheckResponsecaptures token,reportOutcomethreads it through. Skips outcome reporting when absent.policy-entry.verticalspolicy_categoriesbrand.industrybrand.industries(string → string[])Compliance testing additions
policy_categories,audienceconstraints (include/exclude),restricted_attributes,min_audience_sizegovernance_contextround-tripaudience_distributionwith baseline/indices/cumulative_indices, including skewed drift scenariomatch_breakdown,effective_match_ratein response previewrestricted_attributes/policy_categorieson signal definitionsTest plan
npm run buildpasses (clean TypeScript compilation)🤖 Generated with Claude Code