Skip to content

Document revision and confirmed_at semantics in media buy response models #886

@bokelley

Description

@bokelley

Context

While validating bokelley/salesagent#631, we added revision and confirmed_at to the seller implementation for create/get/update media buy flows and found the expected semantics are easy to get subtly wrong without SDK-level guidance.

Semantics we needed

  • revision is an optimistic concurrency token for media-buy mutations.
  • create returns the initial revision, usually 1, when a seller-side media buy is minted synchronously.
  • update returns the new revision after a mutating update.
  • clients should pass the last observed revision as expected_revision on mutation when available, and retry/reload on conflict.
  • confirmed_at is the seller commitment/confirmation timestamp, not a delivery-state timestamp. It should remain stable across pause/resume and other later state transitions.
  • pending/manual approval flows may have confirmed_at = null until seller commitment happens.

Proposed SDK work

  • Ensure create/get/update response model docstrings/comments describe these fields consistently.
  • Add client-facing docs or examples showing expected_revision usage on update.
  • Add tests/fixtures showing that confirmed_at is preserved after later updates rather than recalculated from current status.

Acceptance criteria

  • SDK generated/reference docs explain revision as the media-buy concurrency token.
  • SDK generated/reference docs explain confirmed_at as seller commitment time.
  • At least one example demonstrates reading revision from create/get and passing it to update.

Discovered in

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingclaude-triageddocumentationImprovements or additions to documentation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions