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
feat: find a message by request id or idempotency key
A caller that lost its `MessageReference` had no way to rebuild one, so
a web request that timed out, a process that restarted, or a retry that
arrived on another node could not read what the first attempt produced.
The enqueue path already deduplicates by idempotency key, so the row
could be found. Nothing public could find it.
`find_by` is shaped like `ActiveRecord::Base.find_by`, and the receiver
carries the scope the key needs:
SolidObjects.client.find_by(request_id: id)
CartActor.ref("alice").find_by(idempotency_key: key)
A request id is unique across the table, so the client answers it. An
idempotency key is unique per instance, so a reference answers it. A
caller cannot write a lookup the indexes cannot serve.
Every lookup runs the same authorization hook the original call ran,
against the stored operation and arguments, because a request id is not
a capability. An absent row, an actor this process no longer registers,
and a caller the policy refuses all return `nil`, so the lookup cannot
be used to ask whether a request id exists.
`MessageReference#outcome` reports the status, the result, the
persisted error, the rejection, and the attempt count, so a terminal
failure answers as well as a success.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments