Repository navigation
fix(training-agent): report pending_creatives in the served release's meaning - #8844
Merged
Merged
Conversation
… meaning Through 3.2, media-buy-status defines pending_creatives as a buy that "has no creatives assigned"; 3.3 redefines it as missing creative coverage. The training agent applied the 3.3 coverage meaning on every session. A 3.1 or 3.2 buyer whose packages all had creatives still saw pending_creatives whenever an activated format was uncovered. deriveStatus now takes the served release (DR-0024). Below 3.3, pending_creatives means a live package has no assignment; at 3.3 and later it means required coverage is missing. formats_to_provide and formats_pending are still reported wherever the release defines them. Closes #8833 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — clean conformance fix (#8833), no blocking findings.
Checked:
deriveStatusnow derives thepending_creativesvocabulary of the served release per DR-0024: pre-3.3 means "no creatives assigned," 3.3+ means missing format coverage — version-gated behavior change.- All 10
deriveStatuscall sites passlifecycleSplitVersionForContext(ctx); none missed. - Version parsing handles
3.3-beta.5(minor=3) correctly;formats_pendingis a valid 3.x field, so emitting it on a 3.1/3.2 pending_start buy is coherent, not a DR-0024 leak. - Server-only change (training-agent); no
static/schemas/source/**,docs/reference/**,dist/**, or changeset-triggering surface touched → no changeset required. NooneOf/dist changes. - Behavior fully tested across 3.1/3.2/3.3-beta.5/3.3.
Decision path: no critical/high/medium findings; high_risk false; gated_paths false; no author-team gate. Rows 1–8 do not fire → row 9 approve. (Note: review_decision is REVIEW_REQUIRED, but gated_paths is false, so row 2 does not apply.)
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 #8833
Summary
On a 3.1 or 3.2 session, the training agent no longer reports
pending_creativesfor a buy whose packages all have creatives assigned. It now reportspending_creativesin the meaning of the release it serves:pending_creativesmeanspending_startbefore the flight,activeonce it startspending_creativesThe 3.1 and 3.2 enum wording stays as published. The fix follows DR-0024: the served release is binding.
The text
enums/media-buy-status.json, 3.1 and 3.2: "The media buy is approved by the seller and has no creatives assigned — the buyer must attach creatives viasync_creativesbefore the buy can serve."media-buy/media-buys/lifecycle.mdx: "If no creatives are assigned at creation, the buy enterspending_creatives. … Delivery cannot begin until the buyer supplies at least one creative per package". The state table readspending_start: "Creatives assigned; waiting for flight date".static/schemas/source): "No package can begin delivery because required creative coverage is missing … Seller review of already assigned creatives alone is pending_start, not pending_creatives."Change
deriveStatusnow takes the served release, and all ten call sites intask-handlers.tspasslifecycleSplitVersionForContext(ctx). A newpendingCreativesTracksCoverageuses the same 3.3 gate ascreativeStartPolicyForWire. Below 3.3,packageNeedsCreativecounts assignments; at 3.3 and later it checks coverage againstformats_to_provide.formats_to_provideandformats_pendingare still reported where the release defines them. A 3.2 buyer can therefore seepending_startwith a non-emptyformats_pendingthat names the formats still uncovered. That is readiness detail; it no longer drives the status.The status is a view, not stored state. The same buy reads
pending_startto a 3.1 or 3.2 caller andpending_creativesto a 3.3 caller.Related
Much of the reported case comes from adcontextprotocol/adcp-client#3665. On a 3.1 session the SDK drops
format_option_refs, so every product format is activated and most stay uncovered. That SDK fix is separate.Validation
server/tests/unit/training-agent.test.ts: 826 passed. Two tests are new or updated:pending_startwithformats_pendingnaming the gap. On the same stored buy,deriveStatusreturnspending_startat3.1and3.2, andpending_creativesat3.3-beta.5and3.3.pending_start, and the same buy readspending_creativesat 3.3.npx tsc --project server/tsconfig.json --noEmit: clean.No changeset: the training agent is outside the protocol release surface.
🤖 Generated with Claude Code