Skip to content

feat(compliance): add vendor_metric optimization-goal storyboard coverage#4939

Draft
bokelley wants to merge 1 commit into
mainfrom
claude/issue-4933-vendor-metric-optimization-storyboard
Draft

feat(compliance): add vendor_metric optimization-goal storyboard coverage#4939
bokelley wants to merge 1 commit into
mainfrom
claude/issue-4933-vendor-metric-optimization-storyboard

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

Closes #4933

Adds storyboard coverage for the 3.1 vendor_metric optimization goal contract, which was missing from the compliance suite. A seller could previously pass the existing vendor_metric_accountability storyboard without proving it enforces the 3.1 optimization-goal acceptance/rejection rules.

Changes

New storyboard static/compliance/source/protocols/media-buy/scenarios/vendor_metric_optimization_flow.yaml:

  • Positive path: kind: "vendor_metric" goal accepted when (vendor, metric_id) is in vendor_metric_optimization.supported_metrics[], target.kind is in supported_targets, and package has a matching vendor-scope committed_metrics[] entry
  • Negative path A: goal rejected (INVALID_REQUEST) when (vendor, metric_id) is not in the product's supported_metrics
  • Negative path B: goal rejected (INVALID_REQUEST) when optimization goal is capability-valid but the package has no vendor-scope committed_metrics entry (reporting-coherence precondition failure — distinct from a TERMS_REJECTED committed_metrics over-proposal)
  • Discovery SHOULD (path 5 from issue — seller SHOULD verify metric_id in vendor's catalog) documented in narrative; not asserted as failing since the spec is SHOULD-level in 3.1

Training-agent fixtures (server/src/training-agent/):

  • types.ts: added vendorMetricOptimization optional field to PublisherProfile
  • publishers.ts: added attention_score to pinnacle_news vendorMetrics and vendorMetricOptimization.supported_metrics
  • product-factory.ts: spread vendor_metric_optimization onto the product build alongside the existing metric_optimization pattern

Non-breaking justification: entirely additive — new storyboard file, new optional TypeScript field, new publisher capability entry; no existing storyboard, schema, or publisher profile is modified.

Pre-PR review:

  • code-reviewer: approved — blocker fixed (renamed key: to name: in context_outputs); nit noted (TypeScript type could be tighter, low risk)
  • ad-tech-protocol-expert: approved — INVALID_REQUEST confirmed correct for both negative paths; path B narrative clarified to distinguish reporting-coherence precondition failure from TERMS_REJECTED committed_metrics over-proposal; omitting requires_capability is correct since vendor_metric_optimization is product-level only

Nits (not fixed): one unexercised MUST-level path (target.kind not in supported_targets) surfaced by review — flagged for follow-up issue rather than scope-expanding this PR.

Triage-managed PR. This bot does not currently iterate on
review comments or PR conversation threads (only on the source
issue). To unblock:

  • Push fixup commits directly: gh pr checkout <num>
    fix → push.
  • Or re-trigger: comment /triage execute on the source
    issue.

See #3121
for context.

Session: https://claude.ai/code/session_01VtKu8sAUEWAHRPMiZJBgHw


Generated by Claude Code

…rage (#4933)

Adds storyboard media_buy_seller/vendor_metric_optimization_flow exercising
the 3.1 vendor_metric goal contract: positive acceptance when all preconditions
are met, plus two negative paths for capability mismatch and reporting-coherence
failure. Updates training-agent publishers.ts + product-factory.ts to surface
vendor_metric_optimization on products.

https://claude.ai/code/session_01VtKu8sAUEWAHRPMiZJBgHw
@bokelley bokelley added the claude-triaged Issue has been triaged by the Claude Code triage routine. Remove to re-triage. label May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude-triaged Issue has been triaged by the Claude Code triage routine. Remove to re-triage.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

compliance: add vendor_metric optimization-goal storyboard coverage

2 participants