Skip to content

fix(training-agent): report pending_creatives in the served release's meaning - #8844

Merged
bokelley merged 1 commit into
mainfrom
fix/training-agent-pending-creatives-by-release
Nov 9, 2026
Merged

bokelley merged 1 commit into
mainfrom
fix/training-agent-pending-creatives-by-release

Conversation

@bokelley

@bokelley bokelley commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Closes #8833

Summary

On a 3.1 or 3.2 session, the training agent no longer reports pending_creatives for a buy whose packages all have creatives assigned. It now reports pending_creatives in the meaning of the release it serves:

Served release pending_creatives means A buy with every package assigned but coverage incomplete
3.0 (storyboard compat), 3.1, 3.2 a live package has no creative assigned pending_start before the flight, active once it starts
3.3 required creative coverage is missing pending_creatives

The 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 via sync_creatives before the buy can serve."
  • 3.1 media-buy/media-buys/lifecycle.mdx: "If no creatives are assigned at creation, the buy enters pending_creatives. … Delivery cannot begin until the buyer supplies at least one creative per package". The state table reads pending_start: "Creatives assigned; waiting for flight date".
  • 3.3 (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

deriveStatus now takes the served release, and all ten call sites in task-handlers.ts pass lifecycleSplitVersionForContext(ctx). A new pendingCreativesTracksCoverage uses the same 3.3 gate as creativeStartPolicyForWire. Below 3.3, packageNeedsCreative counts assignments; at 3.3 and later it checks coverage against formats_to_provide.

formats_to_provide and formats_pending are still reported where the release defines them. A 3.2 buyer can therefore see pending_start with a non-empty formats_pending that 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_start to a 3.1 or 3.2 caller and pending_creatives to 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:
    • "snapshots canonical requirements and tracks readiness per package format". At the default release (3.2), a partly covered buy is now pending_start with formats_pending naming the gap. On the same stored buy, deriveStatus returns pending_start at 3.1 and 3.2, and pending_creatives at 3.3-beta.5 and 3.3.
    • "does not report pending_creatives on 3.1 once every package has a creative". This is the reported case end to end on a 3.1 session: one creative assigned, no format selector, a multi-format display product. The buy reads pending_start, and the same buy reads pending_creatives at 3.3.
  • Training-agent unit and tenant suites: see the PR checks.
  • npx tsc --project server/tsconfig.json --noEmit: clean.

No changeset: the training agent is outside the protocol release surface.

🤖 Generated with Claude Code

… 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]>

@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: Approve

Approve — clean conformance fix (#8833), no blocking findings.

Checked:

  • deriveStatus now derives the pending_creatives vocabulary 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 deriveStatus call sites pass lifecycleSplitVersionForContext(ctx); none missed.
  • Version parsing handles 3.3-beta.5 (minor=3) correctly; formats_pending is 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. No oneOf/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.)

@bokelley
bokelley merged commit 77d22c8 into main Nov 9, 2026
57 checks passed
@bokelley
bokelley deleted the fix/training-agent-pending-creatives-by-release branch November 9, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pending_creatives means "no creatives assigned" in the 3.1 and 3.2 enums, but the training agent applies the 3.3 coverage meaning on a 3.1 session

1 participant