feat: SQLite ADO.NET implementation of IIdempotencyStore#382
Merged
Conversation
5 tasks
Copilot
AI
changed the title
[WIP] Add SQLite idempotency store for Pulse implementation
feat: SQLite ADO.NET implementation of IIdempotencyStore
Apr 14, 2026
Agent-Logs-Url: https://github.com/dailydevops/pulse/sessions/fc983465-f60a-4c80-a467-b557c9353359 Co-authored-by: samtrion <3283596+samtrion@users.noreply.github.com>
2b5a243 to
617375f
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #382 +/- ##
==========================================
+ Coverage 91.04% 91.33% +0.29%
==========================================
Files 119 122 +3
Lines 4130 4212 +82
Branches 375 381 +6
==========================================
+ Hits 3760 3847 +87
+ Misses 264 258 -6
- Partials 106 107 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
@copilot Add Integration tests |
Agent-Logs-Url: https://github.com/dailydevops/pulse/sessions/48069d0c-2456-44f9-9d83-af04e71b97b1 Co-authored-by: samtrion <3283596+samtrion@users.noreply.github.com>
Contributor
Author
Added in commit
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a SQLite-backed
IIdempotencyStoreusingMicrosoft.Data.Sqlite, enabling idempotency enforcement in embedded, edge, and test scenarios without a full database server.Core Implementation
SQLiteIdempotencyKeyRepository— implementsIIdempotencyKeyRepositorywith:SELECT 1 … LIMIT 1for existence checks, with optionalCreatedAt >= @validFromTTL filteringINSERT OR IGNOREfor duplicate-safe insertsDateTimeOffsetstored as ISO-8601 text ("O"format) for correct lexicographic orderingEnableWalMode = trueScripts/002_CreateIdempotencyKeyTable.sql—CREATE TABLE IF NOT EXISTSwithTEXT NOT NULL PRIMARY KEYonIdempotencyKeyand an index onCreatedAtfor TTL queriesSQLiteIdempotencyMediatorBuilderExtensions— threeAddSQLiteIdempotencyStoreoverloads (string, factory, action) registeringIIdempotencyKeyRepositoryas Scoped; mirrorsSqlServerIdempotencyMediatorBuilderExtensionsOptions
Added
EnableWalModeto the sharedIdempotencyKeyOptions(consistent with howOutboxOptionsexposes the same property).Integration Tests
SQLiteAdoNetIdempotencyInitializer— creates the idempotency table inline viaSqliteConnectionand wires upAddSQLiteIdempotencyStoreSQLiteAdoNetIdempotencyTests— inherits all scenarios fromIdempotencyTestsBase: key exists/absent, TTL within range, TTL expired, multiple keys, duplicate insert (same scope), cross-scope duplicate insertUsage