Skip to content

feat: Async sync_creatives lifecycle (submitted/working/input-required responses) #1092

Description

@KonstantinMirin

Summary

AdCP spec defines 3 async response schemas for sync_creatives:

  • SyncCreativesAsyncResponseSubmitted — returned when sync operation is queued
  • SyncCreativesAsyncResponseWorking — progress info during processing
  • SyncCreativesAsyncResponseInputRequired — pause conditions requiring human input

Library types exist in adcp.types.generated_poc.media_buy. Salesagent has zero implementation.

Spec Obligations

  • UC-006-ASYNC-LIFECYCLE-01 (P3, MUST)
  • UC-006-ASYNC-LIFECYCLE-02 (P3, MUST)
  • UC-006-ASYNC-LIFECYCLE-03 (P3, MUST)

Implementation Scope

  1. Extend schemas with local types inheriting from library async response types
  2. Add async mode parameter to sync_creatives
  3. Background task queue (Celery/RQ) for async creative processing
  4. Progress tracking during sync
  5. Pause/resume mechanism for input-required scenarios
  6. Status endpoint for checking async task progress

Context

This aligns with the broader architectural direction: adapters should NOT run in the HTTP request cycle. The correct flow is accept order → validate against local Postgres → return 201 pending → background worker calls adapter → update status → notify buyer.

Currently 3 xfailed tests cover these obligations in tests/integration/test_creative_sync_behavioral.py.

Metadata

Metadata

Type

No type

Projects

Status
Ready for Dev

Relationships

None yet

Development

No branches or pull requests

Issue actions