Skip to content

fix(schema): align the optimization goal views definition with delivery-metrics - #7735

Merged
bokelley merged 1 commit into
mainfrom
rachitm022/optimization-goal-views-definition
Sep 29, 2026
Merged

bokelley merged 1 commit into
mainfrom
rachitm022/optimization-goal-views-definition

Conversation

@rachitm022

Copy link
Copy Markdown
Collaborator

Closes #7734.

The optimization goal metric description said views meant "viewable impressions". Everywhere else in the spec, views is a content view counted toward the billable view threshold:

  • core/delivery-metrics.json views: "a platform-defined view event (e.g., 30 seconds or video midpoint)… When the package uses CPV pricing, spend = views × rate."
  • pricing-options/cpv-option.json: "Cost Per View (at publisher-defined threshold)", with a completion or duration threshold.
  • Viewable impressions have their own carrier (viewability.viewable_impressions), their own pricing model (vCPM) and, since feat(schema): add viewable_rate optimization goal with viewability standard and vendor #7697, their own goal metric (viewable_rate).

So a buyer reading the goal description asked for viewable impressions, while a seller reported views as view events, which is also the CPV billing quantity.

Changes

  • static/schemas/source/core/optimization-goal.json: the views entry in the metric description now reads "content views at the billable view threshold, as defined by delivery-metrics views; for viewability use viewable_rate".
  • Changeset (patch).

No enum, type, required-field or validation change. canonical-optimization-goal.json has no conflicting description, so it is untouched.

Classification

Only a description changes, but it changes what a metric: "views" goal asks a seller to optimise for. Per the constitution ("when in doubt, classify up") this may be Normative or Breaking rather than Editorial, so it should not be self-merged until a maintainer rules on the class in #7734.

Testing

  • node --test tests/viewable-rate-optimization-goal.test.cjs: 14 of 14 passed.
  • node tests/schema-validation.test.cjs: 35 of 35 passed.
  • npm run test:mcp-schema-projection: 36 of 36 passed, so the longer description still fits the context budgets.
  • npm run test:schemas: all suites passed.
  • Pre-commit hooks were not run: dependencies were installed with --ignore-scripts.

🤖 Generated with Claude Code

…ry-metrics

The optimization goal metric description said `views` meant viewable
impressions. Delivery-metrics defines `views` as content views counted
toward the billable view threshold (the quantity CPV bills on), and
viewability already has its own goal metric, `viewable_rate`. Reword the
`views` entry to match delivery-metrics and point viewability goals at
`viewable_rate`. Description only; no enum, type or validation change.

Closes #7734

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@rachitm022
rachitm022 requested a review from bokelley September 28, 2026 15:52

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Escalate to human review

Escalate — gated path requires human/CODEOWNERS review.

This PR modifies static/schemas/source/core/optimization-goal.json, which matches the hard approval gate glob static/schemas/source/** (gated_paths: true). The review_decision is REVIEW_REQUIRED, not APPROVED, so the gate is not satisfied (decision table row 2).

The change itself is a one-line editorial correction to the views metric description — replacing "viewable impressions" wording with "content views at the billable view threshold" and pointing viewability goals at viewable_rate. The reviewer verified coherence with delivery-metrics.json, cpv-option.json, docs, and canonical-optimization-goal.json, confirmed the changeset is present and patch-scoped, and found no enum/type/required/validation change. No Critical/High/Medium findings.

Despite the clean diff, this schema-source file is under a deterministic hard approval gate that lifts only when a human/CODEOWNERS review marks the PR APPROVED.

Escalation reasons:

  • static/schemas/source/core/optimization-goal.json is under a hard approval gate (static/schemas/source/**) and review_decision is REVIEW_REQUIRED — human/CODEOWNERS approval required before merge.

Why human review

  • Modifies static/schemas/source/core/optimization-goal.json, a gated path (static/schemas/source/**), while review_decision is REVIEW_REQUIRED — requires human/CODEOWNERS approval.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/optimization-goal.json (modified) matches static/schemas/source/**) and the current GitHub review decision is 'REVIEW_REQUIRED', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@aao-secretariat aao-secretariat Bot added the ladon/needs-human-review Ladon has escalated this PR for human review. label Sep 28, 2026

Copy link
Copy Markdown
Contributor

Thanks @rachitm022. This is the right fix, and it matters more now that 3.2 adds the dedicated viewable_rate goal.

One more place has the same stale wording. Could you include it here so the docs and schema agree when this ships?

docs/media-buy/conversion-tracking/index.mdx:550 (metric table):

-| `views` | count/impression | — | Viewable impressions, counted at the seller's platform threshold. For a viewability rate target, use `viewable_rate`, which names the standard and vendor. |
+| `views` | count/impression | — | Content views counted at the billable view threshold, as defined by delivery-metrics `views` (the quantity CPV bills on). For a viewability rate target, use `viewable_rate`, which names the standard and vendor. |

We're targeting this for 3.2 GA.

@bokelley bokelley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving for 3.2 GA. I'll handle the matching docs row in conversion-tracking/index.mdx in a follow-up PR.

@bokelley
bokelley merged commit 1e522b3 into main Sep 29, 2026
57 checks passed
@bokelley
bokelley deleted the rachitm022/optimization-goal-views-definition branch September 29, 2026 11:57
@bokelley

Copy link
Copy Markdown
Contributor

Applied in fb39ff7. docs/media-buy/conversion-tracking/index.mdx:550 now reads:

Content views counted at the billable view threshold, as defined by delivery-metrics views (the quantity CPV bills on). For a viewability rate target, use viewable_rate, which names the standard and vendor.

Schema and docs should now agree for 3.2.


Generated by Claude Code

bokelley added a commit that referenced this pull request Sep 29, 2026
)

The conversion-tracking metric table still described views as viewable
impressions, which #7735 corrected in the optimization goal schema.
Align the row with delivery-metrics views (content views at the billable
view threshold, the quantity CPV bills on).

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ladon/needs-human-review Ladon has escalated this PR for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

optimization-goal: views is described as "viewable impressions", contradicting delivery-metrics and CPV

2 participants