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
Context
While validating bokelley/salesagent#631, we added
revisionandconfirmed_atto 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
revisionis an optimistic concurrency token for media-buy mutations.1, when a seller-side media buy is minted synchronously.expected_revisionon mutation when available, and retry/reload on conflict.confirmed_atis the seller commitment/confirmation timestamp, not a delivery-state timestamp. It should remain stable across pause/resume and other later state transitions.confirmed_at = nulluntil seller commitment happens.Proposed SDK work
expected_revisionusage on update.confirmed_atis preserved after later updates rather than recalculated from current status.Acceptance criteria
revisionas the media-buy concurrency token.confirmed_atas seller commitment time.Discovered in