# ash_onetime v0.5.0 - Table of Contents

> An Ash extension for explicit idempotency and one-time nonce semantics

## Pages

- [ash_onetime](readme.md)
- [Getting started](getting-started.md)
- [Resource DSL](dsl.md)
- [Idempotency](idempotency-1.md)
- [One-time nonces](one-time-nonces.md)
- [External effects and recovery](external-effects.md)
- [Replay: fresh execution vs stored replay](replay.md)
- [Custom lifecycle callbacks on protected actions](custom-lifecycle.md)
- [Errors and HTTP mapping](errors.md)
- [Operations](operations.md)
- [Security model](security-2.md)
- [Recipes](recipes.md)
- [Telemetry](telemetry.md)
- [Upgrading](upgrading.md)
- [FAQ](faq.md)
- [Idempotency — store-and-replay](idempotency-3.md)
- [One-time nonces — at-most-once admission](nonces.md)
- [External effects and recovery](external-recovery.md)
- [AshOnetime.Resource](dsl-ashonetime-resource.md)
- [Contributing](contributing.md)
- [Security policy](security-4.md)
- [ash_onetime usage rules](usage-rules.md)
- [Changelog](changelog.md)

## Modules

- [AshOnetime](AshOnetime.md): Explicit keyed-effect semantics for Ash actions.
- [AshOnetime.Cache](AshOnetime.Cache.md): Optional cache behaviour for completed idempotency responses.
- [AshOnetime.Cache.Entry](AshOnetime.Cache.Entry.md): A completed-response cache entry bound to an authoritative PostgreSQL claim.
- [AshOnetime.Cache.Ets](AshOnetime.Cache.Ets.md): A reference ETS adapter for the optional completed-response cache.
- [AshOnetime.Cache.None](AshOnetime.Cache.None.md): No-op cache used when no optional completed-response cache is configured.

- [AshOnetime.Canonical](AshOnetime.Canonical.md): Bounded, deterministic encoding for an explicit closed value algebra.
- [AshOnetime.Clock](AshOnetime.Clock.md): Trusted clock boundary used when minting and verifying tokens.

- [AshOnetime.Codec](AshOnetime.Codec.md): Contract for response codecs and shared boundary validation.

- [AshOnetime.Codec.ActionResult](AshOnetime.Codec.ActionResult.md): JSON codec for declared generic action return values.

- [AshOnetime.Codec.JSON](AshOnetime.Codec.JSON.md): Typed JSON response codec.

- [AshOnetime.Codec.Resource](AshOnetime.Codec.Resource.md): JSON codec for allowlisted fields of Ash resource action results.

- [AshOnetime.ExternalEffect](AshOnetime.ExternalEffect.md): Contract for a peer effect that is idempotent and recoverable by operation key.
- [AshOnetime.Fingerprint](AshOnetime.Fingerprint.md): Computes SHA-256 fingerprints over exact canonical bytes.

- [AshOnetime.KeyResolver](AshOnetime.KeyResolver.md): Resolves purpose-specific signing or verification material.
- [AshOnetime.KeySource](AshOnetime.KeySource.md): Closed key-source algebra used by protected actions.
- [AshOnetime.Oban.CleanupWorker](AshOnetime.Oban.CleanupWorker.md): Optional Oban entry point for the same bounded cleanup operation as `mix ash_onetime.prune`.

- [AshOnetime.Oban.PartitionWorker](AshOnetime.Oban.PartitionWorker.md): Optional Oban entry point for forward response-partition creation, mirroring
`mix ash_onetime.roll_partitions`. Schedule it ahead of the retention horizon (e.g. daily or
weekly) so payloads never route to the `_default` partition; without it, bounded retention
silently degrades past the install window.
- [AshOnetime.Oban.ReapWorker](AshOnetime.Oban.ReapWorker.md): Optional Oban entry point for the same bounded reap operation as `mix ash_onetime.reap`.
- [AshOnetime.Plug](AshOnetime.Plug.md): Copies configured request headers into `conn.private.ash_onetime.untrusted`.
- [AshOnetime.ReplaySafety](AshOnetime.ReplaySafety.md): Declaration for lifecycle callbacks that are safe during stored-result replay.
- [AshOnetime.Resource](AshOnetime.Resource.md): Spark resource extension for explicit idempotency and one-time nonce protection.
- [AshOnetime.Resource.Info](AshOnetime.Resource.Info.md): Read-only introspection for the normalized per-action protections a resource declares under
`onetime`.
- [AshOnetime.Resource.Protection](AshOnetime.Resource.Protection.md): The normalized, per-action keyed-effect declaration produced by an `onetime` `protect` block.
- [AshOnetime.Resource.Response](AshOnetime.Resource.Response.md): The normalized response contract for a protected action: the codec, the projected field
allowlist, the result classifier, and codec options.
- [AshOnetime.ResponseClassifier](AshOnetime.ResponseClassifier.md): Normalizes application response classification at the persistence boundary.

- [AshOnetime.Scope](AshOnetime.Scope.md): Closed, explicit scope algebra for collision isolation.
- [AshOnetime.Signer](AshOnetime.Signer.md): Behaviour implemented by bounded token signers.

- [AshOnetime.Signer.Ed25519](AshOnetime.Signer.Ed25519.md): Ed25519 signing with private material and verification with public material.

- [AshOnetime.Signer.HMAC](AshOnetime.Signer.HMAC.md): HMAC-SHA-256 signer restricted to explicitly same-service key material.
- [AshOnetime.Telemetry](AshOnetime.Telemetry.md): Emits the closed, value-free telemetry surface for keyed-effect admission.
- [AshOnetime.Token](AshOnetime.Token.md): Mints, signs, and verifies bounded self-identifying canonical tokens.
- [AshOnetime.Verified](AshOnetime.Verified.md): Trusted local facts returned by a configured token verifier or minter.
- [AshOnetime.Verifier](AshOnetime.Verifier.md): Behaviour for trusted local verification callbacks.
- [AshOnetime.Window](AshOnetime.Window.md): Inclusive replay and expiry window validation.

- Exceptions
  - [AshOnetime.Error](AshOnetime.Error.md): Typed failure returned by AshOnetime boundary modules.

## Mix Tasks

- [mix ash_onetime.gen.migrations](Mix.Tasks.AshOnetime.Gen.Migrations.md): Generates the PostgreSQL objects required by `ash_onetime`.
- [mix ash_onetime.gen.roll_forward](Mix.Tasks.AshOnetime.Gen.RollForward.md): Generates the SEC-5/SEC-6 forward migration for an existing `ash_onetime` install.
- [mix ash_onetime.install](Mix.Tasks.AshOnetime.Install.md): Installs `ash_onetime` formatting and its deterministic migration.
- [mix ash_onetime.prune](Mix.Tasks.AshOnetime.Prune.md): Removes one bounded batch of expired claims and empty response partitions.
- [mix ash_onetime.reap](Mix.Tasks.AshOnetime.Reap.md): Removes one bounded batch of abandoned `processing` idempotency recovery points past an
abandonment horizon.
- [mix ash_onetime.roll_partitions](Mix.Tasks.AshOnetime.RollPartitions.md): Creates the next batch of monthly `ash_onetime_response_payloads` range partitions.

