You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The decisioning dispatcher turns IdempotencyConflictError into INTERNAL_ERROR #1622
A decisioning platform method wrapped with IdempotencyStore.wrap raises IdempotencyConflictError (an ADCPTaskError) on a key reused with a different payload. _invoke_platform_method in adcp/decisioning/dispatch.py catches only AdcpError and pydantic ValidationError specifically. Everything else goes to the generic except Exception branch, so the buyer receives INTERNAL_ERROR / terminal instead of the idempotency conflict.
The non-decisioning serve() path translates AdCP-typed exceptions such as IdempotencyConflictError (see the comments around serve.py:3385); the decisioning dispatcher doesn't.
Reproduction
In any decisioning platform, decorate a mutating method with @store.wrap, call it twice with the same idempotency_key and different payloads, and inspect the wire error: INTERNAL_ERROR, details.caused_by = "IdempotencyConflictError". In the Embedded Sales Agent, removing its translate_idempotency_conflict decorator from core/platforms/mock.py turns test_idempotency_conflict_wire_envelope_mcp / _a2a into INTERNAL_ERROR.
Expected
The dispatcher projects ADCPTaskError subclasses (or at least IdempotencyConflictError) to their own wire error, as the serve() path does.
Impact
Every decisioning adopter that uses IdempotencyStore.wrap needs its own translator. ESA keeps translate_idempotency_conflict (core/idempotency.py) for this.
Activity
fix(decisioning): project ADCPTaskError from platform methods to its …