feat(poll): make exact transitions idempotent

This commit is contained in:
2026-07-22 04:39:06 +02:00
parent 8fc030772b
commit 36ceb24954
4 changed files with 213 additions and 8 deletions

View File

@@ -169,8 +169,13 @@ metadata. Every applied transition has a Poll-owned lifecycle audit record.
Re-deciding always appends a record and supersedes the current decision. An
exact retry carrying the same `Idempotency-Key` is a no-op and returns the
original transition record; reusing that key for a different action or option
is rejected. Without an idempotency identity, a repeated transition is invalid
except for the deliberately auditable `decided``decided` action.
is rejected. A command whose requested lifecycle state already holds is also
an idempotent domain no-op, even without an idempotency identity. It returns
the current Poll with `replayed=true` and `transition=null`, does not append a
lifecycle audit record, and is emitted only to operational logs as duplicate
command telemetry. A new idempotency key supplied for such an audit-free no-op
is not consumed. Re-deciding with a different option remains a new auditable
action; repeating the current decision is a no-op.
Poll API representations expose every lifecycle action with its availability
and, when unavailable, the policy reason. Management clients can use the