EricksonLopez.Idempotency Overview
EricksonLopez.Idempotency (2.0.0 on NuGet, L2) enforces exactly-once logical execution across retries, timeouts, and concurrent duplicate requests using distributed leases and SHA-256 payload fingerprinting.
- Atomic lease + fingerprint check:
IdempotencyEngine.ExecutePipelineAsyncguarantees a single in-flight executor per(TenantId, Scope, IdempotencyKey)while rejecting payload drift (FingerprintMismatch). - Response header sanitization (
v2.0.0):IdempotencyOptions.ResponseHeadersBlockliststrips sensitive headers (Set-Cookie,Authorization, etc.) before persisting replayable responses (SEC-001). - Strict key & scope bounds:
IdempotencyKey(1..128chars) andIdempotencyScope(1..64chars) arereadonly record structvalue types; malformed keys return HTTP 400 (RFC 9110) instead of 500. - Cross-family adoption: Directly consumed by
EricksonLopez.OutboxandEricksonLopez.Messaging.
Rendering diagram…
flowchart LR Req["Request + IdempotencyKey + Fingerprint"] --> Eng["IdempotencyEngine"] Eng -- New Key --> Lease["Acquire Lease -> Execute Delegate"] Lease --> Save["Persist ExecutionResponse"] Eng -- Completed + Same Fingerprint --> Replay["Replay Stored ExecutionResponse"] Eng -- Completed + Different Fingerprint --> Mis["FingerprintMismatch"] Eng -- Active Lease --> Conf["InFlightConflict"]
View accessible text summary and structure
Incoming request enters IdempotencyEngine with key and SHA-256 fingerprint, either executing once under an active lease, replaying a stored ExecutionResponse, or failing on InFlightConflict or FingerprintMismatch.
flowchart LR
Req["Request + IdempotencyKey + Fingerprint"] --> Eng["IdempotencyEngine"]
Eng -- New Key --> Lease["Acquire Lease -> Execute Delegate"]
Lease --> Save["Persist ExecutionResponse"]
Eng -- Completed + Same Fingerprint --> Replay["Replay Stored ExecutionResponse"]
Eng -- Completed + Different Fingerprint --> Mis["FingerprintMismatch"]
Eng -- Active Lease --> Conf["InFlightConflict"]Package Roster & Native AOT Status (13 / 13 Published)
Section titled “Package Roster & Native AOT Status (13 / 13 Published)”All 13 packages are published at 2.0.0 on NuGet (6,193 total downloads; localVersion: 3.1.0 on disk), target net8.0;net9.0;net10.0, and set IsAotCompatible=true / EnableTrimAnalyzer=true (Full AOT):
- Core & Abstractions:
EricksonLopez.Idempotency(622dl),EricksonLopez.Idempotency.Abstractions(2,548dl). - Web, Mediator, Result & Testing:
AspNetCore(267dl),Mediator(275dl),Result(266dl),Testing(285dl). - Stores:
MySql(317dl),MariaDb(281dl),PostgreSql(277dl),Redis(273dl),Oracle(270dl — runtime note: ODP.NETOracle.ManagedDataAccess.Coreuses reflection at runtime),Sqlite(258dl),SqlServer(254dl).
Benchmark Status:
hasBenchmarks: false— no BenchmarkDotNet reports are published fordotnet-idempotency.