feat(compliance): add vendor_metric optimization-goal storyboard coverage#4939
Draft
bokelley wants to merge 1 commit into
Draft
feat(compliance): add vendor_metric optimization-goal storyboard coverage#4939bokelley wants to merge 1 commit into
bokelley wants to merge 1 commit into
Conversation
…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
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.
Closes #4933
Adds storyboard coverage for the 3.1
vendor_metricoptimization goal contract, which was missing from the compliance suite. A seller could previously pass the existingvendor_metric_accountabilitystoryboard 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:kind: "vendor_metric"goal accepted when(vendor, metric_id)is invendor_metric_optimization.supported_metrics[],target.kindis insupported_targets, and package has a matching vendor-scopecommitted_metrics[]entryINVALID_REQUEST) when(vendor, metric_id)is not in the product'ssupported_metricsINVALID_REQUEST) when optimization goal is capability-valid but the package has no vendor-scopecommitted_metricsentry (reporting-coherence precondition failure — distinct from aTERMS_REJECTEDcommitted_metricsover-proposal)metric_idin vendor's catalog) documented in narrative; not asserted as failing since the spec is SHOULD-level in 3.1Training-agent fixtures (
server/src/training-agent/):types.ts: addedvendorMetricOptimizationoptional field toPublisherProfilepublishers.ts: addedattention_scoretopinnacle_newsvendorMetricsandvendorMetricOptimization.supported_metricsproduct-factory.ts: spreadvendor_metric_optimizationonto the product build alongside the existingmetric_optimizationpatternNon-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:
key:toname:incontext_outputs); nit noted (TypeScript type could be tighter, low risk)INVALID_REQUESTconfirmed correct for both negative paths; path B narrative clarified to distinguish reporting-coherence precondition failure fromTERMS_REJECTEDcommitted_metricsover-proposal; omittingrequires_capabilityis correct sincevendor_metric_optimizationis product-level onlyNits (not fixed): one unexercised MUST-level path (
target.kindnot insupported_targets) surfaced by review — flagged for follow-up issue rather than scope-expanding this PR.Session: https://claude.ai/code/session_01VtKu8sAUEWAHRPMiZJBgHw
Generated by Claude Code