Repository navigation
spec: creative lifecycle on buy rejection/cancellation (#2254, #2262) - #2622
Merged
Merged
Conversation
…released, creatives remain (#2254, #2262) External contributor filed #2254 flagging that the spec did not define what happens to synced creatives when a media buy is subsequently rejected or canceled. Partial text was added to creative-libraries.mdx adopting the decoupled interpretation, but the rule wasn't discoverable from the media-buy side and #2262's open questions (review flow fate, capability-flag scope) were left implicit. Changes: - docs/media-buy/specification.mdx (Media Buy State Transitions): normative bullet stating assignments are released on rejection/ cancellation; creatives remain in the library, reusable by creative_id — including inline creatives. Creative review proceeds independently; agents MUST NOT implicitly reject a creative because its containing buy was rejected. Released assignments no longer appear in get_media_buys responses for that buy. - docs/media-buy/specification.mdx (Package-level lifecycle): clarifies package cancellation releases assignments on that package only; other packages unaffected. - docs/creative/creative-libraries.mdx (Path 2 inline): reverse cross-reference to the media-buy rule, MUST on deliberate-review- decision rejections, capability-flag scope note. Scope excludes #2260 (retention floor, stays 3.1) and purge- notification webhooks (stays 3.1). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Contributor
Schema Link Check ResultsCommit:
|
Fix reviewer-identified issues: - BLOCKER (dx-expert): broken anchor #creative-state-vs-assignment-state → actual Docusaurus slug #creative-state-and-assignment-state-are-separate - Protocol nit (ad-tech-protocol-expert): "silently absent" observability was too weak. Add explicit "the media-buy-level canceled/rejected transition IS the audit record for all its released assignments; buyers MUST NOT rely on per-assignment diffs." Frames existing history + webhook notifications as the intentional audit surface. - DX nit (dx-expert): retention punt without a floor weakens the reusability contract. Add SHOULD-90-days placeholder referencing #2260 where the normative contract lands. 90 matches existing variant-retention guidance. - DX nit (dx-expert): 180-word run-on bullet. Split into four separate bullets (release, review independence, observability, retention) at the same list level. - PM nit (adtech-product-expert): buyer guidance incomplete. Add "SHOULD call list_creatives to verify" for the affirmative reusability check. - Protocol nit (ad-tech-protocol-expert): creative_deadline scoping. Add one-sentence carve-out — prior package's deadline has no bearing on the creative's eligibility for a new buy. - DX nit (ad-tech-protocol-expert): "regardless of whether via sync_creatives" → "regardless of submission path" in creative-libraries.mdx capability-flag scope note. - DX nit (dx-expert): MUST-NOT-implicitly-reject needle. Add explicit "the buy's rejected status is not itself sufficient" clause for the policy-triggered creative rejection case. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
bokelley
added a commit
that referenced
this pull request
Apr 21, 2026
Before #2619, re-cancel of a canceled buy was spec-ambiguous — §128 MAY NOT_CANCELLABLE and §129 MUST INVALID_STATE both applied. state-machine.yaml reflected the ambiguity with "Either reject with INVALID_STATE or accept idempotently." #2619 pinned NOT_CANCELLABLE as the required code for re-cancel. This storyboard now matches: - expect_error: true (was missing — allowed idempotent accept) - Expected code: NOT_CANCELLABLE (was INVALID_STATE-or-accept) - validations: error_code check + context echo (mirrors invalid_transitions.yaml > second_cancel pattern) Narrative updated to explain the carve-out: cancellation-specific code takes precedence over the generic terminal-state rule; idempotent acceptance is NOT conformant. No other storyboards tested this case; invalid_transitions.yaml's second_cancel phase already expected NOT_CANCELLABLE and stays correct. No conflicts found with #2620 or #2622 storyboards. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
bokelley
added a commit
that referenced
this pull request
Apr 21, 2026
* storyboards: align state-machine recancel_buy with #2619 spec tightening Before #2619, re-cancel of a canceled buy was spec-ambiguous — §128 MAY NOT_CANCELLABLE and §129 MUST INVALID_STATE both applied. state-machine.yaml reflected the ambiguity with "Either reject with INVALID_STATE or accept idempotently." #2619 pinned NOT_CANCELLABLE as the required code for re-cancel. This storyboard now matches: - expect_error: true (was missing — allowed idempotent accept) - Expected code: NOT_CANCELLABLE (was INVALID_STATE-or-accept) - validations: error_code check + context echo (mirrors invalid_transitions.yaml > second_cancel pattern) Narrative updated to explain the carve-out: cancellation-specific code takes precedence over the generic terminal-state rule; idempotent acceptance is NOT conformant. No other storyboards tested this case; invalid_transitions.yaml's second_cancel phase already expected NOT_CANCELLABLE and stays correct. No conflicts found with #2620 or #2622 storyboards. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * add changeset for storyboard-recancel-alignment fixup Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
3 of 4 tasks
bokelley
added a commit
that referenced
this pull request
Apr 21, 2026
…) (#2641) PR #2622 / merged #2623 pinned the decoupled creative-lifecycle rule: canceling a media buy releases its package-creative assignments but leaves the creatives in the library, reusable by creative_id. The spec change had no runtime conformance test — every sales specialism tests sync_creatives during a successful flow, but none tested creative state after a buy cancel end-to-end. A seller that evaporated library creatives on cancel, or implicitly flipped them to rejected, could pass every existing storyboard. New scenario exercises the full loop with synchronous AdCP tools (no new infrastructure): 1. setup — create buy, sync creative with inline assignment 2. verify_creative_in_library_pre_cancel — list_creatives baseline 3. cancel_buy — update_media_buy canceled: true 4. verify_creative_persists_post_cancel — list_creatives still returns creative; status in {processing, pending_review, approved} (NOT rejected, NOT archived) 5. reuse_creative_on_new_buy — sync_creatives assigning the original creative_id to a second buy's package Hooked into media-buy/index.yaml requires_scenarios so every seller claiming the track MUST pass it. Sellers without a creative library grade not_applicable. Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
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
External contributor filed #2254 flagging an undefined behavior in the media-buy lifecycle: what happens to synced creatives when a media buy is subsequently rejected or canceled? Two defensible interpretations existed: atomic (buy rejection unwinds the creative create) or decoupled (creative enters the library regardless; buy rejection only releases the assignment).
Partial text was added to
creative-libraries.mdx:252adopting the decoupled interpretation, but the rule wasn't discoverable from the media-buy side and #2262's open questions (review flow fate, capability-flag scope, inline vs sync equivalence) were left implicit. This PR closes the loop.Decision
Decoupled semantics are normative. The creative lifecycle is independent of the containing buy's lifecycle. Assignments are released on buy rejection or cancellation; the creatives themselves remain in the creative library and are reusable.
Changes
docs/media-buy/specification.mdx(Media Buy State Transitions): normative bullet stating creative assignments are released on rejection/cancellation; creatives remain in the library, reusable bycreative_id— including inline creatives submitted on the rejected/canceled create. Creative review proceeds independently; sales agents MUST NOT implicitly reject a creative because its containing buy was rejected. Released assignments no longer appear inget_media_buysresponses for that buy.docs/media-buy/specification.mdx(Package-level lifecycle): clarifies package cancellation releases assignments on the canceled package only; other packages on the same buy are unaffected.docs/creative/creative-libraries.mdx(Path 2 inline): reverse cross-reference to the media-buy rule, MUST on deliberate-review-decision rejections (no implicit cascade from buy status), capability-flag scope note (inline_creative_management: trueadvertises acceptance, not lifecycle tie).Scope deliberately excluded
Test plan
npm run test:unitpasses (631 tests)npm run typecheckpassesCloses #2254. Closes #2262.
🤖 Generated with Claude Code