Transactional semantics gap: canceled is not compensated: reference schema for a commitment layer #2124
Replies: 1 comment 4 replies
|
The current states "say nothing about the side effects a task has already produced when it fails or gets canceled mid-chain" is the gap in one line, and the invariant you draw, that a step claiming irreversible cannot also declare a compensation, is the right kind of constraint to build on. The observation worth adding is that your pivot point is not only a lifecycle marker, it is an authorisation boundary, and that changes what the schema has to carry. Before the pivot, an undo runs under the same authority that approved the forward action, so an undo token bound to that mandate is enough to reverse it. After the pivot there is no undo, only a new forward action, a refund or a reversal, and that action needs its own authority, because reversing a captured spend is itself a privileged and spendable act. So the authority mandate probably has to size the compensation path as well as the forward path, with its own cap and expiry, or a compensation becomes an unbudgeted action the original mandate never accounted for. In the same spirit, per step idempotency keys are stronger bound to the canonical bytes of the step than as free tokens, since a replay then cannot present a different payload under the same key. On your second question, the split that seems to hold is A2A declaring compensability and effect context as capability metadata and propagating an effect context identifier across the delegation, while the plan artifact and its invariants sit a layer above. A2A leaves in-task authorisation to implementations and extensions today, so the schema would be defining that authority model rather than reusing one, which is an argument for aligning it with the Agent Card signing and the extension mechanism before parallel approaches harden. Would you expect the undo token and the compensation declaration to be signed under the same mandate that authorised the forward step, so a verifier can confirm the compensation was pre-authorised rather than improvised, or is rollback authority meant to be established separately? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
First off congrats on v1.0, the protocol has come a long way in a year.
I want to raise a design-level question about the task lifecycle. The current states (submitted, working, input-required, completed, failed, canceled) describe the task itself, but say nothing about the side effects a task has already produced when it fails or gets canceled mid-chain. In a multi-step delegation (e.g. vendor onboarding: create record → reserve budget → provision tenant → compliance check → capture fee), a failure at step 4 leaves steps 1-3 in effect with no protocol-level way to unwind them: no saga context propagating across the delegation chain, no way for an agent to advertise “this operation is compensable, here’s how,” no idempotency semantics in the transport.
I wrote a longer analysis of this gap here: https://www.valeriouberti.dev/articles/agents-can-talk-but-they-cannot-commit
To make the discussion concrete rather than hypothetical, I’ve also built a small reference implementation of the missing piece a typed “plan artifact” schema plus a validator that enforces its invariants before execution:
https://github.com/valeriouberti/apology-protocol
The schema carries: step classification (compensable / retriable / irreversible), compensation declared in advance (not improvised at rollback time), an explicit pivot point after which there is no undo, per-step idempotency keys, undo-token TTLs, and an authority mandate (spend cap + expiry). The validator enforces invariants like: no irreversible step before the pivot, undo TTLs must cover the worst-case path to the pivot, and a step that claims irreversible cannot also declare a compensation, if it does, it’s lying about one of them.
Questions for the maintainers/community:
1. Has transactional/compensation semantics been discussed before? (I searched issues/discussions and didn’t find a dedicated thread happy to be pointed to prior art I missed)
2. Is this considered in scope for A2A itself: e.g. reversibility declarations in Agent Cards, effect-context propagation across delegations or deliberately left to a layer above?
3. If a layer above: would it be useful to align the plan-artifact schema with where the spec is heading? I’d rather converge on something interoperable than invent in a vacuum, and I’m happy to adapt the schema to fit A2A’s direction.
All reactions