Repository navigation
feat(creative): report how current creative assignment and approval state is - #8174
Conversation
…tate is A buyer reading creative state cannot tell how current it is. Sellers whose source of truth confirms assignment or approval asynchronously (for example, a system that confirms a day after the write) serve state that may predate the buyer's last write, and the buyer cannot tell "not yet confirmed" from "confirmed". Apply the existing media_buys[].status_as_of pattern to creative state with four optional, non-nullable date-time fields: get_media_buys packages[].creative_assignments_as_of and creative_approvals[].approval_status_as_of, and list_creatives creatives[].status_as_of and assigned_packages[].approval_status_as_of. Each value is the seller's last observation of its source of truth and is not advanced by accepting an AdCP write alone, so a value earlier than the buyer's last accepted write means that write is unconfirmed. A change that only advances an *_as_of value fires no creative webhook and writes no account change record. The get_media_buys/list_creatives consistency rule now lets approval_status_as_of differ between reads, reconciling toward the newer observation. No re-pull task is added: keeping state current remains the seller's job. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated schema paths require human/CODEOWNERS approval.
This PR modifies protocol source-of-truth files under static/schemas/source/** (creative/list-creatives-response.json, media-buy/get-media-buys-response.json), which fall under the repo's hard, path-based approval gate (gated_paths: true). review_decision is REVIEW_REQUIRED, not APPROVED, so the gate is not satisfied and I cannot approve — decision table row 2 fires.
The change itself looks clean: four optional, non-nullable date-time freshness fields (x-added-in: 3.3.0) extending the existing status_as_of pattern. Schema↔docs coherence holds across all four fields, the minor changeset matches the additive/optional surface, no oneOf or dist/** changes, and the cross-read consistency relaxation is gated on the new field so pre-3.3 adopters are unaffected. Test vector and null-rejection tests match. No blocking or Medium findings were surfaced.
This is a Normative (non-breaking) change, not Breaking-class, so the breaking-change hard gate does not independently apply — but the deterministic gated-paths gate stands until a human/CODEOWNERS approval lands.
Escalation reasons:
- Touches gated schema source
static/schemas/source/creative/list-creatives-response.jsonandstatic/schemas/source/media-buy/get-media-buys-response.json— human/CODEOWNERS review required (review_decisionisREVIEW_REQUIRED).
Why human review
- Modifies gated protocol source static/schemas/source/creative/list-creatives-response.json and static/schemas/source/media-buy/get-media-buys-response.json; review_decision is REVIEW_REQUIRED (not APPROVED), so the hard approval gate requires human/CODEOWNERS review before merge.
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/creative/list-creatives-response.json (modified) matches
static/schemas/source/**; static/schemas/source/media-buy/get-media-buys-response.json (modified) matchesstatic/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.
The existing rule already requires get_media_buys and list_creatives to agree on approval state for a relationship, so both reads describe one observation. Relaxing it for approval_status_as_of was unnecessary and would have loosened a 3.2 MUST. approval_status_as_of now joins the fields that must agree when both reads carry it, keeping this change purely additive. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated protocol source modified and review not yet APPROVED.
This PR modifies two files under the hard approval gate static/schemas/source/** (static/schemas/source/creative/list-creatives-response.json and static/schemas/source/media-buy/get-media-buys-response.json). gated_paths is true and review_decision is REVIEW_REQUIRED (not APPROVED), so decision rule row 2 forces escalation — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded.
The diff itself is clean: it tightens approval_status_as_of from "two reads MAY differ, reconcile toward newer" to "MUST agree when both reads carry it," applied coherently across the changeset, both schemas, and both docs. The removed "reconcile toward newer" clause survives only for indicators_as_of (which may still diverge), leaving no contradiction. Schema↔docs coherence holds; the minor changeset is correct for an additive optional field within unreleased 3.3.0; no oneOf/dist/immutability concerns. Only a Low nit (indicative vs normative wording at list_creatives.mdx:57), dropped. No Critical/High/Medium findings.
Escalation reasons
- Modifies gated protocol source
static/schemas/source/creative/list-creatives-response.jsonandstatic/schemas/source/media-buy/get-media-buys-response.json;review_decisionisREVIEW_REQUIRED, notAPPROVED. Human/CODEOWNERS review is required before merge.
Why human review
- Gated path: static/schemas/source/creative/list-creatives-response.json and static/schemas/source/media-buy/get-media-buys-response.json match static/schemas/source/** (hard approval gate) and review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS review required before merge.
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/creative/list-creatives-response.json (modified) matches
static/schemas/source/**; static/schemas/source/media-buy/get-media-buys-response.json (modified) matchesstatic/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.
Summary
A buyer reading creative state from a sales agent can't tell how current it is. A seller may confirm assignments and approvals asynchronously, for example a system that confirms a day after the write. A buyer seeing
pending_reviewor a missing assignment can't tell "the seller's system says so" from "the seller hasn't heard back yet".This PR applies the existing
media_buys[].status_as_ofpattern to creative state. Keeping state current stays the seller's job. AdCP does not get a "re-pull" task and does not assume what sits behind the sales agent. The buyer only learns how current each answer is.Four optional, non-nullable
date-timefields (x-added-in: 3.3.0):get_media_buyspackages[].creative_assignments_as_ofget_media_buyspackages[].creative_approvals[].approval_status_as_ofapproval_status,rejection_reason,approval_scopeslist_creativescreatives[].status_as_ofstatuslist_creativesassignments.assigned_packages[].approval_status_as_oflist_creativesRules, in a new creative state freshness section:
*_as_ofvalue fires nocreative.assignment_changed/creative.status_changedand writes no account change record.approval_status_as_ofjoins the fieldsget_media_buysandlist_creativesMUST agree on for the same relationship, when both carry it. The existing agreement rule is unchanged, so this PR is purely additive.STALE_RESPONSE: described as the complementary signal for when the seller could not reach its source and served cached state past its freshness target.This is one of three related 3.3 PRs about creative state a buyer can rely on. The other two:
Test plan
status-as-ofvectors extended: a newcreative-state-freshnessvector, declaration checks for all four fields, and a test that null is rejected (15/15)build:compliance --check, changeset scope🤖 Generated with Claude Code